Skip to content

Support directives on directive definitions - #4432

Merged
andimarek merged 5 commits into
masterfrom
directives-on-directive-definitions
Aug 4, 2026
Merged

Support directives on directive definitions#4432
andimarek merged 5 commits into
masterfrom
directives-on-directive-definitions

Conversation

@andimarek

Copy link
Copy Markdown
Member

Summary

  • support applied directives and directive extensions across SDL parsing, AST handling, registries, schema generation, and printing
  • expose directive deprecation and DIRECTIVE_DEFINITION through runtime schema APIs and introspection
  • validate missing bases, non-repeatable applications, illegal locations, and direct/indirect reference cycles

Implements the merged specification change from graphql/graphql-spec#1206.

Testing

  • JAVA_HOME=/home/andreas_marek/.jdks/jdk-25.0.2 ./gradlew test jacocoTestReport (5,735 tests)
  • JAVA_HOME=/home/andreas_marek/.jdks/jdk-25.0.2 ./gradlew testng (190 tests)
  • JAVA_HOME=/home/andreas_marek/.jdks/jdk-25.0.2 ./gradlew check -x test -x testng
  • local PR coverage-gate comparison: no per-class regressions

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5934 (+31 🟢) 5878 (+31 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5934 (+31 🟢) 5877 (+31 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5934 (+31 🟢) 5877 (+31 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5934 (+31 🟢) 5877 (+31 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23768 (+124 🟢) 23541 (+124 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 30085 3123 90.6% +0.1% 🟢
Branches 8796 1530 85.2% +0.1% 🟢
Methods 8049 1207 87.0% +0.2% 🟢

Changed Class Coverage (28 classes)

Class Line Branch Method
g.i.Introspection +0.1% 🟢 +0.3% 🟢 +0.1% 🟢
g.i.IntrospectionQueryBuilder ±0.0% +0.6% 🟢 ±0.0%
g.i.IntrospectionWithDirectivesSupport +0.1% 🟢 +13.3% 🟢 ±0.0%
g.l.AstPrinter +0.1% 🟢 +0.1% 🟢 +0.1% 🟢
g.l.AstSorter
$1
±0.0% +100.0% 🟢 ±0.0%
g.l.Directive +3.2% 🟢 ±0.0% +5.9% 🟢
g.l.DirectiveDefinition +19.2% 🟢 ±0.0% +5.0% 🟢
g.l.DirectiveDefinition
$Builder
+1.1% 🟢 ±0.0% +1.6% 🟢
g.l.DirectiveExtensionDefinition +82.4% 🟢 ±0.0% +85.7% 🟢
g.l.DirectiveExtensionDefinition
$Builder
+74.2% 🟢 ±0.0% +63.6% 🟢
g.l.DirectiveLocation +4.3% 🟢 ±0.0% +8.3% 🟢
g.l.PrettyAstPrinter +0.2% 🟢 +2.0% 🟢 +0.1% 🟢
g.p.GraphqlAntlrToLanguage ±0.0% +0.1% 🟢 ±0.0%
g.s.d.a.EditOperationAnalyzer +0.3% 🟢 +0.2% 🟢 +0.7% 🟢
g.s.d.a.SchemaDifference
$AppliedDirectiveDirectiveLocation
+100.0% 🟢 ±0.0% +100.0% 🟢
g.s.d.PossibleMappingsCalculator
$25
+0.5% 🟢 +0.6% 🟢 ±0.0%
g.s.d.PossibleMappingsCalculator
$31
+0.4% 🟢 +0.6% 🟢 ±0.0%
g.s.GraphQLDirective +3.1% 🟢 ±0.0% +6.7% 🟢
g.s.GraphQLDirective
$Builder
+2.4% 🟢 ±0.0% +2.8% 🟢
g.s.GraphqlDirectivesContainerTypeBuilder +14.7% 🟢 +50.0% 🟢 +18.2% 🟢
g.s.GraphQLObjectType +1.7% 🟢 ±0.0% +3.6% 🟢
g.s.i.e.DirectiveExtensionDirectiveRedefinitionError +100.0% 🟢 ±0.0% +100.0% 🟢
g.s.i.e.DirectiveExtensionMissingBaseError +100.0% 🟢 ±0.0% +100.0% 🟢
g.s.i.SchemaGeneratorAppliedDirectiveHelper +0.2% 🟢 +0.6% 🟢 +0.5% 🟢
g.s.i.SchemaPrinter ±0.0% +0.1% 🟢 ±0.0%
g.s.i.SchemaTypeExtensionsChecker +0.3% 🟢 ±0.0% +0.9% 🟢
g.s.i.TypeDefinitionRegistry +0.5% 🟢 +0.8% 🟢 +0.4% 🟢
g.s.ShallowTypeRefCollector +0.2% 🟢 +0.4% 🟢 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-08-04 02:08:31 UTC

@andimarek
andimarek merged commit 31261a4 into master Aug 4, 2026
11 checks passed
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