Skip to content

A few bug fixes for FastSchemaGenerator - #4529

Open
xuorig wants to merge 2 commits into
graphql-java:masterfrom
xuorig:fast-schema-generator-schema-directives
Open

xuorig wants to merge 2 commits into
graphql-java:masterfrom
xuorig:fast-schema-generator-schema-directives

Conversation

@xuorig

@xuorig xuorig commented Nov 2, 2026

Copy link
Copy Markdown

Not sure if this was intended (I assume not) but FastSchemaGenerator never calls buildSchemaDirectivesAndExtensions, so directives applied via schema @foo or extend schema @foo were missing from getSchemaDirectives()/getSchemaAppliedDirectives(), and getExtensionDefinitions() was always empty.

Also, the schema definition was also captured regardless of captureAstDefinitions.

Extracted buildSchemaAppliedDirectives from SchemaGeneratorHelper so both generators share it, and match SchemaGenerator's AST capture behaviour.

FastSchemaGenerator never called buildSchemaDirectivesAndExtensions, so
directives applied via `schema @foo` or `extend schema @foo` were missing
from getSchemaDirectives()/getSchemaAppliedDirectives(), and
getExtensionDefinitions() was always empty. The schema definition was
also captured regardless of captureAstDefinitions.

Extract buildSchemaAppliedDirectives from SchemaGeneratorHelper so both
generators share it, and match SchemaGenerator's AST capture behaviour.
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 17 6185 (+7 🟢) 6129 (+7 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 21 6185 (+7 🟢) 6129 (+7 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 25 6185 (+7 🟢) 6129 (+7 🟢) 0 (±0) 0 (±0) 56 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 18587 (+21 🟢) 18419 (+21 🟢) 0 (±0) 0 (±0) 168 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 30336 3078 90.8% ±0.0%
Branches 8958 1506 85.6% ±0.0%
Methods 8097 1186 87.2% ±0.0%

Changed Class Coverage (2 classes)

Class Line Branch Method
g.s.GraphQLSchema
$FastBuilder
+4.3% 🟢 ±0.0% +11.1% 🟢
g.s.i.FastSchemaGenerator +0.2% 🟢 +1.2% 🟢 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-11-04 00:47:36 UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant