Skip to content

feat: Expose remaining graphql-java ParserOptions settings in vertx-config.json - #2277

Merged
ferenc-csaky merged 3 commits into
mainfrom
feat/graphql-parser-options-remaining
Aug 12, 2026
Merged

feat: Expose remaining graphql-java ParserOptions settings in vertx-config.json#2277
ferenc-csaky merged 3 commits into
mainfrom
feat/graphql-parser-options-remaining

Conversation

@velo

@velo velo commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #2276, which exposed only the four integer limits of graphql-java's ParserOptions. This adds the remaining settings that sit alongside them.

Change

graphQLParserConfig now covers everything ParserOptions.Builder exposes:

"graphQLParserConfig" : {
  "maxCharacters" : 1048576,
  "maxTokens" : 15000,
  "maxWhitespaceTokens" : 200000,
  "maxRuleDepth" : 500,
  "captureIgnoredChars" : null,
  "captureSourceLocation" : null,
  "captureLineComments" : null,
  "readerTrackData" : null,
  "redactTokenParserErrorMessages" : null
}

The five new flags are Boolean, not boolean, and default to null. That is deliberate: graphql-java does not use one value across all parsers. Dumping the 26.0 defaults:

setting generic operation sdl
captureIgnoredChars false false false
captureSourceLocation true true true
captureLineComments true false true
readerTrackData true true true
redactTokenParserErrorMessages false false false

captureLineComments differs between generic and operation parsing, so baking a single primitive default into the config would silently flip operation parsing to true for every deployment. A null flag is left untouched, preserving whatever graphql-java defaults to for the parser being configured; a non-null flag is applied to both. Behaviour is unchanged when the section is absent or left at its defaults.

parsingListener is the one builder setting not exposed — it takes a callback implementation, which cannot be expressed in a config file.

Testing

  • GraphQLParserConfigTest — new cases for the flags being applied to both parser defaults, and for unset flags preserving the generic-vs-operation captureLineComments split rather than flattening it.
  • ServerConfigTest — the flags deserialize from the config section.
  • ServerConfigTemplateTest — template round-trip with the new nullable keys.
  • ServerFunctionContainerIT re-run against freshly built :local images, so the server is verified to still start and parse with the new nullable keys present in vertx-config.json.

Full mvn test is green.

…onfig.json

Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 18.80%. Comparing base (ea2cf01) to head (707c430).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...om/datasqrl/server/config/GraphQLParserConfig.java 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2277      +/-   ##
============================================
+ Coverage     18.78%   18.80%   +0.01%     
- Complexity     1223     1226       +3     
============================================
  Files           630      630              
  Lines         18409    18413       +4     
  Branches       2250     2250              
============================================
+ Hits           3459     3463       +4     
  Misses        14618    14618              
  Partials        332      332              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

velo and others added 2 commits August 12, 2026 11:13
@ferenc-csaky
ferenc-csaky enabled auto-merge (squash) August 12, 2026 15:21
@ferenc-csaky ferenc-csaky added this to the 0.11.1 milestone Aug 12, 2026
@ferenc-csaky ferenc-csaky added the enhancement New feature or request label Aug 12, 2026
@ferenc-csaky
ferenc-csaky merged commit db2457e into main Aug 12, 2026
16 of 17 checks passed
@ferenc-csaky
ferenc-csaky deleted the feat/graphql-parser-options-remaining branch August 12, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants