Breaking and behavior changes
- Directives on
schemaandextend schemaare now applied (#824). They used to be silently ignored. An applied schema directive with no matchingdirective @xdeclaration, or one using arguments the declaration doesn't define, now fails schema creation with aSchemaError. Apollo Federation'sextend schema @link(...)is the most common case. Either declare the directive with every argument you use, or setSchemaParserOptions.newOptions().allowUndeclaredDirectives(true). - Resolvers for supertypes of data classes are now used (#820). A
GraphQLResolver<Base>now resolves fields for subclasses ofBase, and it takes precedence over a getter with the same name on the subclass. Apps that already had such resolvers (previously logged as unused) may see different field values, or aTwo different classes used for typeerror at startup. - graphql-java 26.1 is now the default dependency (#818). This version still works with graphql-java 25 if you pin it. federation-jvm 6.x does not support graphql-java 26, so either upgrade to federation-jvm 7 or pin graphql-java 25.
SchemaParserOptionshas a new property, so its Kotlin-generatedcopy()has a new signature. Code compiled against 14.0.x that callscopy()needs to be recompiled. Using the builder is unaffected.
Known issues
- With
includeUnusedTypes(true), an unused interface that has no implementations fails schema creation (Expected type 'X' to be a GraphQLOutputType/GraphQLInputType) if its fields reference an enum, custom scalar or input type that isn't used anywhere else in the schema.
Highlights
- Support graphql-java 26 (#818, fixes #815)
- Support directives on the schema, with a new
allowUndeclaredDirectivesoption (#824, fixes #717, #729) - Support resolvers for supertypes of data classes (#820, fixes #497)
- Support generic input types (#819, fixes #468)
includeUnusedTypesnow also includes unused interfaces and unions, plus enums that are in the dictionary (#737, fixes #736)- Fix subscription resolver return type validation (#826, fixes #766)
@connectionwithout aforargument now fails with a clearSchemaErrorinstead of aNullPointerException(#818)
What's Changed
- chore(deps): update actions/checkout action to v7 by @renovate[bot] in #813
- chore(deps): update actions/cache action to v6 by @renovate[bot] in #814
- chore(deps): update actions/setup-java action to v6 by @renovate[bot] in #816
- chore: pin release/snapshot JDK to 11 by @renovate[bot] in #817
- fix(deps): update all non-major dependencies by @renovate[bot] in #808
- Support generic input types by @oryan-block in #819
- Add support for unused types for all dictionary types by @timward60 in #737
- Support resolvers for supertypes of data classes by @oryan-block in #820
- Support graphql-java 26 by @pfyod in #818
- Fix subscription resolver return type validation by @oryan-block in #826
- Support directives on the schema by @oryan-block in #824
New Contributors
Full Changelog: v14.0.3...v14.1.0