From 32f3ebc512e8294751d578588e6ec98737f1f9e4 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:49:49 -0500 Subject: [PATCH 01/64] Add the verify-tools skill The probe runs from each checkout's own copy, hashes with sha256sum and leaves Maven JVM flags to the machine. --- .claude/skills/verify-tools/SKILL.md | 83 ++++++++ .../skills/verify-tools/features/README.md | 45 +++++ .../features/arguments-and-inputs.md | 95 ++++++++++ .../features/async-and-subscriptions.md | 35 ++++ .../features/context-and-environment.md | 58 ++++++ .../features/directives-and-relay.md | 99 ++++++++++ .../verify-tools/features/generic-wrappers.md | 58 ++++++ .../features/interfaces-and-unions.md | 41 ++++ .../features/optional-data-fetcher-results.md | 35 ++++ .../skills/verify-tools/features/proxies.md | 36 ++++ .../verify-tools/features/schema-building.md | 53 ++++++ .../verify-tools/features/schema-options.md | 21 +++ .../verify-tools/features/type-extensions.md | 62 ++++++ .claude/skills/verify-tools/probe.sh | 177 ++++++++++++++++++ .claude/skills/verify-tools/probe/pom.xml | 95 ++++++++++ .../src/main/kotlin/probe/DirectiveDump.kt | 65 +++++++ .../probe/src/main/kotlin/probe/Main.kt | 125 +++++++++++++ .../probe/src/main/kotlin/scenarios/Async.kt | 48 +++++ .../src/main/kotlin/scenarios/Bookstore.kt | 70 +++++++ .../kotlin/scenarios/ContextAndEnvironment.kt | 59 ++++++ .../main/kotlin/scenarios/ContextMisbound.kt | 35 ++++ .../main/kotlin/scenarios/DirectiveDrift.kt | 65 +++++++ .../src/main/kotlin/scenarios/Directives.kt | 42 +++++ .../kotlin/scenarios/DirectivesInvalid.kt | 22 +++ .../kotlin/scenarios/GenericInputResolver.kt | 23 +++ .../probe/src/main/kotlin/scenarios/Inputs.kt | 44 +++++ .../src/main/kotlin/scenarios/JdkProxy.kt | 45 +++++ .../src/main/kotlin/scenarios/NestedUnions.kt | 24 +++ .../main/kotlin/scenarios/NestedWrappers.kt | 110 +++++++++++ .../kotlin/scenarios/NestedWrappersExact.kt | 85 +++++++++ .../main/kotlin/scenarios/OptionalResults.kt | 72 +++++++ .../src/main/kotlin/scenarios/Options.kt | 27 +++ .../src/main/kotlin/scenarios/Polymorphism.kt | 37 ++++ .../main/kotlin/scenarios/ReadOnlySchema.kt | 41 ++++ .../main/kotlin/scenarios/RecursiveInputs.kt | 28 +++ .../src/main/kotlin/scenarios/ScalarArgs.kt | 100 ++++++++++ .../main/kotlin/scenarios/ScalarDirectives.kt | 43 +++++ .../src/main/kotlin/scenarios/Scenario.kt | 32 ++++ .../src/main/kotlin/scenarios/Sourceless.kt | 98 ++++++++++ .../main/kotlin/scenarios/TypeExtensions.kt | 45 +++++ .../scenarios/TypeExtensionsInputOrder.kt | 23 +++ .../scenarios/TypeExtensionsRepeatedFields.kt | 55 ++++++ .../kotlin/scenarios/TypeExtensionsSealed.kt | 36 ++++ .../main/kotlin/scenarios/UnmappedInputs.kt | 38 ++++ .../src/main/kotlin/scenarios/WiringShapes.kt | 67 +++++++ .../probe/src/main/resources/logback.xml | 21 +++ .../scenarios/async/01-query.graphql | 5 + .../scenarios/async/02-subscription.graphql | 3 + .../resources/scenarios/async/schema.graphqls | 14 ++ .../extension.graphqls | 3 + .../scenarios/bookstore/01-books.graphql | 9 + .../scenarios/bookstore/02-book-by-id.graphql | 7 + .../bookstore/02-book-by-id.variables.json | 1 + .../scenarios/bookstore/schema.graphqls | 24 +++ .../context-and-environment/01-query.graphql | 7 + .../context-and-environment/schema.graphqls | 12 ++ .../01-without-argument.graphql | 3 + .../context-misbound/02-with-argument.graphql | 3 + .../03-context-and-correct.graphql | 4 + .../context-misbound/04-type-resolver.graphql | 3 + .../context-misbound/schema.graphqls | 11 ++ .../schema.graphqls | 3 + .../scenarios/directive-drift/schema.graphqls | 79 ++++++++ .../directives-invalid/01-query.graphql | 8 + .../directives-invalid/schema.graphqls | 20 ++ .../scenarios/directives/01-uppercase.graphql | 4 + .../directives/02-deprecated.graphql | 9 + .../directives/03-connection.graphql | 14 ++ .../scenarios/directives/schema.graphqls | 13 ++ .../generic-input-resolver/01-plain.graphql | 1 + .../generic-input-resolver/02-generic.graphql | 1 + .../generic-input-resolver/schema.graphqls | 8 + .../scenarios/inputs/01-search.graphql | 4 + .../scenarios/inputs/02-nickname.graphql | 5 + .../scenarios/inputs/03-add-book.graphql | 14 ++ .../inputs/03-add-book.variables.json | 1 + .../scenarios/inputs/04-invalid-enum.graphql | 3 + .../scenarios/inputs/schema.graphqls | 34 ++++ .../scenarios/jdk-proxy/01-query.graphql | 1 + .../scenarios/jdk-proxy/schema.graphqls | 5 + .../nested-unions/01-results.graphql | 9 + .../scenarios/nested-unions/schema.graphqls | 15 ++ .../nested-wrappers-exact/01-dates.graphql | 1 + .../02-tried-dates.graphql | 1 + .../03-plain-future-items.graphql | 1 + .../04-batched-items.graphql | 1 + .../05-boxed-items.graphql | 1 + .../06-later-items.graphql | 1 + .../07-suspend-plain-future-items.graphql | 1 + .../nested-wrappers-exact/schema.graphqls | 15 ++ .../01-nullable-items.graphql | 1 + .../02-non-null-items.graphql | 1 + .../03-type-variable-strings.graphql | 1 + .../nested-wrappers-suspend/schema.graphqls | 9 + .../nested-wrappers/01-payload.graphql | 1 + .../nested-wrappers/02-payloads.graphql | 1 + .../03-payload-strings.graphql | 1 + .../nested-wrappers/04-items.graphql | 1 + .../nested-wrappers/05-item-names.graphql | 1 + .../06-future-of-future.graphql | 1 + .../07-future-of-tries.graphql | 1 + .../08-tries-of-futures.graphql | 1 + .../nested-wrappers/09-loaded-items.graphql | 1 + .../10-failed-try-in-list.graphql | 1 + .../11-failed-future-in-list.graphql | 1 + .../nested-wrappers/12-controls.graphql | 1 + .../scenarios/nested-wrappers/schema.graphqls | 23 +++ .../01-optional-result-list.graphql | 1 + .../optional-results-list/schema.graphqls | 7 + .../01-optional-result.graphql | 1 + .../02-result-of-optional.graphql | 1 + .../optional-results-mixed/schema.graphqls | 8 + .../01-optional-result-of-result.graphql | 1 + .../optional-results-nested/schema.graphqls | 7 + .../01-optional-result.graphql | 1 + .../02-optional-result-name.graphql | 1 + .../03-empty-optional-result.graphql | 1 + .../optional-results/schema.graphqls | 9 + .../scenarios/options/01-fields.graphql | 5 + .../options/02-schema-introspection.graphql | 3 + .../options/03-type-introspection.graphql | 3 + .../scenarios/options/schema.graphqls | 4 + .../scenarios/polymorphism/01-node.graphql | 11 ++ .../scenarios/polymorphism/02-union.graphql | 7 + .../scenarios/polymorphism/schema.graphqls | 20 ++ .../read-only-schema/01-interface.graphql | 3 + .../read-only-schema/02-union.graphql | 3 + .../read-only-schema/03-no-mutation.graphql | 3 + .../read-only-schema/schema.graphqls | 29 +++ .../recursive-inputs/01-describe.graphql | 5 + .../01-describe.variables.json | 1 + .../recursive-inputs/02-introspect.graphql | 6 + .../recursive-inputs/schema.graphqls | 29 +++ .../scalar-args/01-custom-scalar.graphql | 1 + .../scenarios/scalar-args/02-id.graphql | 1 + .../scalar-args/03-nested-sets.graphql | 1 + .../scalar-args/04-nested-lists.graphql | 1 + .../05-empty-kotlin-scalar.graphql | 1 + .../06-marked-empty-kotlin-scalars.graphql | 1 + ...tional-marked-empty-kotlin-scalars.graphql | 4 + .../scenarios/scalar-args/schema.graphqls | 27 +++ .../01-introspect-scalars.graphql | 3 + .../scalar-directives/02-use-scalars.graphql | 6 + .../scalar-directives/schema.graphqls | 17 ++ .../sourceless-misbound/01-thumbnail.graphql | 3 + .../sourceless-misbound/schema.graphqls | 12 ++ .../sourceless-shadowed/01-shadowed.graphql | 3 + .../sourceless-shadowed/schema.graphqls | 12 ++ .../01-helper.graphql | 3 + .../sourceless-unimplemented/schema.graphqls | 13 ++ .../sourceless/01-local-context.graphql | 3 + .../scenarios/sourceless/02-contexts.graphql | 3 + .../scenarios/sourceless/schema.graphqls | 18 ++ .../01-count.graphql | 3 + .../schema.graphqls | 15 ++ .../01-kept-declarations.graphql | 10 + .../02-introspection.graphql | 9 + .../schema.graphqls | 72 +++++++ .../01-pets-and-animals.graphql | 11 ++ .../type-extensions-sealed/schema.graphqls | 30 +++ .../scenarios/type-extensions/01-node.graphql | 16 ++ .../02-search-and-enums.graphql | 10 + .../type-extensions/03-introspection.graphql | 13 ++ .../scenarios/type-extensions/schema.graphqls | 73 ++++++++ .../unmapped-inputs/01-ignored.graphql | 3 + .../scenarios/unmapped-inputs/02-typo.graphql | 3 + .../scenarios/unmapped-inputs/schema.graphqls | 21 +++ .../scenarios/wiring-shapes/01-trees.graphql | 3 + .../scenarios/wiring-shapes/02-person.graphql | 4 + .../scenarios/wiring-shapes/schema.graphqls | 32 ++++ 170 files changed, 3678 insertions(+) create mode 100644 .claude/skills/verify-tools/SKILL.md create mode 100644 .claude/skills/verify-tools/features/README.md create mode 100644 .claude/skills/verify-tools/features/arguments-and-inputs.md create mode 100644 .claude/skills/verify-tools/features/async-and-subscriptions.md create mode 100644 .claude/skills/verify-tools/features/context-and-environment.md create mode 100644 .claude/skills/verify-tools/features/directives-and-relay.md create mode 100644 .claude/skills/verify-tools/features/generic-wrappers.md create mode 100644 .claude/skills/verify-tools/features/interfaces-and-unions.md create mode 100644 .claude/skills/verify-tools/features/optional-data-fetcher-results.md create mode 100644 .claude/skills/verify-tools/features/proxies.md create mode 100644 .claude/skills/verify-tools/features/schema-building.md create mode 100644 .claude/skills/verify-tools/features/schema-options.md create mode 100644 .claude/skills/verify-tools/features/type-extensions.md create mode 100755 .claude/skills/verify-tools/probe.sh create mode 100644 .claude/skills/verify-tools/probe/pom.xml create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/logback.xml create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/async/01-query.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/async/02-subscription.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/async/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore-missing-resolver/extension.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/01-books.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.variables.json create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/01-query.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/01-without-argument.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/02-with-argument.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/03-context-and-correct.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/04-type-resolver.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift-undeclared/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/01-query.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/01-uppercase.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/02-deprecated.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/03-connection.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/01-plain.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/02-generic.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/01-search.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/02-nickname.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.variables.json create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/04-invalid-enum.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/01-query.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/01-results.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/01-dates.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/02-tried-dates.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/03-plain-future-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/04-batched-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/05-boxed-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/06-later-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/01-nullable-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/02-non-null-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/01-payload.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/02-payloads.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/03-payload-strings.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/04-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/05-item-names.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/06-future-of-future.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/07-future-of-tries.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/08-tries-of-futures.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/09-loaded-items.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/10-failed-try-in-list.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/11-failed-future-in-list.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/12-controls.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/01-optional-result-list.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/01-optional-result.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/02-result-of-optional.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/01-optional-result-of-result.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/01-optional-result.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/02-optional-result-name.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/03-empty-optional-result.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/01-fields.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/02-schema-introspection.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/03-type-introspection.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/01-node.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/02-union.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/01-interface.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/02-union.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/03-no-mutation.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.variables.json create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/02-introspect.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/01-custom-scalar.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/02-id.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/03-nested-sets.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/04-nested-lists.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/05-empty-kotlin-scalar.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/01-introspect-scalars.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/02-use-scalars.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/01-thumbnail.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/01-shadowed.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/01-helper.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/01-local-context.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/02-contexts.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/01-count.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/02-introspection.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/01-pets-and-animals.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/01-node.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/02-search-and-enums.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/03-introspection.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/01-ignored.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/02-typo.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/schema.graphqls create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/01-trees.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/02-person.graphql create mode 100644 .claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/schema.graphqls diff --git a/.claude/skills/verify-tools/SKILL.md b/.claude/skills/verify-tools/SKILL.md new file mode 100644 index 00000000..e05f506c --- /dev/null +++ b/.claude/skills/verify-tools/SKILL.md @@ -0,0 +1,83 @@ +--- +name: verify-tools +description: Prove a graphql-java-tools behavior the way a consuming app sees it. Installs this checkout into a private Maven repo, builds a schema from SDL files and resolver classes in a separate probe project through the public API, runs GraphQL operations, and saves the printed schema, JSON results and library warnings as evidence. Use to confirm a fix or feature works from the outside (not just in the library's own unit tests), or to reproduce an issue report. Run it before pushing any schema-building change to an open PR, including refactors and new or changed library warnings, whose only proof is the probe's log. +--- + +# Verify graphql-java-tools from a consumer + +`probe/` is a separate Maven project that depends on the jar installed from a checkout, so it sees only the public API, +unlike `src/test`. `mvn verify` still runs for every change. This skill proves one behavior end to end in minutes, and is +where bugfixes and small features stop. + +## Run + +`probe.sh` sits next to this file and verifies the checkout of the current directory. Every clone and worktree has its +own copy, so run it from the checkout root. To verify a commit that predates this skill, check it out in its own worktree +and run another checkout's `probe.sh` from inside it. + +```bash +.claude/skills/verify-tools/probe.sh doctor # checkout, branch, install state, lock +.claude/skills/verify-tools/probe.sh list # scenario names +.claude/skills/verify-tools/probe.sh run [--graphql-java ] # build the schema, run every operation +.claude/skills/verify-tools/probe.sh clean # remove this checkout's work dir, keep evidence +``` + +- `run` first installs the checkout into a private Maven repo under `$TMPDIR/verify-tools/work/-/` when + the install is missing or stale, meaning HEAD or uncommitted `pom.xml`/`src/` changes differ from the last install. It + reads `~/.m2` but never writes it. The work dir is keyed on the checkout's path, so clones and worktrees run in parallel, + even when two share a folder name. If `doctor` shows the + lock held by a live pid, wait for that run. +- It builds the schema from the scenario's `parser()`, prints it, then executes every `*.graphql` in + `probe/src/main/resources/scenarios//` in name order, with `.variables.json` as variables. It collects + subscription events until the stream completes, for at most 10 seconds. +- Exit `0`: the schema built and every operation ran, though operations can still return GraphQL errors. `2`: the build + threw. `1`: harness failure (install log or `maven.log`). `64`: bad usage. +- `--graphql-java` swaps only the runtime graphql-java, like a user who pins another version. It doesn't recompile the + library against it. `--skip-install` runs a stale install on purpose and doesn't count as proof. + +## Evidence + +`run` prints its evidence directory, `$TMPDIR/verify-tools/evidence/-[-gj][-]/`, on its last +line. + +| File | Holds | +|---|---| +| `summary.txt` | Jars actually loaded, Java version, unused definitions, build result, errors per operation | +| `run.txt` | Checkout, commit, source fingerprint and install stamp, command, exit code | +| `schema.graphqls` | The executable schema as graphql-java prints it, generated types included | +| `.json` | The spec-shaped result, `events` for a subscription, or `threw` when `execute` threw | +| `probe.log` | WARN and above, plus INFO from `graphql.kickstart.tools`, where the library's build warnings land | +| `inspect.txt` | What the scenario's `inspect(schema)` returned | +| `build-error.txt` | Stack trace when the build threw | + +Proof standards: + +- `summary.txt`'s `graphql-java-tools jar` is inside the work dir, and `run.txt`'s fingerprint equals its install stamp. + Otherwise you tested another build. +- Quote the operation and the relevant part of `.json`. Cite `schema.graphqls` for schema shape, `probe.log` for + warnings, and `build-error.txt` with exit `2` for build failures. +- For a regression, a new warning or a clearer error, run the same scenario on the fix and on `master` (or the commit + before the fix), in two worktrees, and show both. They differ in exactly the way the issue describes. +- Report a sub-feature you didn't run as skipped, with the reason. Another scenario doesn't cover it. +- An expected value in `features/` that stops matching is a finding to report, not something to edit away. + +## Adding a scenario + +1. Write the SDL as `probe/src/main/resources/scenarios//schema.graphqls` and load it with `.file(...)`, unless the + behavior is about `schemaString`. +2. Add `object : Scenario` with `name` and `parser()` in `probe/src/main/kotlin/scenarios/.kt`. Being an + object in that package registers it. Classes share the package, so prefix resolver and data classes with the scenario. + Use only public API. If the probe needs `internal` or test classes, a user can't reach the behavior either, so report + that. +3. Add operations as `NN-.graphql`, plus `NN-.variables.json` when they take variables. graphql-java rejects + a second `__type` in one operation and still exits `0`, so read several types through `__schema { types { ... } }`. +4. Override what the scenario needs. `operations` reuses another scenario's operation directory. `schema(parser)` takes + another build path such as `toReadOnlySchema()`. `inspect(schema)` returns evidence the printer doesn't show, and + `probe.dumpDirectives(schema)` lists every element's applied and legacy directives. `graphQL(builder)` and + `input(builder)` add instrumentation, context or data loaders. +5. A scenario that doesn't compile breaks every checkout's run, so finish it before running. Keep a scenario that proves + a lasting feature and add its exact expected results to the matching file in `features/`. Delete a one-off + reproduction after reporting. + +`features/README.md` maps each feature to its scenarios and expected results. Delete evidence directories by hand once +reported. diff --git a/.claude/skills/verify-tools/features/README.md b/.claude/skills/verify-tools/features/README.md new file mode 100644 index 00000000..c16a73d1 --- /dev/null +++ b/.claude/skills/verify-tools/features/README.md @@ -0,0 +1,45 @@ +# graphql-java-tools verification map + +Each file below is one user-visible feature, with the scenarios that prove it and their exact expected results. The +commands and proof standards are in `../SKILL.md`. Scenario data is fixed, so expected values are literal. + +A feature file has an H1 title and one paragraph on the behavior a user sees, then three H2 sections: `Sub-features` (short +IDs, one line each), `Expected results` (each scenario's `run` command and what its evidence shows), and `Gotchas` (traps +that waste or invalidate a run, and how the result looked before the fix). + +## Features + +- [Schema building](./schema-building.md): SDL files, root and nested resolvers, property and getter discovery, custom + scalars, the unused-type warning, the missing-resolver error and the read-only schema (`bookstore`, + `bookstore-missing-resolver`, `read-only-schema`). +- [Arguments and input types](./arguments-and-inputs.md): SDL defaults, enums, lists, input objects mapped to classes, + omitted versus null, parameters typed by a type variable, custom scalar arguments, recursive input objects and the WARN + for unmapped input fields (`inputs`, `unmapped-inputs`, `generic-input-resolver`, `scalar-args`, `recursive-inputs`). +- [Async resolvers and subscriptions](./async-and-subscriptions.md): `CompletableFuture`, suspend functions, and + `Publisher` subscriptions (`async`). +- [Generic wrappers](./generic-wrappers.md): wrappers and futures nested in lists and other wrappers, with and without a + `ValueUnboxer`, and in suspend resolvers (`nested-wrappers`, `nested-wrappers-unboxer`, `nested-wrappers-suspend`). +- [DataFetcherResult inside an Optional](./optional-data-fetcher-results.md): data, errors, empty, a list, the same type + returned another way, and the nested-result rejection (`optional-results`, `optional-results-mixed`, + `optional-results-list`, `optional-results-nested`). +- [Interfaces and unions](./interfaces-and-unions.md): runtime type resolution through the dictionary, including a class + whose name differs from the type, and a union that is only a member of another union (`polymorphism`, + `nested-unions`). +- [Directives and relay connections](./directives-and-relay.md): `SchemaDirectiveWiring`, `@deprecated`, `@connection` + type generation, directives and `@specifiedBy` on scalars, wirings on recursive and cross-referencing types, applied + versus legacy directive lists, undeclared directives and invalid applications (`directives`, `scalar-directives`, + `wiring-shapes`, `directive-drift`, `directive-drift-undeclared`, `directives-invalid`). +- [Schema parser options](./schema-options.md): `missingResolverDataFetcherProvider` + (`options`). +- [Type extensions](./type-extensions.md): fields, interfaces, members, values and directives of every kind of extension, + the repeat and kind-mismatch warnings, repeated object and input fields, and sealed subclasses found through + extensions (`type-extensions`, `type-extensions-repeated-fields`, `type-extensions-sealed`). +- [Proxied resolvers](./proxies.md): Spring JDK dynamic and CGLIB proxies, and the warning for fields a JDK proxy can't + call (`jdk-proxy`, `jdk-proxy-cglib`, `jdk-proxy-plain`). +- [Context and environment parameters](./context-and-environment.md): `contextClass`, `GraphQLContext` and + `DataFetchingEnvironment` after the schema arguments, in any order, the misbound-argument warning, and resolver methods + without the source parameter (`context-and-environment`, `context-and-environment-invalid`, `context-misbound`, + `sourceless`, `sourceless-shadowed`, `sourceless-unimplemented`, `sourceless-misbound`). + +Not mapped yet: field visibility, per-field object mappers, the Guice, Javassist and Weld proxy handlers, +`includeUnusedTypes`, and comment descriptions. Add a scenario and a feature entry when a change touches one of them. diff --git a/.claude/skills/verify-tools/features/arguments-and-inputs.md b/.claude/skills/verify-tools/features/arguments-and-inputs.md new file mode 100644 index 00000000..de820272 --- /dev/null +++ b/.claude/skills/verify-tools/features/arguments-and-inputs.md @@ -0,0 +1,95 @@ +# Arguments and input types + +Resolver methods take GraphQL arguments as ordinary parameters, in SDL order. graphql-java-tools converts scalars, enums, +lists and input objects into the parameter's declared class, applies SDL default values, and passes +`DataFetchingEnvironment` when it is the last parameter. An input object can refer to itself, or to another input object +that refers back. With `inputArgumentOptionalDetectOmission`, an `Optional` parameter tells an omitted argument (`null`) +from an explicit `null` (`Optional.empty()`). + +## Sub-features + +- `args-defaults` applies an argument's SDL default when the operation omits it. +- `args-enum-list` converts `[Genre!]` literals into a `List` of a Kotlin enum. +- `args-env` passes `DataFetchingEnvironment` as the trailing parameter. +- `args-input-object` maps a nested input object into data classes, including input field defaults. +- `args-optional-omission` passes `null` for an omitted argument, `Optional.empty()` for an explicit null, and + `Optional.of` for a value. +- `args-invalid-enum` rejects an unknown enum literal during validation, before any resolver runs. +- `args-unmapped-warn` logs a WARN at build for an input field the argument's class has no property for, here a + misspelled property under an `Optional`. +- `args-unmapped-ignored` doesn't report a field the property's `@JsonIgnoreProperties` ignores, here on an `Optional` + property. +- `args-type-variable` converts an argument whose parameter is typed by the resolver superclass's type variable into the + class the subclass binds it to. +- `args-scalars` passes a custom scalar's coerced object through unconverted, also when it's a Kotlin class without visible + properties inside an input object, converts `ID` into a `Long` parameter, and converts `[[String]]` into a + `List>` parameter. +- `args-recursive` converts an input object that refers to itself, and two that refer to each other, through lists, nested + lists and non-null types into data classes at every depth. It also builds a directive whose arguments are an input + object, an enum with a default and a list. + +## Expected results + +- **Run.** `run inputs`. Exit `0`. `summary.txt` shows `errors=0` for `01` to + `03` and `errors=1` for `04-invalid-enum`. +- **Defaults, enums, env.** `01-search.json` has + `data.defaults = "term=dune limit=10 genres=null field=search"` and + `data.explicit = "term=dune limit=2 genres=[SCIENCE, HISTORY] field=search"`. +- **Omitted vs null.** `02-nickname.json` has `omitted = "omitted"`, `explicitNull = "explicit null"` and + `given = "value Bilbo"`. +- **Input objects.** `03-add-book.json` (variables in `03-add-book.variables.json`) has `data.addBook` equal to + `{"title": "Cosmos", "genre": "SCIENCE", "tags": ["space", "classic"], "pages": 396, "language": "en"}`. `language` + comes from the input field default. `data.defaults` is `{"genre": "FICTION", "tags": [], "pages": null}`. +- **Invalid enum.** `04-invalid-enum.json` has no `data`, and one error whose message starts with + `Validation error (WrongType@[search])` and names `POETRY`. +- **Unmapped input fields.** `run unmapped-inputs`. Exit `0`. `probe.log` has + exactly one `UnmappedInputFieldChecker` WARN, starting `Input field 'ItemInput.name' has no matching property in + scenarios.ItemInput` and listing `Known properties: nmae`. There is no WARN for `InnerInput.legacy`. + `01-ignored.json` has `data.ignored = "a"`. `02-typo.json` has one error containing + `Unrecognized property "name" (class scenarios.ItemInput)` (`Unrecognized field` before Jackson 3, in 14.x), which shows + the reported field really fails. +- **Type variable parameters.** `run generic-input-resolver`. Exit `0`. + `summary.txt` shows `errors=0` for both operations. `02-generic.json` has + `data.generic = "generic got GreetingInput(name=a)"`, and `01-plain.json` has + `data.plain = "plain got GreetingInput(name=a)"`. +- **Scalar arguments.** `run scalar-args`. Exit `0`. `summary.txt` shows + `errors=0` for the first five operations. `01-custom-scalar.json` has `data.tag = "tag kotlin"` and + `data.tags = "tags [a, b]"` (`Tag` has no constructor Jackson can use, so this only works when the value is passed + through). `02-id.json` has `data.id = "id 43 (long)"`. `03-nested-sets.json` has + `data.nestedSets = "sets [[a, b], [c]] sizes [2, 1]"`. `04-nested-lists.json` has + `data.nestedLists = "lists [[a, a, b], [c]]"`. `05-empty-kotlin-scalar.json` has `data.tokenInput = "token input"`. + `06-marked-empty-kotlin-scalars.json` has one error and `07-optional-marked-empty-kotlin-scalars.json` two, all containing + `missing type id property '@class'` or `Cannot deserialize value of type`. Those scalars fail rather than reach the resolver + as a default instance. +- **Recursive inputs.** `run recursive-inputs`. Exit `0`, `errors=0` for both operations and an empty `probe.log`. + `01-describe.json` (variables in `01-describe.variables.json`) has `data.names = ["a", "b"]`. `data.describe` starts + `TreeFilter(name=root, and=[TreeFilter(name=a,` and ends `siblings=[[ChildFilter(parent=null, siblings=null, depth=4)], + []], depth=3))`. `data.literal` is `TreeFilter(name=x, and=null, not=null, child=ChildFilter(parent=null, + siblings=[[ChildFilter(parent=null, siblings=null, depth=2)]], depth=1))`. `schema.graphqls` has `siblings: + [[ChildFilter!]!]` and `directive @limit(labels: [String!], range: RangeInput!, unit: LimitUnit = ITEMS) on + FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION`. In `02-introspect.json`, `limit` has `range` of + `RangeInput!`, `unit` of `LimitUnit` with default `ITEMS`, and `labels` of `[String!]`. + +## Gotchas + +- Arguments bind by position, not name. A resolver whose parameters are in a different order than the SDL still builds + when the types line up, and returns swapped values. +- Without `inputArgumentOptionalDetectOmission`, an omitted argument and an explicit null both arrive as + `Optional.empty()`. This scenario turns the option on. Prove the default behavior in a separate scenario. +- `04-invalid-enum` fails in graphql-java validation. It proves the generated enum type, not the resolver's conversion. +- The unmapped input field check comes from PR #857. On a checkout without it, `unmapped-inputs` still exits `0` with the + same JSON, but `probe.log` has no `UnmappedInputFieldChecker` lines. +- `02-typo` errors because the scenario uses the default `ObjectMapper`, which fails on unknown properties. It doesn't + cover a mapper that ignores them. +- The type variable fix comes from PR #882. On a checkout without it, `generic-input-resolver` still builds and exits + `0`, but `02-generic.json` has `data: null` and an error containing `TypeVariableImpl cannot be cast to class + java.lang.Class`. +- The nested list fix comes from PR #891. On a checkout without it, `scalar-args` still exits `0`, but + `03-nested-sets.json` has an error containing `ArrayList cannot be cast to class java.util.Set`. +- The fix for a Kotlin scalar class without visible properties comes from issue #926. On a checkout without it, + `05-empty-kotlin-scalar.json` has `data.tokenInput = "token default"`, since Jackson wrote the value as `{}` and read it + back as a new instance. The same scalar written with a type id or an object id comes from issue #932. On a checkout + without it, `07-optional-marked-empty-kotlin-scalars.json` has no errors and `"typed default"` and `"id default"`. The probe doesn't cover an `ObjectNode` parameter, which needs Jackson 3 on the probe's compile + path. `CustomScalarInputTest` does. +- `recursive-inputs` registers no directive wiring. `wiring-shapes` in `directives-and-relay.md` covers wirings on a + recursive input. diff --git a/.claude/skills/verify-tools/features/async-and-subscriptions.md b/.claude/skills/verify-tools/features/async-and-subscriptions.md new file mode 100644 index 00000000..b1d4e508 --- /dev/null +++ b/.claude/skills/verify-tools/features/async-and-subscriptions.md @@ -0,0 +1,35 @@ +# Async resolvers and subscriptions + +Resolvers can return a `CompletableFuture`, be Kotlin `suspend` functions (root resolvers and `GraphQLResolver` field +resolvers alike), or, for subscription fields, return a reactive-streams `Publisher`. The schema declares the plain +result type (`String!`, `Int!`), and graphql-java-tools unwraps the async wrapper. + +## Sub-features + +- `async-future` resolves a field from a `CompletableFuture`. +- `async-suspend-root` resolves a root field from a `suspend fun` that suspends (`delay`). +- `async-suspend-nested` resolves a list of objects from a `suspend fun`, and a field on each through a suspend + `GraphQLResolver` method. +- `async-subscription` streams a `Publisher` from a `GraphQLSubscriptionResolver`, one event per element, then + completes. + +## Expected results + +- **Run.** `run async`. Exit `0`. `summary.txt` has + `operation 01-query: errors=0` and `operation 02-subscription: errors=0 events=3`. +- **Futures and suspend.** `01-query.json` has `data.future = "from a future"`, + `data.suspended = "from a suspend function"`, and + `data.shipments = [{"id": "s1", "status": "s1: delivered"}, {"id": "s2", "status": "s2: delivered"}]`. +- **Subscription.** `02-subscription.json` is + `{"events": [{"data": {"ticks": 1}}, {"data": {"ticks": 2}}, {"data": {"ticks": 3}}]}`, with no `errors` key and no + `publisherError` entry. + +## Gotchas + +- Collection stops at stream completion or after 10 seconds. A publisher that never completes prints `subscription did + not complete within 10 seconds` and records only the events seen so far, which is a finding, not a pass. +- An error from the publisher shows up as a `{"publisherError": ...}` event, not under `errors`. +- `--graphql-java` changes only the runtime graphql-java. The library jar is still the one compiled against the version + in `pom.xml`. +- The suspend timing isn't asserted. To prove a dispatcher or `coroutineContextProvider` change, add a field that + reports `Thread.currentThread().name` or the coroutine context to a new scenario. diff --git a/.claude/skills/verify-tools/features/context-and-environment.md b/.claude/skills/verify-tools/features/context-and-environment.md new file mode 100644 index 00000000..ef0b1bb2 --- /dev/null +++ b/.claude/skills/verify-tools/features/context-and-environment.md @@ -0,0 +1,58 @@ +# Context and environment parameters + +After its schema arguments, a resolver method can take any of `DataFetchingEnvironment`, `graphql.GraphQLContext` and the +class set with `contextClass`, in any order. The custom context is read from the `GraphQLContext` map under its class. +Any other trailing parameter type fails the build with "No method found". + +## Sub-features + +- `ctx-env-both` passes the custom context and the environment to `greeting(name, context, env)`. +- `ctx-env-reversed` passes them to `farewell(name, env, context)`. +- `ctx-env-type-resolver` passes `graphql.GraphQLContext` and the environment to a `GraphQLResolver` method. +- `ctx-env-single` keeps a single environment or a single context parameter working. +- `ctx-env-invalid` rejects a trailing `String` parameter at build time. +- `ctx-env-misbound` warns at build when a schema argument lands on an environment or context parameter. +- `sourceless` binds a field resolver method that leaves out the source and takes only arguments, the environment or the + context, when no method with the source and no property matches. + +## Expected results + +- **Run.** `run context-and-environment`. Exit `0`, `01-query: errors=0`. +- **Results.** `01-query.json` has `data = {"greeting": "greeting: hi ada, from oryan", "farewell": "farewell: bye ada, + from oryan", "user": {"name": "oryan", "locale": "locale of oryan: en-CA"}, "environmentOnly": "environmentOnly", + "contextOnly": "en-CA"}`. +- **Invalid.** `run context-and-environment-invalid`. Exit `2`. + `build-error.txt` starts with `graphql.kickstart.tools.resolver.FieldResolverError: No method found ... (optionally + followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class + scenarios.AppContext])`. +- **Misbound.** `run context-misbound`. Exit `0`. `probe.log` has 3 `SchemaClassScanner` WARNs, for `Query.users`, + `Query.contextArgument` and `User.thumbnail`, none for `Query.greeting`. The first reads `Field 'Query.users' has no + parameter for its argument 'first: Int' in scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment + parameter gets the argument instead.` All four operations have `errors=1`. `01` fails with `Parameter specified as + non-null is null`, `02` and `04` with ``Cannot construct instance of `graphql.schema.DataFetchingEnvironment` ``, and + `03-context-and-correct.json` has `data = {"contextArgument": null, "greeting": "greeting: hi ada"}` with one error, for + `/contextArgument`. Before #890 the same run has the same four errors and an empty `probe.log`. +- **Without the source.** + - `run sourceless`: exit `0`, `errors=0` for both operations. In `01-local-context.json` each image has + `imageBlob = "blob for [png, jpg]"` (`imageBlob(env)` reads the `localContext` that `images` returned), + `thumbnail = "png@64"` and `caption = "caption of cat"` (`dog` for the second). In `02-contexts.json` each image has + `owner = "ada"`, `locale = "en-CA"` and `signature = "signature by oryan"`. + - `run sourceless-shadowed`: exit `0`. `01-shadowed.json` has `name = "cat"` and `title = "with source cat"`, so the + source's `name` property wins over `getName(env)` and `title(image)` over `title(env)`. + - `run sourceless-unimplemented`: exit `0`. `probe.log` has `Missing resolver for field: FieldDefinition{name='preview'` + next to the development-only warning for `allowUnimplementedResolvers`, so `preview(env)` is not bound. `execute` + throws, so `01-helper.json` is `{"threw": "java.util.concurrent.CompletionException: kotlin.NotImplementedError: An + operation is not implemented: Schema resolver not implemented"}`. + - `run sourceless-misbound`: exit `2`. `thumbnail(GraphQLContext, env)` for `thumbnail(size: Int)` still fails the build. + The signatures listed for `scenarios/sourceless-misbound/schema.graphqls:11` end with + `scenarios.MisboundImageResolver.thumbnail(~size, )` and + `scenarios.MisboundImageResolver.getThumbnail(~size, )`. + +## Gotchas + +- Before #888 only one trailing parameter was allowed, so `context-and-environment` fails to + build on older versions with the same "No method found" error. +- Before #904 `sourceless` fails the build (exit `2`) with `No method or field found ... imageBlob` and six listed + signatures, none ending in ``. `sourceless-shadowed` and `sourceless-unimplemented` give the + same results as after it. `sourceless-misbound` still fails the build, but its error lacks the two + `(~size, )` signatures. diff --git a/.claude/skills/verify-tools/features/directives-and-relay.md b/.claude/skills/verify-tools/features/directives-and-relay.md new file mode 100644 index 00000000..5a30a8a8 --- /dev/null +++ b/.claude/skills/verify-tools/features/directives-and-relay.md @@ -0,0 +1,99 @@ +# Directives and relay connections + +SDL directives reach the user's code in three ways. A named `SchemaDirectiveWiring` registered with `.directive(name, …)` +can wrap the data fetcher of every field that carries the directive. `@deprecated(reason:)` shows up in introspection. A +field marked `@connection(for: "Member")` gets its `MemberConnection`, `MemberConnectionEdge` and `PageInfo` types +generated, so the SDL never declares them, and a resolver returning `graphql.relay.Connection` fills them. A +wiring also runs on interfaces, unions, enums and input objects, including ones that refer to themselves or each other. +The build checks every applied directive against its definition. It logs a WARN with the source line for an invalid +application, and fails for a directive with no definition unless `allowUndeclaredDirectives(true)` is set. + +## Sub-features + +- `dir-wiring-field` uppercases `@uppercase` fields on `Query` and on a nested type (`Member.name`) through a wrapped + data fetcher. +- `dir-wiring-scope` leaves fields without the directive unchanged. +- `dir-deprecated` reports `isDeprecated` and `deprecationReason` through `__type(...).fields(includeDeprecated: true)`. +- `dir-connection-types` generates `MemberConnection`, `MemberConnectionEdge` and `PageInfo` from `@connection`. +- `dir-connection-paging` returns edges with cursors and `pageInfo` from `SimpleListConnection` for `first: 2`. +- `dir-scalar` applies the directives of a scalar and its extension, runs `onScalar`, and reports `specifiedByURL` from + the SDL `@specifiedBy` or else from the provided scalar (`scalar-directives`). +- `dir-scalar-undeclared` logs a WARN for an undeclared directive on a scalar and builds the scalar without it + (`scalar-directives`). +- `dir-wiring-recursive` hands a wiring on a field of a self-referencing input object the built `GraphQLInputObjectType`, + not a `GraphQLTypeReference` (`wiring-shapes`). +- `dir-wiring-shapes` runs wirings on an interface, a union, an enum and a self-referencing object type, and lets a wiring + make a self-referencing field non-null (`wiring-shapes`). +- `dir-applied-legacy` lists every applied directive, repeats and undeclared ones included, in `appliedDirectives`, and + only the declared ones in the legacy `directives`, keeping the first of a non-repeatable directive + (`directive-drift`). +- `dir-undeclared-fails` fails the build for an applied directive with no definition unless + `allowUndeclaredDirectives(true)` is set (`directive-drift-undeclared`). +- `dir-invalid-warn` logs a WARN with the source line and column for a directive applied where its definition doesn't + allow it, without a required argument, or twice when it isn't repeatable, and still builds (`directives-invalid`). + +## Expected results + +- The members are `m1` "ada", `m2` "grace", `m3` "barbara", in that order. + +- **Run.** `run directives`. Exit `0`, `errors=0` for all three operations, and + an empty `probe.log`. +- **Wiring.** `01-uppercase.json` has `data.motto = "KEEP IT SIMPLE"` and `data.oldMotto = "move fast"`. +- **Deprecated.** `02-deprecated.json` lists `motto` and `members` with `isDeprecated: false`, and `oldMotto` with + `isDeprecated: true` and `deprecationReason: "Use motto"`. +- **Connection.** `03-connection.json` has two edges, `{"id": "m1", "name": "ADA"}` and `{"id": "m2", "name": "GRACE"}`, + with non-empty cursors. `pageInfo` has `hasNextPage: true`, `hasPreviousPage: false`, `startCursor` equal to the first + edge's cursor, and `endCursor` equal to the second's. +- **Generated types.** `schema.graphqls` has `type MemberConnection { edges: [MemberConnectionEdge] pageInfo: PageInfo }` + and `type MemberConnectionEdge { cursor: String node: Member }`, and the SDL file declares neither. +- **Scalars.** `run scalar-directives`. Exit `0` and `errors=0` for both + operations. `schema.graphqls` has `"A calendar date, wired with @since(2020-01-01), wired with @unit(day)"` above + `scalar Date @since(date : "2020-01-01") @unit(name : "day") @specifiedBy(url : "https://example.com/date")`, and + `scalar DateTime @specifiedBy(url : "https://scalars.graphql.org/andimarek/date-time")`. In `01-introspect-scalars.json`, + `Date` has `specifiedByURL: "https://example.com/date"` and `DateTime` has + `"https://scalars.graphql.org/andimarek/date-time"`. `probe.log` has exactly `Scalar 'Money' is built without its + directives from the schema: Found applied directive currency without corresponding directive definition.` +- **Wirings on cycles.** `run wiring-shapes`. Exit `0`, `errors=0` for both operations and an empty `probe.log`. + `schema.graphqls` has `"sees GraphQLInputObjectType TreeFilter"` on `TreeFilter.children`, `friend: Person! @required` + and `state: State! @required` where the SDL declares both nullable, and `"described"` above `Named`, `Someone`, + `Person`, `State` and `TreeFilter`. `01-trees.json` has `data.trees = 4`. `02-person.json` has + `data.person = {"name": "ada", "friend": {"name": "ada"}, "state": "ALIVE", "someone": {"name": "ada"}}` and + `data.someone = {"name": "grace"}`. +- **Applied and legacy lists.** `run directive-drift`. Exit `0` and `schema build: OK`, with no operations. In + `inspect.txt`, `input field Meta.owner` has two `applied @once` (`reason` `"x"`, then `"because"`) and one `legacy @once` + with `reason = "x"`. `field Query.search` has two `applied @undeclared`, the first with arguments typed from their + literals (`i: Int`, `f: Float`, `b: Boolean`, `l: [Int]`), and no legacy one. `enum value Color.BLUE` has + `applied @deprecated` and `applied @undeclared` but only `legacy @deprecated`. +- **Drift warnings.** `probe.log` of `directive-drift` has 12 `SchemaParser` WARNs. Six are `isn't repeatable but is applied + more than once`, two are an extension of `Date` or `Query` applying `@once` again, two are `is missing its required + argument` (`@tag` and `@needs`), one is `Directive @fieldOnly at line 38, column 28 in + scenarios/directive-drift/schema.graphqls is applied to ARGUMENT_DEFINITION, but it's declared on FIELD_DEFINITION.`, and + one is `Scalar 'Money' is built without its directives from the schema: Found an unexpected directive argument tag#nam .` + None names `@undeclared`, because `directive-drift` sets `allowUndeclaredDirectives(true)`. +- **Undeclared.** `run directive-drift-undeclared`. Exit `2`. `summary.txt` has `schema build: FAILED + graphql.kickstart.tools.SchemaError: Found applied directive undeclared without corresponding directive definition.`, + and `build-error.txt` starts with the same message. +- **Invalid applications.** `run directives-invalid`. Exit `0` and `errors=0`. `01-query.json` has + `data.motto = "KEEP IT SIMPLE"`, so the misplaced `@uppercase` still wires. `probe.log` has exactly 5 `SchemaParser` + WARNs, each naming its line and column in `scenarios/directives-invalid/schema.graphqls`. + `Directive @uppercase at line 12, column 20 ... is applied to FIELD_DEFINITION, but it's declared on OBJECT.` + `Directive @deprecated at line 17, column 13 ... is applied to OBJECT, but it's declared on FIELD_DEFINITION | + ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION.` + `Directive @auth at line 13, column 20 ... is missing its required argument 'role'.` Two + `Directive @cached at line ... isn't repeatable but is applied more than once`, at line 14, column 32 (the second + `@cached` on `members`) and line 9, column 15 (`extend schema`). + +## Gotchas + +- `@connection` must be declared in the SDL like any applied directive. Without a definition, the build throws + `SchemaError: Found applied directive connection without corresponding directive definition.` unless + `allowUndeclaredDirectives(true)` is set. +- The uppercased `ADA` and `GRACE` names also prove the wiring reached a nested type's field. Lowercase names there mean + the wiring only ran on `Query`. +- `@since(2020-01-01)` proves `onScalar` reads an argument typed by the scalar the directive is applied to. `@since(null)` + means the wiring saw a type reference. +- Cursors are base64 of `simple-cursor` from graphql-java's `SimpleListConnection`. Don't hard-code them across + graphql-java versions. +- Before #895 (commit 21f3796e) `wiring-shapes` has the same `schema.graphqls`, except that `TreeFilter.children` reads + `"sees GraphQLTypeReference TreeFilter"`. +- Before #885 (commit 94a98a01) `directives-invalid` has an empty `probe.log` and the same `01-query.json`. diff --git a/.claude/skills/verify-tools/features/generic-wrappers.md b/.claude/skills/verify-tools/features/generic-wrappers.md new file mode 100644 index 00000000..88211778 --- /dev/null +++ b/.claude/skills/verify-tools/features/generic-wrappers.md @@ -0,0 +1,58 @@ +# Generic wrappers + +A resolver can return a value in a wrapper type registered with `genericWrappers(...)`, such as the scenario's `Try`, or +in a `CompletableFuture`, while the schema declares the plain type. The wrappers can sit inside a list or inside each +other, as in `List>` or `CompletableFuture>>`. graphql-java-tools unwraps every level, maps +the lists, and combines the futures below the outermost value into one, so one failed element fails the whole field. + +## Sub-features + +- `wrap-list` unwraps a `List>` into `[Payload!]!` and a `List>` into `[String!]!`. +- `wrap-future-list` unwraps a `List>` into `[Item]` and a + `List>` into `[String]`, including the futures that `DataLoader.load` returns. +- `wrap-nested` unwraps a `CompletableFuture>`, a `CompletableFuture>>` and + a `List>>`. +- `wrap-failed-element` fails the whole field, with the element's message, when one `Try` or future in a list failed. +- `wrap-controls` keeps a `List` and a `CompletableFuture>` working. +- `wrap-unboxer` gives the same results when the app's own `ValueUnboxer` already unwraps `Try` and joins futures + (`nested-wrappers-unboxer`). +- `wrap-suspend` builds and resolves suspend functions returning `List>` for `[Item]` and + `[Item!]!`, and `List` for `[String]`. The return type of a suspend function carries the wildcard + `List>` (`nested-wrappers-suspend`). + +## Expected results + +- **Run.** `run nested-wrappers`. Exit `0` and an empty `probe.log`. `summary.txt` has `errors=0` for `01` to `09` and `12`, + and `errors=1` for `10-failed-try-in-list` and `11-failed-future-in-list`. +- **Lists of wrappers.** `02-payloads.json` has `data.payloads = [{"data": "a"}, {"data": "b"}]` and + `03-payload-strings.json` has `data.payloadStrings = ["a", "b"]`. `04-items.json` has + `data.items = [{"id": "1"}, {"id": "2"}]`, one future already complete and one from `supplyAsync`, and + `05-item-names.json` has `data.itemNames = ["one", "two"]`. +- **Nested wrappers.** `06-future-of-future.json` has `data.futureOfFuture = {"id": "inner"}`. `07-future-of-tries.json` + has `data.futureOfTries = [{"data": "a"}, {"data": "b"}]` and `08-tries-of-futures.json` has + `data.triesOfFutures = [{"id": "1"}, {"id": "2"}]`. `09-loaded-items.json` has + `data.loadedItems = [{"id": "x"}, {"id": "y"}]`. +- **Failed element.** `10-failed-try-in-list.json` has `data.failedTryInList = null` and one error, + `Exception while fetching data (/failedTryInList) : payload failed`. `11-failed-future-in-list.json` has + `data.failedFutureInList = null` and one error, `Exception while fetching data (/failedFutureInList) : item failed`. +- **Controls.** `12-controls.json` has `data.plainItems = [{"id": "p1"}, {"id": "p2"}]` and `data.futureOfItems` equal to + it. +- **Unboxer.** `run nested-wrappers-unboxer`. Exit `0`. It runs the operations of `nested-wrappers`. The errors per + operation in `summary.txt` and every `.json` match the ones of `nested-wrappers`. +- **Suspend.** `run nested-wrappers-suspend`. Exit `0`, `errors=0` for all three operations and an empty `probe.log`. + `01-nullable-items.json` has `data.nullableItems = [{"id": "1"}, {"id": "2"}]`, `02-non-null-items.json` has the same + list as `data.nonNullItems`, and `03-type-variable-strings.json` has `data.typeVariableStrings = ["a", "b"]`. + +## Gotchas + +- Before #903 (commit a4736c9a) `nested-wrappers` still exits `0`. `02`, `07`, `08` and `10` have an error per element, + `Expected source object to be an instance of '' but instead got 'scenarios.Try$Success'`, and `04`, `06`, `09` + and `11` the same with `'java.util.concurrent.CompletableFuture'`. `03-payload-strings.json` has + `["Success(value=a)", "Success(value=b)"]` and `05-item-names.json` has + `java.util.concurrent.CompletableFuture@[Completed normally]` strings, both with `errors=0`. +- Before #903 `nested-wrappers-suspend` fails the build (exit `2`) with `SchemaClassScannerError: Two different classes used + for type Item`, naming `java.util.concurrent.CompletableFuture` for `nullableItems` and + `scenarios.NestedItem` for `nonNullItems`. +- Before #903 `nested-wrappers-unboxer` had `errors=0` for `01` to `09`, because the app's `ValueUnboxer` did the + unwrapping. `10` and `11` were `THREW java.lang.IllegalStateException` in `summary.txt`, with `{"threw": ...}` in the + JSON, because the failed element's exception left `execute`. Now they return `errors=1` like `nested-wrappers`. diff --git a/.claude/skills/verify-tools/features/interfaces-and-unions.md b/.claude/skills/verify-tools/features/interfaces-and-unions.md new file mode 100644 index 00000000..58bfe3fb --- /dev/null +++ b/.claude/skills/verify-tools/features/interfaces-and-unions.md @@ -0,0 +1,41 @@ +# Interfaces and unions + +A field can return an interface or a union while the resolver returns a supertype (`Entity`, `Any`). graphql-java-tools +can't learn the concrete classes from those return types, so the user registers them with `.dictionary(...)`. At runtime +the object's class decides the GraphQL type. When the class name differs from the type, the user registers it with an +explicit name: `.dictionary("Writer", WriterEntity::class.java)`. + +## Sub-features + +- `poly-interface` resolves `node(id): Node` to `Novel` or `Writer` from the returned class. +- `poly-union` resolves each element of `[SearchResult!]!` (`Novel | Writer`) from a `List`. +- `poly-dictionary-name` maps the type `Writer` to the class `WriterEntity` by an explicit dictionary name. +- `poly-dictionary-class` maps `Novel` to the class `Novel` by `.dictionary(Novel::class.java)`. +- `nested-union` builds `union Result = Book | Media` with `union Media = Movie` when no field returns `Media`, and flattens + `Result` to `Book | Movie` (scenario `nested-unions`). + +## Expected results + +- The data is `Novel("n1", "Solaris")` and `WriterEntity("w1", "Stanisław Lem")`. + +- **Run.** `run polymorphism`. Exit `0`, `errors=0` for both operations, and an + empty `probe.log`. A dictionary warning there means an entry went unused. +- **Interface.** `01-node.json` has `data.novel = {"__typename": "Novel", "id": "n1", "title": "Solaris"}` and + `data.writer = {"__typename": "Writer", "name": "Stanisław Lem"}`. +- **Union.** `02-union.json` has `data.search` equal to `[{"__typename": "Novel", "title": "Solaris"}, + {"__typename": "Writer", "name": "Stanisław Lem"}]`. +- **Schema.** `schema.graphqls` has `union SearchResult = Novel | Writer` and both types implementing `Node`. +- **Nested union.** `run nested-unions`. Exit `0`, `errors=0` and an empty + `probe.log`. `01-results.json` has `data.results` equal to `[{"__typename": "Book", "title": "Solaris"}, + {"__typename": "Movie", "title": "Stalker"}]`, the `Movie` reached through `... on Media`. `schema.graphqls` has + `union Media = Movie` and `union Result = Book | Movie`. + +## Gotchas + +- Without `.dictionary(Novel::class.java)`, the build fails (exit `2`) with `SchemaClassScannerError: Object type + 'Novel' implements a known interface, but no class could be found for that type name.` To prove a dictionary change, + use a separate scenario, because this one must keep building. +- `nested-unions` fails to build (exit `2`) on checkouts without #887, with `No object type found with name 'Media' for + union`. +- `__typename` is the assertion that matters. Fields selected through the wrong inline fragment are silently absent, not + errors. diff --git a/.claude/skills/verify-tools/features/optional-data-fetcher-results.md b/.claude/skills/verify-tools/features/optional-data-fetcher-results.md new file mode 100644 index 00000000..cf89577f --- /dev/null +++ b/.claude/skills/verify-tools/features/optional-data-fetcher-results.md @@ -0,0 +1,35 @@ +# DataFetcherResult inside an Optional + +A resolver can return `Optional>` for a nullable field. graphql-java gets the `DataFetcherResult`, so +the field resolves its data and the query keeps its errors. An empty `Optional` resolves to null. A `DataFetcherResult` or an +`Optional` twice in one value fails the build. + +## Sub-features + +- `opt-result` resolves `Optional>` for `Payload` with its error, and + `Optional>` for `String`. +- `opt-result-empty` resolves `Optional.empty()` to null. +- `opt-result-mixed` builds when the same object type is also returned as a `DataFetcherResult>`. +- `opt-result-list` resolves `Optional>>` for `[Payload]`. +- `opt-result-nested` rejects `Optional>>`. + +## Expected results + +- **Run.** `run optional-results`. Exit `0` and an empty `probe.log`. `01-optional-result.json` has + `data.optionalResult = {"data": "a"}` and one error, `partial`. `02-optional-result-name.json` has + `data.optionalResultName = "a"` and `03-empty-optional-result.json` has `data.emptyOptionalResult = null`, both without + errors. +- **Mixed.** `run optional-results-mixed`. Exit `0`. `01-optional-result.json` matches the one above and + `02-result-of-optional.json` has `data.resultOfOptional = {"data": "a"}`. +- **List.** `run optional-results-list`. Exit `0`. `01-optional-result-list.json` has + `data.optionalResultList = [{"data": "a"}, {"data": "b"}]`. +- **Nested.** `run optional-results-nested`. Exit `2`. `build-error.txt` ends in + `graphql.execution.DataFetcherResult cannot be nested within itself`. + +## Gotchas + +- Before the fix (master 3f022b91) `optional-results` still exits `0`. `01` has + `data.optionalResult = {"data": "scenarios.OptionalResultsPayload@"}` with no error, and `02` has + `"DataFetcherResult{data=a, errors=[], localContext=null, extensions=null}"`. `optional-results-mixed` exits `2` with + `Two different classes used for type Payload`, `optional-results-list` exits `2` with `Java class is not a List or generic + type information was lost`, and `optional-results-nested` exits `0` with the same `Payload@` string. diff --git a/.claude/skills/verify-tools/features/proxies.md b/.claude/skills/verify-tools/features/proxies.md new file mode 100644 index 00000000..b446eb25 --- /dev/null +++ b/.claude/skills/verify-tools/features/proxies.md @@ -0,0 +1,36 @@ +# Proxied resolvers + +A resolver wrapped in a Spring AOP proxy is scanned as its target class through `Spring4AopProxyHandler`. A CGLIB proxy +(`proxyTargetClass = true`) subclasses the target, so its methods work. A JDK dynamic proxy only implements the target's +interfaces, so every query of a field that resolves to the target's own method or field fails, and the build logs a +warning per field that suggests class-based proxies, plus a getter for a field. + +## Sub-features + +- `proxy-jdk-warning` logs a WARN per field that a JDK proxy can't call, naming the type, field, member and proxy class. +- `proxy-jdk-field-getter` suggests adding a getter when the field resolves to a public field. +- `proxy-jdk-query` still fails each such field at query time. +- `proxy-cglib` serves methods and getters through a CGLIB proxy with no warning, but a public field reads `0`. +- `proxy-plain` serves the same resolver without a proxy and with no warning. + +## Expected results + +- **JDK proxy.** `run jdk-proxy`. Exit `0`. `probe.log` has three + `SchemaClassScanner` WARNs starting `Field 'Query.test'`, `Field 'Query.count'` and `Field 'Query.total'`. The + `count` one ends `Add a getter for the field and use class-based proxies, e.g. proxyTargetClass = true in Spring.`, the + other two end `Use class-based proxies instead, e.g. proxyTargetClass = true in Spring.` `01-query.json` has + `data = {"test": null, "count": null, "total": null}` and three errors, `object of type jdk.proxy2.$ProxyN is not an + instance of scenarios.ProxiedQuery` for `test` and `total`, and `Can not get final int field scenarios.ProxiedQuery.count` + for `count`. +- **CGLIB proxy.** `run jdk-proxy-cglib`. Exit `0`, empty `probe.log`, + `01-query.json` has `data = {"test": "ok", "count": 0, "total": 2}`. +- **No proxy.** `run jdk-proxy-plain`. Exit `0`, empty `probe.log`, + `01-query.json` has `data = {"test": "ok", "count": 1, "total": 2}`. + +## Gotchas + +- The warning shipped with #853. On a checkout without it, `jdk-proxy` has the same query errors and an empty `probe.log`. +- The proxy number in `jdk.proxy2.$ProxyN` varies between runs. +- CGLIB can't override `final` members, so the resolver and its members must be `open`. A final getter is called on the + proxy itself and reads the proxy's empty field, like `count` does. +- The three scenarios share the schema and operations in `scenarios/jdk-proxy/`. diff --git a/.claude/skills/verify-tools/features/schema-building.md b/.claude/skills/verify-tools/features/schema-building.md new file mode 100644 index 00000000..177aa820 --- /dev/null +++ b/.claude/skills/verify-tools/features/schema-building.md @@ -0,0 +1,53 @@ +# Schema building + +A user points `SchemaParser.newParser()` at SDL files on the classpath and hands it resolver objects. graphql-java-tools +matches every SDL type to a class and every field to a resolver method, getter or property, and returns an executable +`GraphQLSchema`. When it can't find a field's implementation, it fails the build with a message that lists every +signature it tried. Types no root can reach get a warning and are dropped from the schema. + +## Sub-features + +- `build-files` loads SDL with `.file()` and `.files()` from the classpath, including `extend type`. +- `build-root-resolver` resolves `Query` fields through a `GraphQLQueryResolver`'s methods, with and without arguments. +- `build-nested-resolver` resolves a field through a `GraphQLResolver` method that takes the parent object. +- `build-properties` resolves fields through Kotlin properties and an `isX()` getter for a `Boolean!` field. +- `build-scalar` serializes a custom `GraphQLScalarType` registered with `.scalars()`. +- `build-unused-type` warns about a type no root can reach and leaves it out of the schema. +- `build-missing-resolver` fails the build with `FieldResolverError` and lists the signatures it searched. +- `build-read-only` builds a schema without mutation and subscription through `parseSchemaObjects().toReadOnlySchema()`, + with interfaces, unions and custom directives working as in the full schema. + +## Expected results + +- The `bookstore` books are `b1` "The Dispossessed" (a1, stock 3), `b2` "The Left Hand of Darkness" (a1, + stock 0) and `b3` "Use of Weapons" (a2, stock 1), and authors `a1` "Ursula K. Le Guin" and `a2` "Iain M. Banks". + +- **Build and list.** `run bookstore`. Exit `0`, and `summary.txt` has + `schema build: OK`, `unused definitions: Review`, and `operation 01-books: errors=0`. +- **Root, nested, properties, scalar.** In `01-books.json`, `data.books` has 3 entries in id order. `b1` has + `"published": "1974-05-01"` and `"inStock": true`, `b2` has `"inStock": false`, and every `author.name` matches the data + above. +- **Argument and null result.** `02-book-by-id.json` (variables `{"id": "b3"}`) has + `data.book = {"title": "Use of Weapons", "author": {"id": "a2", "name": "Iain M. Banks"}}` and `data.missing = null`, + with no `errors`. +- **Unused type.** `probe.log` contains `Schema type was defined but can never be accessed, and can be safely deleted: + Review`. `schema.graphqls` has no `type Review`. +- **Missing resolver.** `run bookstore-missing-resolver`. Exit `2`. `summary.txt` + has `schema build: FAILED graphql.kickstart.tools.resolver.FieldResolverError: No method or field found as defined in + schema scenarios/bookstore-missing-resolver/extension.graphqls:2`. The 8 listed signatures start with + `scenarios.AuthorResolver.isbn(scenarios.Book)`, have `scenarios.Book.isbn` sixth, and end with + `scenarios.AuthorResolver.getIsbn()`. `build-error.txt` has the stack trace. +- **Read-only schema.** `run read-only-schema`. Exit `0` and all three operations + have `errors=0`. `01-interface.json` has `data.animal = {"__typename": "Cat", "name": "Tom", "lives": 9}`, + `02-union.json` lists `Dog` Rex then `Cat` Tom, and `03-no-mutation.json` has `mutationType: null`. `schema.graphqls` + has `directive @tag` and `@tag(name : "public")` on the three `name` fields. Before the #896 fix the build failed with + `AssertException: There must be a type resolver for interface Animal`. + +## Gotchas + +- `bookstore-missing-resolver` loads `bookstore/schema.graphqls` too, so a change that breaks `bookstore` shows up here + first as a different build error. Run `bookstore` first. +- The signature list in the error is in search priority order. A change to resolver lookup order shows up there before + anything fails. +- `schema.graphqls` also lists graphql-java's built-in directives (`@defer`, `@oneOf`, ...). Their presence depends on + the graphql-java version, not on graphql-java-tools. diff --git a/.claude/skills/verify-tools/features/schema-options.md b/.claude/skills/verify-tools/features/schema-options.md new file mode 100644 index 00000000..94674e96 --- /dev/null +++ b/.claude/skills/verify-tools/features/schema-options.md @@ -0,0 +1,21 @@ +# Schema parser options + +`SchemaParserOptions` changes how the schema is built and what clients can see. A `missingResolverDataFetcherProvider` +builds a data fetcher for fields that have no resolver, where the build would otherwise fail. + +## Sub-features + +- `opt-missing-resolver-provider` serves a field that has no resolver method or property from the provider's data fetcher. + +## Expected results + +- **Run.** `run options`. Exit `0`. `summary.txt` has `01-fields: errors=0`. +- **Fields and typename.** `01-fields.json` has `data = {"name": "tools", "unimplemented": "no resolver for + unimplemented", "__typename": "Query"}`. + +## Gotchas + +- The provider doesn't log `Missing resolver for field`. Only `allowUnimplementedResolvers(true)` does, and it also logs + a development-only warning. Don't expect either in `probe.log` for this scenario. +- `missingResolverDataFetcher(...)` is the deprecated predecessor of the provider. Prove changes to it in a separate + scenario so this one stays free of deprecated API. diff --git a/.claude/skills/verify-tools/features/type-extensions.md b/.claude/skills/verify-tools/features/type-extensions.md new file mode 100644 index 00000000..51361af7 --- /dev/null +++ b/.claude/skills/verify-tools/features/type-extensions.md @@ -0,0 +1,62 @@ +# Type extensions + +`extend type`, `extend interface`, `extend union`, `extend enum`, `extend input` and `extend scalar` add to the type they +extend: fields, interfaces, members, values and directives are merged into one graphql-java type, base first. Where a type +declares an enum value, interface field or union member twice, or an extension applies a non-repeatable directive again, +the first one is kept and a WARN is logged. An object or input field declared twice keeps the last declaration, the type's +own for an input since its extensions are applied first, and logs a WARN that names that declaration. An extension of a different kind than its type is ignored with a WARN. A union, +enum, interface or scalar that only has extensions is built from them. + +## Sub-features + +- `ext-interface-fields` merges the fields of `extend interface`, keeping the base `id` and its description. +- `ext-implements` makes `extend type Video implements Node` take effect. +- `ext-union-members` merges the members of `extend union`. +- `ext-enum-values` merges the values of `extend enum`, keeping the base description of a repeated value. +- `ext-lone-enum` builds an enum that only has extensions, from all of them. +- `ext-directives` applies the directives of every extension after those of the type. +- `ext-non-repeatable` keeps the first of a non-repeatable directive that an extension applies again, with a WARN. +- `ext-repeats` warns about a repeated interface field, union member and enum value. +- `ext-repeated-fields` warns about an object or input field declared twice, between a type and its extension, between + two extensions and inside one definition, and keeps the last declaration, the type's own for an input. +- `ext-other-kind` ignores `extend union Note` of `type Note` with a WARN. +- `ext-sealed` finds the class of a union member added by `extend union`, and of an implementor added by + `extend type X implements Y`, among the subclasses of a sealed class or interface. + +## Expected results + +- **Run.** `run type-extensions`. Exit `0`, and `errors=0` for all three + operations. +- **Fields and implements.** `01-node.json` has `article` with `createdAt = "2026-10-01"` and `title = "We launched"`, and + `video` with `__typename = "Video"` and `seconds = 90`. +- **Members, values, lone enum.** `02-search-and-enums.json` has `search` with an `Article` and a `Video`, + `colors = ["RED", "BLUE", "GREEN"]` and `shades = ["LIGHT", "DARK"]`. +- **Shape.** In `03-introspection.json`, `Node` has fields `id` ("The base id"), `createdAt`, `name`. `Video` has + interfaces `["Node"]`, `SearchResult` has possible types `["Article", "Video"]`, and `Color.RED` has the description + "The first red". +- **Directives.** `schema.graphqls` has `@tag(name : "base") @tag(name : "extension")` on `Node`, `SearchResult`, `Color`, + `Filter` and `Article`, and `Article` has `@owner(team : "content")` once, before its `@tag`s. +- **Warnings.** `probe.log` has one WARN each for `Type 'Note' is defined as an object type, but extended as a union`, + `@owner isn't repeatable`, `Type 'Node' declares field 'id'`, `Type 'SearchResult' declares member 'Article'` and + `Type 'Color' declares value 'RED'`. +- **Repeated fields.** `run type-extensions-repeated-fields`. Exit `0`, `errors=0` for both operations, and the same + schema, operation results and `inspect.txt` as master. `01-kept-declarations.json` has `typeAndExtension.name = "a"`, + `twoExtensions = {"id": "b", "name": "c"}`, `oneDefinition.name = "d"` and `echo = "1,t,2,3"`. `inspect.txt` has + `TypeAndExtension.name: From the extension`, `TwoExtensions.name: From the second extension`, + `OneDefinition.name: The second`, `InputTypeAndExtension.id: From the type`, + `InputTwoExtensions.id: From the second extension` and `InputOneDefinition.id: The second`. `probe.log` has exactly six + WARNs, one per type, each `Type '' declares field '' more than once, only the one at line , column 5 in + scenarios/type-extensions-repeated-fields/schema.graphqls is kept.` with lines 18 (`TypeAndExtension`), 32 + (`TwoExtensions`), 39 (`OneDefinition`), 44 (`InputTypeAndExtension`), 63 (`InputTwoExtensions`) and 70 + (`InputOneDefinition`). On master `probe.log` is empty. +- **Sealed.** `run type-extensions-sealed`. `01-pets-and-animals.json` has + `pets = [{"__typename": "Dog", "name": "Rex"}, {"__typename": "Cat", "lives": 9}]` and `animals` with a `Cow` and a + `Horse`, with no WARN in `probe.log`. + +## Gotchas + +- Before extensions were merged (master before PR #855), `type-extensions` still builds but `01` and `02` return errors: + `Node` loses `createdAt`, `Video` isn't a `Node`, and `BLUE` and `LIGHT` fail to serialize. `type-extensions-sealed` + fails validation with `Unknown type 'Dog'`. Use that as the contrast run, not as a regression in this map. +- graphql-java allows only one `__type` per introspection query, so `03` reads `__schema` instead. +- The `Note` type is unreachable on purpose, so the "can be safely deleted" WARN for it is expected. diff --git a/.claude/skills/verify-tools/probe.sh b/.claude/skills/verify-tools/probe.sh new file mode 100755 index 00000000..b5f69a5b --- /dev/null +++ b/.claude/skills/verify-tools/probe.sh @@ -0,0 +1,177 @@ +#!/usr/bin/env bash +# Drives graphql-java-tools the way a consuming app does: installs the current directory's checkout into a private local +# Maven repository, compiles the probe project in probe/ against it, builds a scenario's schema and runs its operations. +# See SKILL.md for the commands. Evidence goes to $TMPDIR/verify-tools/evidence/ and survives `clean`. +set -euo pipefail + +SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO="$(git rev-parse --show-toplevel 2>/dev/null)" || REPO="$(git -C "$SKILL_DIR" rev-parse --show-toplevel)" +ROOT="${TMPDIR:-/tmp}" +ROOT="${ROOT%/}/verify-tools" +KEY="$(basename "$REPO")-$(printf '%s' "$REPO" | sha256sum | cut -c1-8)" +WORK="$ROOT/work/$KEY" +M2="$WORK/m2" +TAIL_M2="$HOME/.m2/repository" +EVIDENCE_ROOT="$ROOT/evidence" +STAMP="$WORK/installed.stamp" + +die() { echo "probe: $*" >&2; exit 1; } + +pom_value() { sed -n "s:.*<$1>\(.*\).*:\1:p" "$REPO/pom.xml" | head -1; } +TOOLS_VERSION="$(pom_value version)" +KOTLIN_VERSION="$(pom_value kotlin.version)" + +# Identifies the library sources: HEAD plus any uncommitted change to pom.xml or src/, tracked or not +fingerprint() { + { + git -C "$REPO" rev-parse HEAD + git -C "$REPO" diff HEAD -- pom.xml src + git -C "$REPO" ls-files --others --exclude-standard -- src | while IFS= read -r file; do + echo "$file" + cat "$REPO/$file" + done + } | sha256sum | cut -c1-16 +} + +installed_jar() { echo "$M2/io/github/graphql-java-kickstart/graphql-java-tools/$TOOLS_VERSION/graphql-java-tools-$TOOLS_VERSION.jar"; } + +install_state() { + if [[ ! -f "$STAMP" || ! -f "$(installed_jar)" ]]; then echo missing + elif [[ "$(cat "$STAMP")" == "$(fingerprint)" ]]; then echo fresh + else echo stale + fi +} + +lock() { + mkdir -p "$WORK" + if ! mkdir "$WORK/lock" 2>/dev/null; then + local pid + pid="$(cat "$WORK/lock/pid" 2>/dev/null || true)" + if [[ -n "$pid" ]] && kill -0 "$pid" 2>/dev/null; then + die "another probe run (pid $pid) is using $WORK; wait for it instead of sharing the work dir" + fi + rm -rf "$WORK/lock" + mkdir "$WORK/lock" + fi + echo $$ > "$WORK/lock/pid" + trap 'rm -rf "$WORK/lock"' EXIT +} + +mvn_isolated() { + mvn -B "-Dmaven.repo.local=$M2" "-Dmaven.repo.local.tail=$TAIL_M2" "$@" +} + +cmd_install() { + local fp log + fp="$(fingerprint)" + log="$WORK/install.log" + echo "probe: installing $TOOLS_VERSION from $REPO into $M2 (log: $log)" + if ! (cd "$REPO" && mvn_isolated install -DskipTests > "$log" 2>&1); then + grep -E '^\[ERROR\]' "$log" | head -30 >&2 || true + die "install failed, see $log" + fi + echo "$fp" > "$STAMP" + echo "probe: installed $(installed_jar)" +} + +cmd_doctor() { + local state lock_state="free" + state="$(install_state)" + if [[ -f "$WORK/lock/pid" ]] && kill -0 "$(cat "$WORK/lock/pid")" 2>/dev/null; then + lock_state="held by pid $(cat "$WORK/lock/pid")" + fi + echo "checkout: $REPO" + echo "branch: $(git -C "$REPO" rev-parse --abbrev-ref HEAD) @ $(git -C "$REPO" rev-parse --short HEAD)" + echo "tools version: $TOOLS_VERSION (kotlin $KOTLIN_VERSION)" + echo "work dir: $WORK" + echo "install: $state ($(installed_jar))" + echo "lock: $lock_state" + echo "evidence: $EVIDENCE_ROOT" + echo "java: $(java -version 2>&1 | head -1)" + echo "maven: $(mvn -v 2>/dev/null | head -1)" + [[ -d "$TAIL_M2" ]] || echo "WARNING: $TAIL_M2 does not exist, every dependency will be downloaded into the work dir" + [[ "$state" == "fresh" ]] || echo "note: run installs the checkout first because the install is $state" +} + +cmd_list() { + grep -h 'override val name = ' "$SKILL_DIR"/probe/src/main/kotlin/scenarios/*.kt | sed 's/.*= "\(.*\)"/\1/' +} + +cmd_run() { + local scenario="" gj="" skip_install=false + while [[ $# -gt 0 ]]; do + case "$1" in + --graphql-java) gj="$2"; shift 2 ;; + --skip-install) skip_install=true; shift ;; + -*) die "unknown option $1" ;; + *) [[ -z "$scenario" ]] || die "one scenario per run"; scenario="$1"; shift ;; + esac + done + [[ -n "$scenario" ]] || die "usage: probe.sh run [--graphql-java VERSION] [--skip-install]" + cmd_list | grep -qx "$scenario" || die "unknown scenario '$scenario', known: $(cmd_list | tr '\n' ' ')" + + lock + local state + state="$(install_state)" + if [[ "$state" != "fresh" ]]; then + if [[ "$skip_install" == true && "$state" == "stale" ]]; then + echo "probe: WARNING install is stale, running against the previously installed jar" + else + cmd_install + fi + fi + + local evidence base n=1 build mvn_args=() exit_code + base="$EVIDENCE_ROOT/$(date +%Y%m%d-%H%M%S)-$scenario${gj:+-gj$gj}" + evidence=$base + build="$WORK/probe-target${gj:+-gj$gj}" + mkdir -p "$EVIDENCE_ROOT" + # Another checkout can start the same scenario in the same second + until mkdir "$evidence" 2>/dev/null; do + n=$((n + 1)) + evidence="$base-$n" + done + mvn_args=(-f "$SKILL_DIR/probe/pom.xml" "-Dtools.version=$TOOLS_VERSION" "-Dkotlin.version=$KOTLIN_VERSION" + "-Dprobe.build.dir=$build" "-Dmdep.outputFile=$build/classpath.txt") + [[ -z "$gj" ]] || mvn_args+=("-Dgraphql-java.version=$gj") + # resources:resources only copies, so an operation deleted from a scenario would keep running + rm -rf "$build"/classes/scenarios/*/ + if ! mvn_isolated "${mvn_args[@]}" compile dependency:build-classpath > "$evidence/maven.log" 2>&1; then + grep -E '^\[ERROR\]|^e: ' "$evidence/maven.log" | head -30 >&2 || true + die "probe compile failed, see $evidence/maven.log" + fi + + { + echo "checkout: $REPO" + echo "commit: $(git -C "$REPO" rev-parse HEAD)" + echo "source fingerprint: $(fingerprint)" + echo "install stamp: $(cat "$STAMP")" + echo "command: probe.sh run $scenario${gj:+ --graphql-java $gj}" + } > "$evidence/run.txt" + + set +e + java "-Dprobe.out=$evidence" -cp "$build/classes:$(cat "$build/classpath.txt")" probe.MainKt "$scenario" "$evidence" \ + 2> "$evidence/stderr.txt" | tee "$evidence/stdout.txt" + exit_code="${PIPESTATUS[0]}" + set -e + echo "exit code: $exit_code" >> "$evidence/run.txt" + echo "probe: exit $exit_code, evidence in $evidence" + return "$exit_code" +} + +cmd_clean() { + if [[ -f "$WORK/lock/pid" ]] && kill -0 "$(cat "$WORK/lock/pid")" 2>/dev/null; then + die "a probe run (pid $(cat "$WORK/lock/pid")) is still using $WORK" + fi + rm -rf "$WORK" + echo "probe: removed $WORK; evidence kept in $EVIDENCE_ROOT" +} + +case "${1:-}" in + install) lock; cmd_install ;; + doctor) cmd_doctor ;; + list) cmd_list ;; + run) shift; cmd_run "$@" ;; + clean) cmd_clean ;; + *) echo "usage: probe.sh {doctor|list|install|run [--graphql-java VERSION] [--skip-install]|clean}" >&2; exit 64 ;; +esac diff --git a/.claude/skills/verify-tools/probe/pom.xml b/.claude/skills/verify-tools/probe/pom.xml new file mode 100644 index 00000000..c17028ce --- /dev/null +++ b/.claude/skills/verify-tools/probe/pom.xml @@ -0,0 +1,95 @@ + + + + 4.0.0 + + verify + graphql-java-tools-probe + 0 + + + UTF-8 + + UNSET + 2.3.10 + ${project.basedir}/target + + + + + io.github.graphql-java-kickstart + graphql-java-tools + ${tools.version} + + + + com.fasterxml.jackson.core + jackson-databind + 2.22.4 + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + org.springframework + spring-aop + 5.3.39 + + + ch.qos.logback + logback-classic + 1.6.5 + + + + + + + graphql-java-override + + + graphql-java.version + + + + + + com.graphql-java + graphql-java + ${graphql-java.version} + + + + + + + + ${probe.build.dir} + src/main/kotlin + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + 11 + + + + compile + + compile + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.8.1 + + + + diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt new file mode 100644 index 00000000..0c622e39 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt @@ -0,0 +1,65 @@ +package probe + +import graphql.language.AstPrinter +import graphql.language.Node +import graphql.schema.GraphQLAppliedDirective +import graphql.schema.GraphQLArgument +import graphql.schema.GraphQLDirective +import graphql.schema.GraphQLDirectiveContainer +import graphql.schema.GraphQLEnumType +import graphql.schema.GraphQLFieldsContainer +import graphql.schema.GraphQLInputObjectType +import graphql.schema.GraphQLNamedType +import graphql.schema.GraphQLSchema +import graphql.schema.GraphQLTypeUtil +import graphql.schema.InputValueWithState + +/** Lists the applied and the legacy directives of every element that can carry them, in a stable order. */ +fun dumpDirectives(schema: GraphQLSchema): String = buildString { + @Suppress("DEPRECATION") + section("schema", schema.schemaAppliedDirectives, schema.schemaDirectives) + schema.directives.sortedBy { it.name }.forEach { definition -> + definition.arguments.forEach { container("directive @${definition.name}(${it.name})", it) } + } + schema.allTypesAsList.filter { !it.name.startsWith("__") }.sortedBy { it.name }.forEach { type -> + if (type is GraphQLDirectiveContainer) container("type ${type.name}", type) + when (type) { + is GraphQLFieldsContainer -> type.fieldDefinitions.forEach { field -> + container("field ${type.name}.${field.name}", field) + field.arguments.forEach { container("argument ${type.name}.${field.name}(${it.name})", it) } + } + is GraphQLInputObjectType -> type.fieldDefinitions.forEach { container("input field ${type.name}.${it.name}", it) } + is GraphQLEnumType -> type.values.forEach { container("enum value ${type.name}.${it.name}", it) } + } + } +} + +@Suppress("DEPRECATION") +private fun StringBuilder.container(label: String, element: GraphQLDirectiveContainer) = + section(label, element.appliedDirectives, element.directives) + +private fun StringBuilder.section(label: String, applied: List, legacy: List) { + if (applied.isEmpty() && legacy.isEmpty()) return + appendLine(label) + applied.forEach { directive -> + appendLine(" applied @${directive.name} description=${directive.description} definition=${directive.definition?.sourceLocation?.let { "${it.line}:${it.column}" }}") + directive.arguments.forEach { + appendLine(" ${it.name}: ${GraphQLTypeUtil.simplePrint(it.type)} = ${describe(it.argumentValue)} description=${it.description}") + } + } + legacy.forEach { directive -> + appendLine(" legacy @${directive.name} description=${directive.description} repeatable=${directive.isRepeatable} locations=${directive.validLocations()}") + directive.arguments.forEach { appendLine(" ${legacyArgument(it)}") } + } +} + +@Suppress("DEPRECATION") +private fun legacyArgument(argument: GraphQLArgument) = + "${argument.name}: ${GraphQLTypeUtil.simplePrint(argument.type)} = ${describe(argument.argumentValue)} description=${argument.description}" + +private fun describe(value: InputValueWithState): String = when { + value.isNotSet -> "" + value.isLiteral -> "literal ${AstPrinter.printAst(value.value as Node<*>)}" + value.isExternal -> "external ${value.value}" + else -> "internal ${value.value}" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt new file mode 100644 index 00000000..33b3115d --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt @@ -0,0 +1,125 @@ +package probe + +import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.databind.SerializationFeature +import graphql.ExecutionInput +import graphql.ExecutionResult +import graphql.GraphQL +import graphql.kickstart.tools.SchemaParser +import graphql.schema.GraphQLSchema +import graphql.schema.idl.SchemaPrinter +import org.reactivestreams.Publisher +import org.reactivestreams.Subscriber +import org.reactivestreams.Subscription +import scenarios.SCENARIOS +import java.io.File +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit +import kotlin.system.exitProcess + +/** + * Builds the scenario's schema through the public API of the graphql-java-tools jar on the classpath, then runs every + * `.graphql` file under `scenarios//` against it. Everything it observes goes to the output directory. + * + * Exit codes: 0 schema built and all operations ran (operations may still have GraphQL errors, see summary.txt), + * 2 schema build threw, 64 bad arguments. + */ +fun main(args: Array) { + if (args.size != 2) usage("expected ") + val scenario = SCENARIOS.find { it.name == args[0] } ?: usage("unknown scenario '${args[0]}'") + val out = File(args[1]).apply { mkdirs() } + val summary = StringBuilder() + fun report(line: String) { + println(line) + summary.appendLine(line) + } + + report("scenario: ${scenario.name}") + report("graphql-java-tools jar: ${jarOf(SchemaParser::class.java)}") + report("graphql-java jar: ${jarOf(GraphQL::class.java)}") + report("java: ${System.getProperty("java.version")}") + + val schema: GraphQLSchema + try { + val parser = scenario.parser().build() + schema = scenario.schema(parser) + val unused = parser.getUnusedDefinitions().map { it.name }.sorted() + if (unused.isNotEmpty()) report("unused definitions: ${unused.joinToString()}") + } catch (e: Throwable) { + File(out, "build-error.txt").writeText(e.stackTraceToString()) + report("schema build: FAILED ${e.javaClass.name}: ${e.message}") + File(out, "summary.txt").writeText(summary.toString()) + exitProcess(2) + } + File(out, "schema.graphqls").writeText(SchemaPrinter().print(schema)) + scenario.inspect(schema)?.let { File(out, "inspect.txt").writeText(it) } + report("schema build: OK") + + val graphQL = scenario.graphQL(GraphQL.newGraphQL(schema)).build() + for (operation in operationFiles(scenario.operations)) { + val name = operation.nameWithoutExtension + val variablesFile = File(operation.parentFile, "$name.variables.json") + @Suppress("UNCHECKED_CAST") + val variables = if (variablesFile.exists()) json.readValue(variablesFile, Map::class.java) as Map else emptyMap() + val input = scenario.input(ExecutionInput.newExecutionInput().query(operation.readText()).variables(variables)).build() + + val result = try { + graphQL.execute(input) + } catch (e: Throwable) { + File(out, "$name.json").writeText(json.writeValueAsString(mapOf("threw" to e.toString()))) + report("operation $name: THREW $e") + continue + } + // A subscription's data is a Publisher of results + @Suppress("UNCHECKED_CAST") + val publisher = result.getData() as? Publisher + val written = LinkedHashMap() + var eventCount = "" + if (publisher != null) { + val events = collect(publisher) + written["events"] = events + result.toSpecification()["errors"]?.let { written["errors"] = it } + eventCount = " events=${events.size}" + } else { + written.putAll(result.toSpecification()) + } + File(out, "$name.json").writeText(json.writeValueAsString(written)) + report("operation $name: errors=${result.errors.size}$eventCount") + result.errors.forEach { report(" error: ${it.message}") } + } + File(out, "summary.txt").writeText(summary.toString()) +} + +private val json = ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT) + +private fun usage(problem: String): Nothing { + System.err.println("$problem\nusage: probe \nscenarios: ${SCENARIOS.joinToString { it.name }}") + exitProcess(64) +} + +private fun jarOf(clazz: Class<*>) = clazz.protectionDomain.codeSource?.location?.path ?: "unknown" + +private fun operationFiles(scenario: String): List { + val dir = Thread.currentThread().contextClassLoader.getResource("scenarios/$scenario") + ?: return emptyList() + return File(dir.toURI()).listFiles { file -> file.extension == "graphql" }!!.sortedBy { it.name } +} + +/** Subscribes the way a transport would and collects every event until completion, for up to 10 seconds. */ +private fun collect(publisher: Publisher): List> { + val events = mutableListOf>() + val done = CountDownLatch(1) + publisher.subscribe(object : Subscriber { + override fun onSubscribe(subscription: Subscription) = subscription.request(Long.MAX_VALUE) + override fun onNext(event: ExecutionResult) { + synchronized(events) { events.add(event.toSpecification()) } + } + override fun onError(error: Throwable) { + synchronized(events) { events.add(mapOf("publisherError" to error.toString())) } + done.countDown() + } + override fun onComplete() = done.countDown() + }) + if (!done.await(10, TimeUnit.SECONDS)) println(" subscription did not complete within 10 seconds") + return synchronized(events) { events.toList() } +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt new file mode 100644 index 00000000..535d8f4d --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt @@ -0,0 +1,48 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.GraphQLResolver +import graphql.kickstart.tools.GraphQLSubscriptionResolver +import graphql.kickstart.tools.SchemaParser +import kotlinx.coroutines.delay +import kotlinx.coroutines.reactive.publish +import org.reactivestreams.Publisher +import java.util.concurrent.CompletableFuture + +/** CompletableFuture and suspend resolvers, a suspend field resolver on a nested type, and a Publisher subscription. */ +object Async : Scenario { + override val name = "async" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/async/schema.graphqls") + .resolvers(AsyncQuery(), ShipmentResolver(), AsyncSubscription()) +} + +data class Shipment(val id: String) + +class AsyncQuery : GraphQLQueryResolver { + fun future(): CompletableFuture = CompletableFuture.supplyAsync { "from a future" } + + suspend fun suspended(): String { + delay(10) + return "from a suspend function" + } + + suspend fun shipments(): List = listOf(Shipment("s1"), Shipment("s2")) +} + +class ShipmentResolver : GraphQLResolver { + suspend fun status(shipment: Shipment): String { + delay(5) + return "${shipment.id}: delivered" + } +} + +class AsyncSubscription : GraphQLSubscriptionResolver { + fun ticks(count: Int): Publisher = publish { + repeat(count) { + delay(10) + send(it + 1) + } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt new file mode 100644 index 00000000..624ef070 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt @@ -0,0 +1,70 @@ +package scenarios + +import graphql.GraphQLContext +import graphql.execution.CoercedVariables +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.GraphQLResolver +import graphql.kickstart.tools.SchemaParser +import graphql.language.StringValue +import graphql.language.Value +import graphql.schema.Coercing +import graphql.schema.GraphQLScalarType +import java.time.LocalDate +import java.util.Locale + +/** Root resolver, a GraphQLResolver for a nested type, data class properties, an is-getter and a custom scalar. */ +object Bookstore : Scenario { + override val name = "bookstore" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/bookstore/schema.graphqls") + .resolvers(BookstoreQuery(), AuthorResolver()) + .scalars(dateScalar) +} + +/** The same schema plus a field no resolver or class implements. */ +object BookstoreMissingResolver : Scenario { + override val name = "bookstore-missing-resolver" + + override fun parser() = SchemaParser.newParser() + .files("scenarios/bookstore/schema.graphqls", "scenarios/bookstore-missing-resolver/extension.graphqls") + .resolvers(BookstoreQuery(), AuthorResolver()) + .scalars(dateScalar) +} + +data class Author(val id: String, val name: String) + +class Book(val id: String, val title: String, val authorId: String, val published: LocalDate, private val stock: Int) { + fun isInStock() = stock > 0 +} + +private val authors = listOf(Author("a1", "Ursula K. Le Guin"), Author("a2", "Iain M. Banks")) +private val books = listOf( + Book("b1", "The Dispossessed", "a1", LocalDate.of(1974, 5, 1), 3), + Book("b2", "The Left Hand of Darkness", "a1", LocalDate.of(1969, 3, 1), 0), + Book("b3", "Use of Weapons", "a2", LocalDate.of(1990, 9, 1), 1), +) + +class BookstoreQuery : GraphQLQueryResolver { + fun books(): List = books + fun book(id: String): Book? = books.find { it.id == id } +} + +class AuthorResolver : GraphQLResolver { + fun author(book: Book): Author = authors.first { it.id == book.authorId } +} + +val dateScalar: GraphQLScalarType = GraphQLScalarType.newScalar() + .name("Date") + .description("ISO-8601 date") + .coercing(object : Coercing { + override fun serialize(dataFetcherResult: Any, graphQLContext: GraphQLContext, locale: Locale) = + (dataFetcherResult as LocalDate).toString() + + override fun parseValue(input: Any, graphQLContext: GraphQLContext, locale: Locale): LocalDate = + LocalDate.parse(input as String) + + override fun parseLiteral(input: Value<*>, variables: CoercedVariables, graphQLContext: GraphQLContext, locale: Locale): LocalDate = + LocalDate.parse((input as StringValue).value) + }) + .build() diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt new file mode 100644 index 00000000..d569d63d --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt @@ -0,0 +1,59 @@ +package scenarios + +import graphql.ExecutionInput +import graphql.GraphQLContext +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.GraphQLResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.DataFetchingEnvironment + +/** Resolver methods that take the custom context class and DataFetchingEnvironment after the schema arguments. */ +object ContextAndEnvironment : Scenario { + override val name = "context-and-environment" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/context-and-environment/schema.graphqls") + .resolvers(ContextAndEnvironmentQuery(), UserResolver()) + .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) + + override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = + builder.graphQLContext(mapOf(AppContext::class.java to AppContext("oryan", "en-CA"))) +} + +/** A trailing parameter that is neither a context nor the environment. */ +object ContextAndEnvironmentInvalid : Scenario { + override val name = "context-and-environment-invalid" + + override fun parser() = SchemaParser.newParser() + .schemaString("type Query { greeting(name: String!): String! }") + .resolvers(ContextAndEnvironmentInvalidQuery()) + .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) +} + +data class AppContext(val user: String, val locale: String) + +class AppUser(val name: String) + +class ContextAndEnvironmentQuery : GraphQLQueryResolver { + fun greeting(name: String, context: AppContext, env: DataFetchingEnvironment) = + "${env.field.name}: hi $name, from ${context.user}" + + fun farewell(name: String, env: DataFetchingEnvironment, context: AppContext) = + "${env.field.name}: bye $name, from ${context.user}" + + fun user(context: AppContext) = AppUser(context.user) + + fun environmentOnly(env: DataFetchingEnvironment) = env.field.name + + fun contextOnly(context: AppContext) = context.locale +} + +class UserResolver : GraphQLResolver { + fun locale(user: AppUser, context: GraphQLContext, env: DataFetchingEnvironment) = + "${env.field.name} of ${user.name}: ${context.get(AppContext::class.java)?.locale}" +} + +class ContextAndEnvironmentInvalidQuery : GraphQLQueryResolver { + fun greeting(name: String, context: AppContext, extra: String) = "hi $name" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt new file mode 100644 index 00000000..10612981 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt @@ -0,0 +1,35 @@ +package scenarios + +import graphql.ExecutionInput +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.GraphQLResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.DataFetchingEnvironment + +/** Resolver methods whose environment or context parameter takes the place of a schema argument. */ +object ContextMisbound : Scenario { + override val name = "context-misbound" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/context-misbound/schema.graphqls") + .resolvers(ContextMisboundQuery(), MisboundUserResolver()) + .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) + + override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = + builder.graphQLContext(mapOf(AppContext::class.java to AppContext("oryan", "en-CA"))) +} + +class ContextMisboundQuery : GraphQLQueryResolver { + fun users(env: DataFetchingEnvironment) = listOf(AppUser(env.field.name)) + + fun user() = AppUser("ada") + + fun contextArgument(context: AppContext) = context.user + + fun greeting(name: String, env: DataFetchingEnvironment) = "${env.field.name}: hi $name" +} + +class MisboundUserResolver : GraphQLResolver { + fun thumbnail(user: AppUser, env: DataFetchingEnvironment) = "${env.field.name} of ${user.name}" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt new file mode 100644 index 00000000..87dc56e5 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt @@ -0,0 +1,65 @@ +package scenarios + +import graphql.Scalars +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.GraphQLScalarType +import graphql.schema.GraphQLSchema +import probe.dumpDirectives + +/** + * Every place a directive can be applied, with repeated non-repeatable, undeclared, defaulted and described arguments, + * extensions, and a scalar whose directive has an unknown argument. inspect.txt lists the applied and legacy directives. + */ +object DirectiveDrift : Scenario { + override val name = "directive-drift" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/directive-drift/schema.graphqls") + .resolvers(DirectiveDriftQuery()) + .dictionary("Dog", DriftDog::class.java) + .scalars(stringScalar("Date"), stringScalar("Money")) + .options(SchemaParserOptions.newOptions().allowUndeclaredDirectives(true).build()) + + override fun inspect(schema: GraphQLSchema) = dumpDirectives(schema) +} + +/** An undeclared directive without allowUndeclaredDirectives. */ +object DirectiveDriftUndeclared : Scenario { + override val name = "directive-drift-undeclared" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/directive-drift-undeclared/schema.graphqls") + .resolvers(DirectiveDriftOneField()) +} + +private fun stringScalar(name: String) = GraphQLScalarType.newScalar().name(name).coercing(Scalars.GraphQLString.coercing).build() + +interface DriftAnimal { + val name: String +} + +class DriftDog(override val name: String) : DriftAnimal + +enum class DriftColor { RED, GREEN, BLUE } + +data class DriftMeta(val owner: String?) + +class DirectiveDriftQuery : GraphQLQueryResolver { + fun plain() = "plain" + fun wrongPlace(arg: String?) = arg + fun missing() = "missing" + fun old() = "old" + fun older() = "older" + fun search(filter: DriftMeta?, term: String?) = "${filter?.owner} $term" + fun animal(): DriftAnimal = DriftDog("rex") + fun pet(): Any = DriftDog("rex") + fun color() = DriftColor.RED + fun `when`() = "2026-10-22" + fun price() = "9.99" +} + +class DirectiveDriftOneField : GraphQLQueryResolver { + fun a() = "a" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt new file mode 100644 index 00000000..179b0a2f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt @@ -0,0 +1,42 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.relay.Connection +import graphql.relay.SimpleListConnection +import graphql.schema.DataFetcherFactories +import graphql.schema.DataFetchingEnvironment +import graphql.schema.GraphQLFieldDefinition +import graphql.schema.idl.SchemaDirectiveWiring +import graphql.schema.idl.SchemaDirectiveWiringEnvironment + +/** A named SchemaDirectiveWiring that wraps a data fetcher, @deprecated, and a relay connection generated by @connection. */ +object Directives : Scenario { + override val name = "directives" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/directives/schema.graphqls") + .resolvers(DirectivesQuery()) + .directive("uppercase", UppercaseDirective()) +} + +data class Member(val id: String, val name: String) + +private val members = listOf(Member("m1", "ada"), Member("m2", "grace"), Member("m3", "barbara")) + +class DirectivesQuery : GraphQLQueryResolver { + fun motto() = "keep it simple" + + fun oldMotto() = "move fast" + + fun members(first: Int?, after: String?, env: DataFetchingEnvironment): Connection = + SimpleListConnection(members).get(env) +} + +class UppercaseDirective : SchemaDirectiveWiring { + override fun onField(environment: SchemaDirectiveWiringEnvironment): GraphQLFieldDefinition { + val original = environment.fieldDataFetcher + environment.fieldDataFetcher = DataFetcherFactories.wrapDataFetcher(original) { _, value -> (value as? String)?.uppercase() } + return environment.element + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt new file mode 100644 index 00000000..d641ffd3 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt @@ -0,0 +1,22 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** Directives applied at a location their definition doesn't list, without a required argument, or twice when not repeatable. */ +object DirectivesInvalid : Scenario { + override val name = "directives-invalid" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/directives-invalid/schema.graphqls") + .resolvers(DirectivesInvalidQuery()) + .directive("uppercase", UppercaseDirective()) +} + +class DirectivesInvalidQuery : GraphQLQueryResolver { + fun motto() = "keep it simple" + + fun secret() = "42" + + fun members() = listOf(Member("m1", "ada")) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt new file mode 100644 index 00000000..375ebc22 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt @@ -0,0 +1,23 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** A query resolver inheriting a method whose parameter is its superclass's type variable. */ +object GenericInputResolver : Scenario { + override val name = "generic-input-resolver" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/generic-input-resolver/schema.graphqls") + .resolvers(GreetingQuery()) +} + +data class GreetingInput(val name: String) + +abstract class InputResolver : GraphQLQueryResolver { + fun generic(input: I): String = "generic got $input" +} + +class GreetingQuery : InputResolver() { + fun plain(input: GreetingInput): String = "plain got $input" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt new file mode 100644 index 00000000..3172da5d --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt @@ -0,0 +1,44 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLMutationResolver +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.DataFetchingEnvironment +import java.util.Optional + +/** Scalar, list, enum and input object arguments, SDL default values, DataFetchingEnvironment and omitted vs null. */ +object Inputs : Scenario { + override val name = "inputs" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/inputs/schema.graphqls") + .resolvers(InputsQuery(), InputsMutation()) + .options(SchemaParserOptions.newOptions().inputArgumentOptionalDetectOmission(true).build()) +} + +enum class Genre { FICTION, SCIENCE, HISTORY } + +data class BookInput(val title: String, val genre: Genre, val tags: List?, val details: DetailsInput?) + +data class DetailsInput(val pages: Int, val language: String) + +data class SavedBook(val title: String, val genre: Genre, val tags: List, val pages: Int?, val language: String?) + +class InputsQuery : GraphQLQueryResolver { + fun search(term: String, limit: Int, genres: List?, env: DataFetchingEnvironment): String = + "term=$term limit=$limit genres=$genres field=${env.field.name}" + + /** null when the argument was omitted, Optional.empty() when it was passed as null. */ + @Suppress("OptionalAssignedToNull") + fun nickname(value: Optional?): String = when { + value == null -> "omitted" + value.isEmpty -> "explicit null" + else -> "value ${value.get()}" + } +} + +class InputsMutation : GraphQLMutationResolver { + fun addBook(input: BookInput): SavedBook = + SavedBook(input.title, input.genre, input.tags ?: emptyList(), input.details?.pages, input.details?.language) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt new file mode 100644 index 00000000..fa417aa2 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt @@ -0,0 +1,45 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import org.springframework.aop.framework.ProxyFactory +import org.springframework.aop.support.AopUtils + +/** Issue #822: the resolver behind a Spring JDK dynamic proxy, which only implements GraphQLQueryResolver. */ +object JdkProxy : Scenario { + override val name = "jdk-proxy" + + override fun parser() = proxyParser(proxy(proxyTargetClass = false).also { check(AopUtils.isJdkDynamicProxy(it)) }) +} + +/** The workaround: the same resolver behind a CGLIB proxy. */ +object JdkProxyCglib : Scenario { + override val name = "jdk-proxy-cglib" + override val operations = "jdk-proxy" + + override fun parser() = proxyParser(proxy(proxyTargetClass = true).also { check(AopUtils.isCglibProxy(it)) }) +} + +/** The same resolver without a proxy. */ +object JdkProxyPlain : Scenario { + override val name = "jdk-proxy-plain" + override val operations = "jdk-proxy" + + override fun parser() = proxyParser(ProxiedQuery()) +} + +open class ProxiedQuery : GraphQLQueryResolver { + open fun test() = "ok" + + @JvmField + val count = 1 + + open val total = 2 +} + +private fun proxy(proxyTargetClass: Boolean) = + ProxyFactory(ProxiedQuery()).apply { isProxyTargetClass = proxyTargetClass }.proxy as GraphQLQueryResolver + +private fun proxyParser(resolver: GraphQLQueryResolver) = SchemaParser.newParser() + .file("scenarios/jdk-proxy/schema.graphqls") + .resolvers(resolver) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt new file mode 100644 index 00000000..0649a90b --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt @@ -0,0 +1,24 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** + * A union that is only a member of another union. No field returns `Media`. + */ +object NestedUnions : Scenario { + override val name = "nested-unions" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/nested-unions/schema.graphqls") + .resolvers(NestedUnionsQuery()) + .dictionary(NestedUnionsQuery.Book::class.java, NestedUnionsQuery.Movie::class.java) +} + +class NestedUnionsQuery : GraphQLQueryResolver { + fun results(): List = listOf(Book("Solaris"), Movie("Stalker")) + + data class Book(val title: String) + + data class Movie(val title: String) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt new file mode 100644 index 00000000..854d19f6 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt @@ -0,0 +1,110 @@ +package scenarios + +import graphql.GraphQL +import graphql.execution.DefaultValueUnboxer +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.ExecutionInput +import graphql.schema.DataFetchingEnvironment +import org.dataloader.BatchLoader +import org.dataloader.DataLoaderFactory +import org.dataloader.DataLoaderRegistry +import java.util.concurrent.CompletableFuture +import java.util.concurrent.CompletableFuture.completedFuture + +/** Generic wrappers and futures nested inside lists and inside other futures (issue 254). */ +object NestedWrappers : Scenario { + override val name = "nested-wrappers" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/nested-wrappers/schema.graphqls") + .resolvers(NestedWrappersQuery()) + .options(SchemaParserOptions.newOptions().genericWrappers(tryWrapper).build()) + + override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = builder.dataLoaderRegistry( + DataLoaderRegistry().apply { + register("items", DataLoaderFactory.newDataLoader(BatchLoader { keys -> completedFuture(keys.map { NestedItem(it) }) })) + } + ) + + private val tryWrapper = SchemaParserOptions.GenericWrapper.withTransformer(Try::class, 0, { t -> t.get() }) +} + +/** The same resolvers, run by an app whose own graphql-java ValueUnboxer already unwraps Try and joins futures. */ +object NestedWrappersUnboxer : Scenario by NestedWrappers { + override val name = "nested-wrappers-unboxer" + + override fun graphQL(builder: GraphQL.Builder): GraphQL.Builder = builder.valueUnboxer { value -> + val unwrapped = when (value) { + is Try<*> -> value.get() + is CompletableFuture<*> -> value.join() + else -> value + } + unwrapped?.let { DefaultValueUnboxer.unboxValue(it) } + } +} + +sealed class Try { + abstract fun get(): T + + data class Success(val value: T) : Try() { + override fun get() = value + } + + data class Failure(val cause: Throwable) : Try() { + override fun get(): Nothing = throw cause + } +} + +data class Payload(val data: String) + +data class NestedItem(val id: String) + +class NestedWrappersQuery : GraphQLQueryResolver { + fun payload(): Try = Try.Success(Payload("single")) + + fun payloads(): List> = listOf(Try.Success(Payload("a")), Try.Success(Payload("b"))) + + fun payloadStrings(): List> = listOf(Try.Success("a"), Try.Success("b")) + + fun items(): List> = listOf(completedFuture(NestedItem("1")), CompletableFuture.supplyAsync { NestedItem("2") }) + + fun itemNames(): List> = listOf(completedFuture("one"), CompletableFuture.supplyAsync { "two" }) + + fun futureOfFuture(): CompletableFuture> = CompletableFuture.supplyAsync { completedFuture(NestedItem("inner")) } + + fun futureOfTries(): CompletableFuture>> = completedFuture(payloads()) + + fun triesOfFutures(): List>> = items().map { Try.Success(it) } + + fun loadedItems(env: DataFetchingEnvironment): List> = + listOf("x", "y").map { env.getDataLoader("items")!!.load(it) } + + fun failedTryInList(): List> = listOf(Try.Success(Payload("ok")), Try.Failure(IllegalStateException("payload failed"))) + + fun failedFutureInList(): List> = + listOf(completedFuture(NestedItem("ok")), CompletableFuture.failedFuture(IllegalStateException("item failed"))) + + fun plainItems(): List = listOf(NestedItem("p1"), NestedItem("p2")) + + fun futureOfItems(): CompletableFuture> = completedFuture(plainItems()) +} + +/** Suspend functions returning lists of an open class, which Kotlin reflection types as List. */ +object NestedWrappersSuspend : Scenario { + override val name = "nested-wrappers-suspend" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/nested-wrappers-suspend/schema.graphqls") + .resolvers(NestedWrappersSuspendQuery()) +} + +class NestedWrappersSuspendQuery : GraphQLQueryResolver { + suspend fun nullableItems(): List> = listOf(completedFuture(NestedItem("1")), CompletableFuture.supplyAsync { NestedItem("2") }) + + suspend fun nonNullItems(): List> = nullableItems() + + @Suppress("UNCHECKED_CAST") + suspend fun typeVariableStrings(): List = listOf("a", "b") as List +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt new file mode 100644 index 00000000..398f7acc --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt @@ -0,0 +1,85 @@ +package scenarios + +import graphql.GraphQLContext +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.Coercing +import graphql.schema.CoercingSerializeException +import graphql.schema.GraphQLScalarType +import org.apache.commons.lang3.reflect.TypeUtils +import java.time.OffsetDateTime +import java.util.Locale +import java.util.concurrent.CompletableFuture +import java.util.concurrent.CompletableFuture.completedFuture +import java.util.concurrent.Future +import java.util.concurrent.FutureTask + +/** + * Nested wrappers unwrapped exactly where the schema build matched them (issue 905): a custom scalar's futures and wrappers, a + * plain Future in a list (also from a wrapper's transformer and a suspend function), a wrapper only a schemaWrapper introduces, + * and a subclass registered as a wrapper of its own. + */ +object NestedWrappersExact : Scenario { + override val name = "nested-wrappers-exact" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/nested-wrappers-exact/schema.graphqls") + .resolvers(NestedWrappersExactQuery()) + .scalars(dateTime) + .options(SchemaParserOptions.newOptions().genericWrappers(tryWrapper, batchWrapper, boxWrapper, specialBoxWrapper, laterWrapper).build()) + + private val tryWrapper = SchemaParserOptions.GenericWrapper.withTransformer(Try::class, 0, { t -> t.get() }) + + private val batchWrapper = SchemaParserOptions.GenericWrapper.withTransformer(NestedWrappersExactBatch::class, 0, { batch -> batch.items }) { item -> + TypeUtils.parameterize(List::class.java, TypeUtils.parameterize(CompletableFuture::class.java, item)) + } + + private val boxWrapper = SchemaParserOptions.GenericWrapper.withTransformer(NestedWrappersExactBox::class, 0, { box -> box.content }) + + private val specialBoxWrapper = SchemaParserOptions.GenericWrapper.withTransformer( + NestedWrappersExactSpecialBox::class, 0, { _ -> throw IllegalStateException("unwrapped by the value's class") } + ) + + private val laterWrapper = SchemaParserOptions.GenericWrapper.withTransformer( + NestedWrappersExactLater::class, 0, { later -> FutureTask { later.value }.apply { run() } } + ) + + private val dateTime = GraphQLScalarType.newScalar() + .name("DateTime") + .coercing(object : Coercing { + override fun serialize(dataFetcherResult: Any, graphQLContext: GraphQLContext, locale: Locale): String = + (dataFetcherResult as? OffsetDateTime)?.toString() + ?: throw CoercingSerializeException("Expected an OffsetDateTime but got a ${dataFetcherResult.javaClass.name}") + }) + .build() +} + +class NestedWrappersExactBatch(val items: List>) + +open class NestedWrappersExactBox(val content: T) + +class NestedWrappersExactSpecialBox(content: T) : NestedWrappersExactBox(content) + +class NestedWrappersExactLater(val value: T) + +class NestedWrappersExactQuery : GraphQLQueryResolver { + private val first = OffsetDateTime.parse("2026-10-23T12:00Z") + private val second = OffsetDateTime.parse("2026-10-24T12:00Z") + + fun dates(): List> = listOf(completedFuture(first), CompletableFuture.supplyAsync { second }) + + fun triedDates(): List> = listOf(Try.Success(first), Try.Success(second)) + + fun plainFutureItems(): List> = listOf(FutureTask { NestedItem("f1") }.apply { run() }) + + fun batchedItems(): NestedWrappersExactBatch = + NestedWrappersExactBatch(listOf(completedFuture(NestedItem("b1")), CompletableFuture.supplyAsync { NestedItem("b2") })) + + fun boxedItems(): List> = + listOf(NestedWrappersExactBox(NestedItem("x1")), NestedWrappersExactSpecialBox(NestedItem("x2"))) + + fun laterItems(): List> = listOf(NestedWrappersExactLater(NestedItem("l1"))) + + suspend fun suspendPlainFutureItems(): List> = plainFutureItems() +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt new file mode 100644 index 00000000..6772d564 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt @@ -0,0 +1,72 @@ +package scenarios + +import graphql.GraphQLError +import graphql.execution.DataFetcherResult +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import java.util.Optional + +/** + * A DataFetcherResult inside an Optional: its data, its errors, an empty Optional, the same object type returned another way, + * a list, and DataFetcherResult nested in itself under an Optional, which the build rejects like + * DataFetcherResult>. + */ +object OptionalResults : Scenario { + override val name = "optional-results" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/optional-results/schema.graphqls") + .resolvers(OptionalResultsQuery()) +} + +object OptionalResultsMixed : Scenario { + override val name = "optional-results-mixed" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/optional-results-mixed/schema.graphqls") + .resolvers(OptionalResultsMixedQuery()) +} + +object OptionalResultsList : Scenario { + override val name = "optional-results-list" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/optional-results-list/schema.graphqls") + .resolvers(OptionalResultsListQuery()) +} + +object OptionalResultsNested : Scenario { + override val name = "optional-results-nested" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/optional-results-nested/schema.graphqls") + .resolvers(OptionalResultsNestedQuery()) +} + +class OptionalResultsPayload(val data: String) + +private fun optionalResult(data: T, vararg errors: String): Optional> = Optional.of( + DataFetcherResult.newResult().data(data).errors(errors.map { GraphQLError.newError().message(it).build() }).build() +) + +class OptionalResultsQuery : GraphQLQueryResolver { + fun optionalResult(): Optional> = optionalResult(OptionalResultsPayload("a"), "partial") + fun optionalResultName(): Optional> = optionalResult("a") + fun emptyOptionalResult(): Optional> = Optional.empty() +} + +class OptionalResultsMixedQuery : GraphQLQueryResolver { + fun optionalResult(): Optional> = optionalResult(OptionalResultsPayload("a"), "partial") + fun resultOfOptional(): DataFetcherResult> = + DataFetcherResult.newResult>().data(Optional.of(OptionalResultsPayload("a"))).build() +} + +class OptionalResultsListQuery : GraphQLQueryResolver { + fun optionalResultList(): Optional>> = + optionalResult(listOf(OptionalResultsPayload("a"), OptionalResultsPayload("b"))) +} + +class OptionalResultsNestedQuery : GraphQLQueryResolver { + fun optionalResultOfResult(): Optional>> = + optionalResult(DataFetcherResult.newResult().data(OptionalResultsPayload("a")).build()) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt new file mode 100644 index 00000000..6bb4ad3a --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt @@ -0,0 +1,27 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.resolver.MissingResolverDataFetcherProvider +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.DataFetcher + +/** A missing resolver provider standing in for a field nothing implements. */ +object Options : Scenario { + override val name = "options" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/options/schema.graphqls") + .resolvers(OptionsQuery()) + .options( + SchemaParserOptions.newOptions() + .missingResolverDataFetcherProvider(MissingResolverDataFetcherProvider { field, _ -> + DataFetcher { "no resolver for ${field.name}" } + }) + .build() + ) +} + +class OptionsQuery : GraphQLQueryResolver { + fun name() = "tools" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt new file mode 100644 index 00000000..a97444b5 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt @@ -0,0 +1,37 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** + * Interface and union fields whose resolvers return a supertype, so the concrete classes are only known through the + * dictionary. `Writer` is backed by a class with a different name. + */ +object Polymorphism : Scenario { + override val name = "polymorphism" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/polymorphism/schema.graphqls") + .resolvers(PolymorphismQuery()) + .dictionary(Novel::class.java) + .dictionary("Writer", WriterEntity::class.java) +} + +interface Entity { + val id: String +} + +data class Novel(override val id: String, val title: String) : Entity + +data class WriterEntity(override val id: String, val name: String) : Entity + +private val entities: List = listOf(Novel("n1", "Solaris"), WriterEntity("w1", "Stanisław Lem")) + +class PolymorphismQuery : GraphQLQueryResolver { + fun node(id: String): Entity? = entities.find { it.id == id } + + fun search(term: String): List = entities.filter { + val text = if (it is Novel) it.title else (it as WriterEntity).name + text.contains(term, ignoreCase = true) + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt new file mode 100644 index 00000000..22212cfe --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt @@ -0,0 +1,41 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLMutationResolver +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** + * Builds the schema with `parseSchemaObjects().toReadOnlySchema()` instead of `makeExecutableSchema()`, so the mutation + * type is left out. Covers an interface, a union, a custom field directive and a directive applied to the schema. + */ +object ReadOnlySchema : Scenario { + override val name = "read-only-schema" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/read-only-schema/schema.graphqls") + .resolvers(ReadOnlyQuery(), ReadOnlyMutation()) + .dictionary("Dog", ShelterDog::class.java) + .dictionary("Cat", ShelterCat::class.java) + + override fun schema(parser: SchemaParser) = parser.parseSchemaObjects().toReadOnlySchema() +} + +interface ShelterAnimal { + val name: String +} + +data class ShelterDog(override val name: String, val barks: Boolean) : ShelterAnimal + +data class ShelterCat(override val name: String, val lives: Int) : ShelterAnimal + +private val animals: List = listOf(ShelterDog("Rex", true), ShelterCat("Tom", 9)) + +class ReadOnlyQuery : GraphQLQueryResolver { + fun animal(name: String): ShelterAnimal? = animals.find { it.name == name } + + fun pets(): List = animals +} + +class ReadOnlyMutation : GraphQLMutationResolver { + fun adopt(name: String): ShelterAnimal = ShelterDog(name, false) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt new file mode 100644 index 00000000..94d40fcc --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt @@ -0,0 +1,28 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** Input objects that reference themselves and each other through lists and non-null types, and directive arguments of input object, enum and list types. */ +object RecursiveInputs : Scenario { + override val name = "recursive-inputs" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/recursive-inputs/schema.graphqls") + .resolvers(RecursiveInputsQuery()) + .dictionary(RangeInput::class, LimitUnit::class) +} + +data class RangeInput(val min: Int, val max: Int) + +enum class LimitUnit { ITEMS, PAGES } + +data class TreeFilter(val name: String?, val and: List?, val not: TreeFilter?, val child: ChildFilter?) + +data class ChildFilter(val parent: TreeFilter?, val siblings: List>?, val depth: Int) + +class RecursiveInputsQuery : GraphQLQueryResolver { + fun describe(filter: TreeFilter): String = filter.toString() + + fun names(first: Int?): List = listOf("a", "b", "c").take(first ?: 3) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt new file mode 100644 index 00000000..c258d296 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt @@ -0,0 +1,100 @@ +package scenarios + +import com.fasterxml.jackson.annotation.JsonIdentityInfo +import com.fasterxml.jackson.annotation.JsonTypeInfo +import com.fasterxml.jackson.annotation.ObjectIdGenerators +import graphql.GraphQLContext +import graphql.execution.CoercedVariables +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.language.StringValue +import graphql.language.Value +import graphql.schema.Coercing +import graphql.schema.GraphQLScalarType +import java.util.Locale +import java.util.Optional + +/** + * Scalar arguments: a custom scalar Jackson can't build, a Kotlin scalar class without visible properties in an input object, + * the same written with a type id or an object id, ID converted to Long, and nested lists of strings. + */ +object ScalarArgs : Scenario { + override val name = "scalar-args" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/scalar-args/schema.graphqls") + .scalars(tagScalar, tokenScalar, typedTokenScalar, wrappedTokenScalar, idTokenScalar) + .resolvers(ScalarArgsQuery()) +} + +// no default constructor and no creator, so only the scalar's coercing can make one +class Tag private constructor(val value: String) { + companion object { + fun of(value: String) = Tag(value) + } +} + +private val tagScalar = GraphQLScalarType.newScalar() + .name("Tag") + .coercing(object : Coercing { + override fun serialize(dataFetcherResult: Any, context: GraphQLContext, locale: Locale) = (dataFetcherResult as Tag).value + override fun parseValue(input: Any, context: GraphQLContext, locale: Locale) = Tag.of(input as String) + override fun parseLiteral(input: Value<*>, variables: CoercedVariables, context: GraphQLContext, locale: Locale) = + Tag.of((input as StringValue).value.orEmpty()) + }) + .build() + +// Jackson writes it as {} and can read {} back as a new instance holding "default" +class ScalarArgsToken(private val value: String = "default") { + override fun toString() = value +} + +data class ScalarArgsTokenInput(val token: ScalarArgsToken? = null) + +@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY) +class ScalarArgsTypedToken(private val value: String = "default") { + override fun toString() = value +} + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT) +class ScalarArgsWrappedToken(private val value: String = "default") { + override fun toString() = value +} + +@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator::class) +class ScalarArgsIdToken(private val value: String = "default") { + override fun toString() = value +} + +data class ScalarArgsMarkedTokensInput( + val typed: ScalarArgsTypedToken? = null, + val wrapped: ScalarArgsWrappedToken? = null, + val ids: List? = null +) + +private val tokenScalar = stringScalar("Token") { ScalarArgsToken(it) } +private val typedTokenScalar = stringScalar("TypedToken") { ScalarArgsTypedToken(it) } +private val wrappedTokenScalar = stringScalar("WrappedToken") { ScalarArgsWrappedToken(it) } +private val idTokenScalar = stringScalar("IdToken") { ScalarArgsIdToken(it) } + +private fun stringScalar(name: String, parse: (String) -> T) = GraphQLScalarType.newScalar() + .name(name) + .coercing(object : Coercing { + override fun serialize(dataFetcherResult: Any, context: GraphQLContext, locale: Locale) = dataFetcherResult.toString() + override fun parseValue(input: Any, context: GraphQLContext, locale: Locale) = parse(input as String) + override fun parseLiteral(input: Value<*>, variables: CoercedVariables, context: GraphQLContext, locale: Locale) = + parse((input as StringValue).value.orEmpty()) + }) + .build() + +class ScalarArgsQuery : GraphQLQueryResolver { + fun tag(tag: Tag) = "tag ${tag.value}" + fun tags(tags: List) = "tags ${tags.map { it.value }}" + fun id(id: Long) = "id ${id + 1} (${id.javaClass.name})" + fun nestedSets(tags: List>) = "sets ${tags.map { it.sorted() }} sizes ${tags.map { it.size }}" + fun nestedLists(tags: List>) = "lists $tags" + fun tokenInput(input: ScalarArgsTokenInput) = "token ${input.token}" + fun markedTokens(input: ScalarArgsMarkedTokensInput) = "tokens ${input.typed} ${input.wrapped} ${input.ids}" + fun optionalTypedToken(token: Optional) = "typed ${token.orElse(null)}" + fun optionalIdToken(token: Optional) = "id ${token.orElse(null)}" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt new file mode 100644 index 00000000..76501b7e --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt @@ -0,0 +1,43 @@ +package scenarios + +import graphql.Scalars +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.schema.GraphQLScalarType +import graphql.schema.idl.SchemaDirectiveWiring +import graphql.schema.idl.SchemaDirectiveWiringEnvironment + +/** Directives and @specifiedBy on scalars from the SDL, on an extension and on the provided scalar, plus an undeclared one. */ +object ScalarDirectives : Scenario { + override val name = "scalar-directives" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/scalar-directives/schema.graphqls") + .resolvers(ScalarDirectivesQuery()) + .scalars( + string("Date"), + GraphQLScalarType.newScalar(string("DateTime")).description("An RFC-3339 date-time") + .specifiedByUrl("https://scalars.graphql.org/andimarek/date-time").build(), + string("Money") + ) + .directive("since", ArgumentWiring("date")) + .directive("unit", ArgumentWiring("name")) + + private fun string(name: String) = GraphQLScalarType.newScalar().name(name).coercing(Scalars.GraphQLString.coercing).build() +} + +/** Appends the directive and the value of [argument] that the wiring sees to the scalar's description. */ +class ArgumentWiring(private val argument: String) : SchemaDirectiveWiring { + override fun onScalar(environment: SchemaDirectiveWiringEnvironment): GraphQLScalarType { + val directive = environment.appliedDirective + val value = directive.getArgument(argument)?.getValue() + return environment.element.transform { it.description("${environment.element.description}, wired with @${directive.name}($value)") } + } +} + +class ScalarDirectivesQuery : GraphQLQueryResolver { + fun today(): String = "2026-10-19" + fun now(): String = "2026-10-19T12:00:00Z" + fun shift(from: String?): String? = from + fun price(): String = "9.99" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt new file mode 100644 index 00000000..cfca8e40 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt @@ -0,0 +1,32 @@ +package scenarios + +import graphql.ExecutionInput +import graphql.GraphQL +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder +import graphql.schema.GraphQLSchema + +/** + * One way a user sets up graphql-java-tools: SDL and operations under `src/main/resources/scenarios//`, resolvers + * and options in an `object` in this package, which registers it. + */ +sealed interface Scenario { + val name: String + + /** The directory under `scenarios/` whose operations run against this scenario's schema. */ + val operations: String get() = name + + /** The configured builder. The probe calls `build()` on it and passes the result to [schema]. */ + fun parser(): SchemaParserBuilder + + fun schema(parser: SchemaParser): GraphQLSchema = parser.makeExecutableSchema() + + /** Extra evidence about the built schema, written to inspect.txt. */ + fun inspect(schema: GraphQLSchema): String? = null + + fun graphQL(builder: GraphQL.Builder): GraphQL.Builder = builder + + fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = builder +} + +val SCENARIOS: List = Scenario::class.sealedSubclasses.mapNotNull { it.objectInstance }.sortedBy { it.name } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt new file mode 100644 index 00000000..1253d5c5 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt @@ -0,0 +1,98 @@ +package scenarios + +import graphql.ExecutionInput +import graphql.GraphQLContext +import graphql.execution.DataFetcherResult +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.GraphQLResolver +import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserOptions +import graphql.schema.DataFetchingEnvironment + +/** Resolver methods that leave out the source object and take the environment or a context last (issue 304). */ +object Sourceless : Scenario { + override val name = "sourceless" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/sourceless/schema.graphqls") + .resolvers(SourcelessQuery(), SourcelessFolderResolver(), SourcelessImageResolver()) + .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) + + override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = + builder.graphQLContext(mapOf(AppContext::class.java to AppContext("oryan", "en-CA"), "owner" to "ada")) +} + +/** A data class getter and a with-source method that share a name with a sourceless method. */ +object SourcelessShadowed : Scenario { + override val name = "sourceless-shadowed" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/sourceless-shadowed/schema.graphqls") + .resolvers(SourcelessQuery(), SourcelessFolderResolver(), ShadowedImageResolver()) +} + +/** A helper on the resolver that looks like a sourceless method for a field the app leaves unimplemented. */ +object SourcelessUnimplemented : Scenario { + override val name = "sourceless-unimplemented" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/sourceless-unimplemented/schema.graphqls") + .resolvers(SourcelessQuery(), SourcelessFolderResolver(), HelperImageResolver()) + .options(SchemaParserOptions.newOptions().allowUnimplementedResolvers(true).build()) +} + +/** Sourceless methods whose environment or context parameter would take the place of a schema argument. */ +object SourcelessMisbound : Scenario { + override val name = "sourceless-misbound" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/sourceless-misbound/schema.graphqls") + .resolvers(SourcelessQuery(), SourcelessFolderResolver(), MisboundImageResolver()) +} + +class SourcelessFolder(val supportedFileTypes: List) + +class SourcelessImage(val name: String) + +class SourcelessQuery : GraphQLQueryResolver { + fun folder() = SourcelessFolder(listOf("png", "jpg")) +} + +class SourcelessFolderResolver : GraphQLResolver { + fun images(folder: SourcelessFolder): DataFetcherResult> = DataFetcherResult.newResult>() + .data(listOf(SourcelessImage("cat"), SourcelessImage("dog"))) + .localContext(folder.supportedFileTypes) + .build() +} + +class SourcelessImageResolver : GraphQLResolver { + fun imageBlob(env: DataFetchingEnvironment) = "blob for ${env.getLocalContext>()}" + + fun thumbnail(size: Int, env: DataFetchingEnvironment) = "${env.getLocalContext>()?.first()}@$size" + + fun owner(context: GraphQLContext): String? = context.get("owner") + + fun locale(context: AppContext) = context.locale + + fun signature(context: AppContext, env: DataFetchingEnvironment) = "${env.field.name} by ${context.user}" + + suspend fun caption(env: DataFetchingEnvironment) = "caption of ${env.getSource()?.name}" +} + +class ShadowedImageResolver : GraphQLResolver { + fun getName(env: DataFetchingEnvironment) = "sourceless ${env.field.name}" + + fun title(image: SourcelessImage) = "with source ${image.name}" + + fun title(env: DataFetchingEnvironment) = "sourceless ${env.field.name}" +} + +class HelperImageResolver : GraphQLResolver { + fun imageBlob(image: SourcelessImage) = "blob of ${image.name}" + + fun preview(env: DataFetchingEnvironment) = "helper ${env.field.name}" +} + +class MisboundImageResolver : GraphQLResolver { + fun thumbnail(context: GraphQLContext, env: DataFetchingEnvironment) = "thumbnail ${env.field.name}" +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt new file mode 100644 index 00000000..cca70e20 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt @@ -0,0 +1,45 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** + * Extensions of every kind of type: fields, values, members, interfaces and directives merged into the type, repeats that + * keep the first one with a warning, extensions without a type, and an extension of a different kind than its type. + */ +object TypeExtensions : Scenario { + override val name = "type-extensions" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/type-extensions/schema.graphqls") + .resolvers(TypeExtensionsQuery()) + .dictionary(Article::class.java, Video::class.java) +} + +interface Node { + val id: String +} + +data class Article(override val id: String, val createdAt: String?, val name: String?, val title: String) : Node + +data class Video(override val id: String, val createdAt: String?, val name: String?, val seconds: Int) : Node + +enum class Color { RED, BLUE, GREEN } + +enum class Shade { LIGHT, DARK } + +data class Filter(val term: String?, val limit: Int?) + +private val nodes: List = listOf(Article("a1", "2026-10-01", "Launch", "We launched"), Video("v1", "2026-10-02", "Demo", 90)) + +class TypeExtensionsQuery : GraphQLQueryResolver { + fun node(id: String): Node? = nodes.find { it.id == id } + + fun search(): List = nodes + + fun colors(): List = Color.entries + + fun shades(): List = Shade.entries + + fun count(filter: Filter): Int = nodes.count { (it as? Article)?.title?.contains(filter.term.orEmpty()) ?: true }.coerceAtMost(filter.limit ?: Int.MAX_VALUE) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt new file mode 100644 index 00000000..39657802 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt @@ -0,0 +1,23 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.schema.GraphQLInputObjectType +import graphql.schema.GraphQLSchema + +/** An input object whose extensions come before and after the type in the SDL. inspect.txt lists the fields in schema order. */ +object TypeExtensionsInputOrder : Scenario { + override val name = "type-extensions-input-order" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/type-extensions-input-order/schema.graphqls") + .resolvers(TypeExtensionsInputOrderQuery()) + + override fun inspect(schema: GraphQLSchema) = "Filter fields: ${(schema.getType("Filter") as GraphQLInputObjectType).fieldDefinitions.map { it.name }}" +} + +data class TypeExtensionsInputOrderFilter(val term: String?, val limit: Int?, val offset: Int?) + +class TypeExtensionsInputOrderQuery : GraphQLQueryResolver { + fun count(filter: TypeExtensionsInputOrderFilter?): Int = listOfNotNull(filter?.term, filter?.limit, filter?.offset).size +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt new file mode 100644 index 00000000..5537a7d4 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt @@ -0,0 +1,55 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.schema.GraphQLInputObjectType +import graphql.schema.GraphQLObjectType +import graphql.schema.GraphQLSchema + +/** + * Object and input types that declare a field twice, between a type and its extension, between two extensions and inside + * one definition. They build, and inspect.txt lists the description of the declaration the schema kept. + */ +object TypeExtensionsRepeatedFields : Scenario { + override val name = "type-extensions-repeated-fields" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/type-extensions-repeated-fields/schema.graphqls") + .resolvers(TypeExtensionsRepeatedFieldsQuery()) + + override fun inspect(schema: GraphQLSchema): String { + val objects = listOf("TypeAndExtension", "TwoExtensions", "OneDefinition").map { + "$it.name: ${(schema.getType(it) as GraphQLObjectType).getFieldDefinition("name").description}" + } + val inputs = listOf("InputTypeAndExtension", "InputTwoExtensions", "InputOneDefinition").map { + "$it.id: ${(schema.getType(it) as GraphQLInputObjectType).getField("id").description}" + } + return (objects + inputs).joinToString("\n") + } +} + +data class TypeExtensionsRepeatedFieldsTypeAndExtension(val name: String?) + +data class TypeExtensionsRepeatedFieldsTwoExtensions(val id: String?, val name: String?) + +data class TypeExtensionsRepeatedFieldsOneDefinition(val name: String?) + +data class TypeExtensionsRepeatedFieldsInputTypeAndExtension(val id: String?) + +data class TypeExtensionsRepeatedFieldsInputTwoExtensions(val term: String?, val id: String?) + +data class TypeExtensionsRepeatedFieldsInputOneDefinition(val id: String?) + +class TypeExtensionsRepeatedFieldsQuery : GraphQLQueryResolver { + fun typeAndExtension() = TypeExtensionsRepeatedFieldsTypeAndExtension("a") + + fun twoExtensions() = TypeExtensionsRepeatedFieldsTwoExtensions("b", "c") + + fun oneDefinition() = TypeExtensionsRepeatedFieldsOneDefinition("d") + + fun echo( + typeAndExtension: TypeExtensionsRepeatedFieldsInputTypeAndExtension?, + twoExtensions: TypeExtensionsRepeatedFieldsInputTwoExtensions?, + oneDefinition: TypeExtensionsRepeatedFieldsInputOneDefinition? + ): String = listOf(typeAndExtension?.id, twoExtensions?.term, twoExtensions?.id, oneDefinition?.id).joinToString(",") +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt new file mode 100644 index 00000000..917965ca --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt @@ -0,0 +1,36 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser + +/** + * A union member added by `extend union` and an interface implementor added by `extend type X implements Y`, with no + * dictionary. Their classes can only be found among the subclasses of the sealed class or interface the fields return. + */ +object TypeExtensionsSealed : Scenario { + override val name = "type-extensions-sealed" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/type-extensions-sealed/schema.graphqls") + .resolvers(TypeExtensionsSealedQuery()) +} + +sealed class Pet { + data class Dog(val name: String) : Pet() + + data class Cat(val lives: Int) : Pet() +} + +sealed interface Animal { + val name: String +} + +data class Cow(override val name: String) : Animal + +data class Horse(override val name: String) : Animal + +class TypeExtensionsSealedQuery : GraphQLQueryResolver { + fun pets(): List = listOf(Pet.Dog("Rex"), Pet.Cat(9)) + + fun animals(): List = listOf(Cow("Daisy"), Horse("Spirit")) +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt new file mode 100644 index 00000000..abc97b2c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt @@ -0,0 +1,38 @@ +package scenarios + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import java.util.Optional + +/** Input classes with an Optional property: one ignores a field on purpose, the other misspells one. */ +object UnmappedInputs : Scenario { + override val name = "unmapped-inputs" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/unmapped-inputs/schema.graphqls") + .resolvers(UnmappedInputsQuery()) +} + +class IgnoredInput { + @field:JsonIgnoreProperties("legacy") + var inner: Optional? = null +} + +class InnerInput { + var name: String? = null +} + +class TypoInput { + var item: Optional? = null +} + +class ItemInput { + var nmae: String? = null +} + +class UnmappedInputsQuery : GraphQLQueryResolver { + fun ignored(input: IgnoredInput): String? = input.inner?.get()?.name + + fun typo(input: TypoInput): String? = input.item?.get()?.nmae +} diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt new file mode 100644 index 00000000..5c68d32b --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt @@ -0,0 +1,67 @@ +package scenarios + +import graphql.kickstart.tools.GraphQLQueryResolver +import graphql.kickstart.tools.SchemaParser +import graphql.schema.* +import graphql.schema.idl.SchemaDirectiveWiring +import graphql.schema.idl.SchemaDirectiveWiringEnvironment + +/** Directive wirings on a recursive input (#875) and on types that refer to each other: interface, union, enum, self-reference. */ +object WiringShapes : Scenario { + override val name = "wiring-shapes" + + override fun parser() = SchemaParser.newParser() + .file("scenarios/wiring-shapes/schema.graphqls") + .resolvers(WiringShapesQuery()) + .directive("inspect", InspectWiring()) + .directive("required", RequiredWiring()) + .directive("described", DescribedWiring()) +} + +data class WiringTreeFilter(val name: String?, val children: List?) + +enum class State { ALIVE, GONE } + +class WiringPerson(val name: String) { + val friend: WiringPerson get() = this + val state: State get() = State.ALIVE + val someone: Any get() = this +} + +class WiringShapesQuery : GraphQLQueryResolver { + fun trees(filter: WiringTreeFilter?): Int = filter?.let { 1 + (it.children ?: emptyList()).sumOf { child -> trees(child) } } ?: 0 + + fun person() = WiringPerson("ada") + + fun someone(): Any = WiringPerson("grace") +} + +// records the type the wiring sees in the field's description +class InspectWiring : SchemaDirectiveWiring { + override fun onInputObjectField(environment: SchemaDirectiveWiringEnvironment): GraphQLInputObjectField { + val type = GraphQLTypeUtil.unwrapAllAs(environment.element.type) + return environment.element.transform { it.description("sees ${type.javaClass.simpleName} ${type.name}") } + } +} + +class RequiredWiring : SchemaDirectiveWiring { + override fun onField(environment: SchemaDirectiveWiringEnvironment): GraphQLFieldDefinition = + environment.element.transform { it.type(GraphQLNonNull.nonNull(environment.element.type)) } +} + +class DescribedWiring : SchemaDirectiveWiring { + override fun onObject(environment: SchemaDirectiveWiringEnvironment): GraphQLObjectType = + environment.element.transform { it.description("described") } + + override fun onInterface(environment: SchemaDirectiveWiringEnvironment): GraphQLInterfaceType = + environment.element.transform { it.description("described") } + + override fun onUnion(environment: SchemaDirectiveWiringEnvironment): GraphQLUnionType = + environment.element.transform { it.description("described") } + + override fun onEnum(environment: SchemaDirectiveWiringEnvironment): GraphQLEnumType = + environment.element.transform { it.description("described") } + + override fun onInputObjectType(environment: SchemaDirectiveWiringEnvironment): GraphQLInputObjectType = + environment.element.transform { it.description("described") } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/logback.xml b/.claude/skills/verify-tools/probe/src/main/resources/logback.xml new file mode 100644 index 00000000..d8728fbf --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/logback.xml @@ -0,0 +1,21 @@ + + + ${probe.out}/probe.log + false + + %-5level %logger{36} - %msg%n + + + + System.err + + %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/01-query.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/01-query.graphql new file mode 100644 index 00000000..f6145c99 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/01-query.graphql @@ -0,0 +1,5 @@ +query Async { + future + suspended + shipments { id status } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/02-subscription.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/02-subscription.graphql new file mode 100644 index 00000000..8be1c798 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/02-subscription.graphql @@ -0,0 +1,3 @@ +subscription Ticks { + ticks(count: 3) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/schema.graphqls new file mode 100644 index 00000000..40f853fe --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/schema.graphqls @@ -0,0 +1,14 @@ +type Query { + future: String! + suspended: String! + shipments: [Shipment!]! +} + +type Shipment { + id: ID! + status: String! +} + +type Subscription { + ticks(count: Int!): Int! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore-missing-resolver/extension.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore-missing-resolver/extension.graphqls new file mode 100644 index 00000000..ed31d413 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore-missing-resolver/extension.graphqls @@ -0,0 +1,3 @@ +extend type Book { + isbn: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/01-books.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/01-books.graphql new file mode 100644 index 00000000..253c349c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/01-books.graphql @@ -0,0 +1,9 @@ +query Books { + books { + id + title + published + inStock + author { name } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.graphql new file mode 100644 index 00000000..e7f97751 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.graphql @@ -0,0 +1,7 @@ +query BookById($id: ID!) { + book(id: $id) { + title + author { id name } + } + missing: book(id: "nope") { title } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.variables.json b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.variables.json new file mode 100644 index 00000000..775ead7c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.variables.json @@ -0,0 +1 @@ +{ "id": "b3" } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/schema.graphqls new file mode 100644 index 00000000..8e8fb418 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/schema.graphqls @@ -0,0 +1,24 @@ +scalar Date + +type Query { + books: [Book!]! + book(id: ID!): Book +} + +type Book { + id: ID! + title: String! + author: Author! + published: Date! + inStock: Boolean! +} + +type Author { + id: ID! + name: String! +} + +# Reachable from no root type: graphql-java-tools logs a warning and leaves it out of the schema +type Review { + stars: Int! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/01-query.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/01-query.graphql new file mode 100644 index 00000000..860160ad --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/01-query.graphql @@ -0,0 +1,7 @@ +query { + greeting(name: "ada") + farewell(name: "ada") + user { name locale } + environmentOnly + contextOnly +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/schema.graphqls new file mode 100644 index 00000000..e3779905 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/schema.graphqls @@ -0,0 +1,12 @@ +type Query { + greeting(name: String!): String! + farewell(name: String!): String! + user: User! + environmentOnly: String! + contextOnly: String! +} + +type User { + name: String! + locale: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/01-without-argument.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/01-without-argument.graphql new file mode 100644 index 00000000..f9f1e4e3 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/01-without-argument.graphql @@ -0,0 +1,3 @@ +query { + users { name } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/02-with-argument.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/02-with-argument.graphql new file mode 100644 index 00000000..1f60d526 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/02-with-argument.graphql @@ -0,0 +1,3 @@ +query { + users(first: 1) { name } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/03-context-and-correct.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/03-context-and-correct.graphql new file mode 100644 index 00000000..e0a1a5a0 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/03-context-and-correct.graphql @@ -0,0 +1,4 @@ +query { + contextArgument(name: "ada") + greeting(name: "ada") +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/04-type-resolver.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/04-type-resolver.graphql new file mode 100644 index 00000000..70171552 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/04-type-resolver.graphql @@ -0,0 +1,3 @@ +query { + user { name thumbnail(size: 64) } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/schema.graphqls new file mode 100644 index 00000000..d8385510 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/schema.graphqls @@ -0,0 +1,11 @@ +type Query { + users(first: Int): [User!]! + user: User! + contextArgument(name: String): String + greeting(name: String!): String! +} + +type User { + name: String! + thumbnail(size: Int): String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift-undeclared/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift-undeclared/schema.graphqls new file mode 100644 index 00000000..a00d59f1 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift-undeclared/schema.graphqls @@ -0,0 +1,3 @@ +type Query { + a: String @undeclared(s: "x") +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift/schema.graphqls new file mode 100644 index 00000000..85f2f1e5 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift/schema.graphqls @@ -0,0 +1,79 @@ +schema @tag(name: "schema") @link(url: "https://example.com/v1") @link(url: "https://example.com/v2") { + query: Query +} + +"Tags a node" +directive @tag( + "The tag's name" + name: String! + "How loud" + level: Int = 1 + kind: Kind = PLAIN + meta: Meta +) repeatable on OBJECT | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | ARGUMENT_DEFINITION | SCALAR | SCHEMA + +"Marks a node once" +directive @once( + "Why" + reason: String = "because" +) on OBJECT | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | ARGUMENT_DEFINITION | SCALAR + +directive @link(url: String!) repeatable on SCHEMA + +directive @argDoc(note: String @once @tag(name: "on a directive argument")) on FIELD_DEFINITION + +directive @fieldOnly on FIELD_DEFINITION + +directive @needs(value: String!) on FIELD_DEFINITION + +enum Kind { PLAIN LOUD } + +type Query @tag(name: "query") @once @once { + plain: String + # described by a comment + @tag(name: "plain", level: 2) + @once(reason: "supplied") + @fieldOnly + @argDoc(note: "x") + wrongPlace(arg: String @fieldOnly): String + missing: String @needs + old: String @deprecated + older: String @deprecated(reason: "use plain") + search( + filter: Meta @tag(name: "arg", kind: LOUD, meta: {owner: "me"}) + term: String @once @once + ): String @undeclared(s: "x", i: 1, f: 1.5, b: true, n: null, l: [1, 2], e: []) @undeclared(s: "again") @tag(name: "a") @tag(name: "b") + animal: Animal + pet: Pet + color: Color + when: Date + price: Money +} + +extend type Query @once(reason: "extension") @tag(name: "extension") @undeclared + +interface Animal @tag(name: "animal") @once { + name: String @once @once +} + +type Dog implements Animal { + name: String +} + +union Pet @tag(name: "pet") @once @once = Dog + +enum Color @once { + RED @tag(name: "red") @once @once + GREEN @deprecated + BLUE @deprecated(reason: "too blue") @undeclared(why: "blue") +} + +input Meta @tag(name: "input") @once { + owner: String @once(reason: "x") @once +} + +"A date" +scalar Date @tag(name: "date") @specifiedBy(url: "https://example.com/date") @once +extend scalar Date @once(reason: "extension") @tag(name: "extension") + +scalar Money @tag(nam: "typo") diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/01-query.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/01-query.graphql new file mode 100644 index 00000000..ecd6b647 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/01-query.graphql @@ -0,0 +1,8 @@ +query Invalid { + motto + secret + members { + id + name + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/schema.graphqls new file mode 100644 index 00000000..b2e14ab7 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/schema.graphqls @@ -0,0 +1,20 @@ +directive @uppercase on OBJECT +directive @auth(role: String!, scope: String = "all") on FIELD_DEFINITION +directive @cached(ttl: Int) on FIELD_DEFINITION | SCHEMA + +schema @cached(ttl: 60) { + query: Query +} + +extend schema @cached(ttl: 30) + +type Query { + motto: String! @uppercase + secret: String @auth + members: [Member!] @cached @cached(ttl: 10) +} + +type Member @deprecated { + id: ID! + name: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/01-uppercase.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/01-uppercase.graphql new file mode 100644 index 00000000..80daec1f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/01-uppercase.graphql @@ -0,0 +1,4 @@ +query Uppercase { + motto + oldMotto +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/02-deprecated.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/02-deprecated.graphql new file mode 100644 index 00000000..43fd27bd --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/02-deprecated.graphql @@ -0,0 +1,9 @@ +query Deprecated { + __type(name: "Query") { + fields(includeDeprecated: true) { + name + isDeprecated + deprecationReason + } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/03-connection.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/03-connection.graphql new file mode 100644 index 00000000..23d8dba2 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/03-connection.graphql @@ -0,0 +1,14 @@ +query Members { + members(first: 2) { + edges { + cursor + node { id name } + } + pageInfo { + hasNextPage + hasPreviousPage + startCursor + endCursor + } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/schema.graphqls new file mode 100644 index 00000000..37ef47d2 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/schema.graphqls @@ -0,0 +1,13 @@ +directive @uppercase on FIELD_DEFINITION +directive @connection(for: String!) on FIELD_DEFINITION + +type Query { + motto: String! @uppercase + oldMotto: String! @deprecated(reason: "Use motto") + members(first: Int, after: String): MemberConnection @connection(for: "Member") +} + +type Member { + id: ID! + name: String! @uppercase +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/01-plain.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/01-plain.graphql new file mode 100644 index 00000000..ee5eb8eb --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/01-plain.graphql @@ -0,0 +1 @@ +{ plain(input: { name: "a" }) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/02-generic.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/02-generic.graphql new file mode 100644 index 00000000..61415273 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/02-generic.graphql @@ -0,0 +1 @@ +{ generic(input: { name: "a" }) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/schema.graphqls new file mode 100644 index 00000000..13da2912 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/schema.graphqls @@ -0,0 +1,8 @@ +type Query { + generic(input: GreetingInput!): String! + plain(input: GreetingInput!): String! +} + +input GreetingInput { + name: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/01-search.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/01-search.graphql new file mode 100644 index 00000000..5ec6030a --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/01-search.graphql @@ -0,0 +1,4 @@ +query Search { + defaults: search(term: "dune") + explicit: search(term: "dune", limit: 2, genres: [SCIENCE, HISTORY]) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/02-nickname.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/02-nickname.graphql new file mode 100644 index 00000000..54851ae0 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/02-nickname.graphql @@ -0,0 +1,5 @@ +query Nickname { + omitted: nickname + explicitNull: nickname(value: null) + given: nickname(value: "Bilbo") +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.graphql new file mode 100644 index 00000000..e4cbfcb0 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.graphql @@ -0,0 +1,14 @@ +mutation AddBook($input: BookInput!) { + addBook(input: $input) { + title + genre + tags + pages + language + } + defaults: addBook(input: { title: "Untitled" }) { + genre + tags + pages + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.variables.json b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.variables.json new file mode 100644 index 00000000..ff1ebf8c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.variables.json @@ -0,0 +1 @@ +{ "input": { "title": "Cosmos", "genre": "SCIENCE", "tags": ["space", "classic"], "details": { "pages": 396 } } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/04-invalid-enum.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/04-invalid-enum.graphql new file mode 100644 index 00000000..e6e7fe8f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/04-invalid-enum.graphql @@ -0,0 +1,3 @@ +query InvalidEnum { + search(term: "x", genres: [POETRY]) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/schema.graphqls new file mode 100644 index 00000000..d987dd68 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/schema.graphqls @@ -0,0 +1,34 @@ +type Query { + search(term: String!, limit: Int = 10, genres: [Genre!]): String! + nickname(value: String): String! +} + +type Mutation { + addBook(input: BookInput!): SavedBook! +} + +enum Genre { + FICTION + SCIENCE + HISTORY +} + +input BookInput { + title: String! + genre: Genre = FICTION + tags: [String!] + details: DetailsInput +} + +input DetailsInput { + pages: Int! + language: String = "en" +} + +type SavedBook { + title: String! + genre: Genre! + tags: [String!]! + pages: Int + language: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/01-query.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/01-query.graphql new file mode 100644 index 00000000..190fbb0f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/01-query.graphql @@ -0,0 +1 @@ +{ test count total } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/schema.graphqls new file mode 100644 index 00000000..2c6feced --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/schema.graphqls @@ -0,0 +1,5 @@ +type Query { + test: String + count: Int + total: Int +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/01-results.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/01-results.graphql new file mode 100644 index 00000000..1dbe8f8f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/01-results.graphql @@ -0,0 +1,9 @@ +query Results { + results { + __typename + ... on Book { title } + ... on Media { + ... on Movie { title } + } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/schema.graphqls new file mode 100644 index 00000000..7c040dac --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/schema.graphqls @@ -0,0 +1,15 @@ +type Query { + results: [Result!]! +} + +union Result = Book | Media + +union Media = Movie + +type Book { + title: String! +} + +type Movie { + title: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/01-dates.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/01-dates.graphql new file mode 100644 index 00000000..7edc9dc0 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/01-dates.graphql @@ -0,0 +1 @@ +{ dates } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/02-tried-dates.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/02-tried-dates.graphql new file mode 100644 index 00000000..be584969 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/02-tried-dates.graphql @@ -0,0 +1 @@ +{ triedDates } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/03-plain-future-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/03-plain-future-items.graphql new file mode 100644 index 00000000..ca6d7a1a --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/03-plain-future-items.graphql @@ -0,0 +1 @@ +{ plainFutureItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/04-batched-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/04-batched-items.graphql new file mode 100644 index 00000000..2156bae0 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/04-batched-items.graphql @@ -0,0 +1 @@ +{ batchedItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/05-boxed-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/05-boxed-items.graphql new file mode 100644 index 00000000..08db2ed0 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/05-boxed-items.graphql @@ -0,0 +1 @@ +{ boxedItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/06-later-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/06-later-items.graphql new file mode 100644 index 00000000..aacfda86 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/06-later-items.graphql @@ -0,0 +1 @@ +{ laterItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql new file mode 100644 index 00000000..0dbbf8cc --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql @@ -0,0 +1 @@ +{ suspendPlainFutureItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/schema.graphqls new file mode 100644 index 00000000..dd5ac5ce --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/schema.graphqls @@ -0,0 +1,15 @@ +scalar DateTime + +type Query { + dates: [DateTime] + triedDates: [DateTime!]! + plainFutureItems: [Item] + batchedItems: [Item!]! + boxedItems: [Item!]! + laterItems: [Item] + suspendPlainFutureItems: [Item] +} + +type Item { + id: ID! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/01-nullable-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/01-nullable-items.graphql new file mode 100644 index 00000000..25e05572 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/01-nullable-items.graphql @@ -0,0 +1 @@ +{ nullableItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/02-non-null-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/02-non-null-items.graphql new file mode 100644 index 00000000..d8a89355 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/02-non-null-items.graphql @@ -0,0 +1 @@ +{ nonNullItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql new file mode 100644 index 00000000..9e894423 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql @@ -0,0 +1 @@ +{ typeVariableStrings } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/schema.graphqls new file mode 100644 index 00000000..b1575798 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/schema.graphqls @@ -0,0 +1,9 @@ +type Query { + nullableItems: [Item] + nonNullItems: [Item!]! + typeVariableStrings: [String] +} + +type Item { + id: ID! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/01-payload.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/01-payload.graphql new file mode 100644 index 00000000..3ed5ffc1 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/01-payload.graphql @@ -0,0 +1 @@ +{ payload { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/02-payloads.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/02-payloads.graphql new file mode 100644 index 00000000..84d0bc6b --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/02-payloads.graphql @@ -0,0 +1 @@ +{ payloads { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/03-payload-strings.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/03-payload-strings.graphql new file mode 100644 index 00000000..3568fe8b --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/03-payload-strings.graphql @@ -0,0 +1 @@ +{ payloadStrings } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/04-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/04-items.graphql new file mode 100644 index 00000000..3c1faaf8 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/04-items.graphql @@ -0,0 +1 @@ +{ items { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/05-item-names.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/05-item-names.graphql new file mode 100644 index 00000000..44577a66 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/05-item-names.graphql @@ -0,0 +1 @@ +{ itemNames } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/06-future-of-future.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/06-future-of-future.graphql new file mode 100644 index 00000000..b362257c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/06-future-of-future.graphql @@ -0,0 +1 @@ +{ futureOfFuture { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/07-future-of-tries.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/07-future-of-tries.graphql new file mode 100644 index 00000000..0bcafb9c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/07-future-of-tries.graphql @@ -0,0 +1 @@ +{ futureOfTries { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/08-tries-of-futures.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/08-tries-of-futures.graphql new file mode 100644 index 00000000..590b87ab --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/08-tries-of-futures.graphql @@ -0,0 +1 @@ +{ triesOfFutures { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/09-loaded-items.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/09-loaded-items.graphql new file mode 100644 index 00000000..59304ac9 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/09-loaded-items.graphql @@ -0,0 +1 @@ +{ loadedItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/10-failed-try-in-list.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/10-failed-try-in-list.graphql new file mode 100644 index 00000000..ff1774ab --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/10-failed-try-in-list.graphql @@ -0,0 +1 @@ +{ failedTryInList { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/11-failed-future-in-list.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/11-failed-future-in-list.graphql new file mode 100644 index 00000000..14db363f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/11-failed-future-in-list.graphql @@ -0,0 +1 @@ +{ failedFutureInList { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/12-controls.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/12-controls.graphql new file mode 100644 index 00000000..e79a12bf --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/12-controls.graphql @@ -0,0 +1 @@ +{ plainItems { id } futureOfItems { id } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/schema.graphqls new file mode 100644 index 00000000..1798ee6e --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/schema.graphqls @@ -0,0 +1,23 @@ +type Query { + payload: Payload! + payloads: [Payload!]! + payloadStrings: [String!]! + items: [Item] + itemNames: [String] + futureOfFuture: Item + futureOfTries: [Payload!]! + triesOfFutures: [Item!]! + loadedItems: [Item!]! + failedTryInList: [Payload!] + failedFutureInList: [Item] + plainItems: [Item!]! + futureOfItems: [Item!]! +} + +type Payload { + data: String! +} + +type Item { + id: ID! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/01-optional-result-list.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/01-optional-result-list.graphql new file mode 100644 index 00000000..1664acf9 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/01-optional-result-list.graphql @@ -0,0 +1 @@ +{ optionalResultList { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/schema.graphqls new file mode 100644 index 00000000..4d83858a --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/schema.graphqls @@ -0,0 +1,7 @@ +type Query { + optionalResultList: [Payload] +} + +type Payload { + data: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/01-optional-result.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/01-optional-result.graphql new file mode 100644 index 00000000..c10e6989 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/01-optional-result.graphql @@ -0,0 +1 @@ +{ optionalResult { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/02-result-of-optional.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/02-result-of-optional.graphql new file mode 100644 index 00000000..d441ca28 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/02-result-of-optional.graphql @@ -0,0 +1 @@ +{ resultOfOptional { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/schema.graphqls new file mode 100644 index 00000000..e3d6776d --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/schema.graphqls @@ -0,0 +1,8 @@ +type Query { + optionalResult: Payload + resultOfOptional: Payload +} + +type Payload { + data: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/01-optional-result-of-result.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/01-optional-result-of-result.graphql new file mode 100644 index 00000000..4faaec18 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/01-optional-result-of-result.graphql @@ -0,0 +1 @@ +{ optionalResultOfResult { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/schema.graphqls new file mode 100644 index 00000000..fdcfe753 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/schema.graphqls @@ -0,0 +1,7 @@ +type Query { + optionalResultOfResult: Payload +} + +type Payload { + data: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/01-optional-result.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/01-optional-result.graphql new file mode 100644 index 00000000..c10e6989 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/01-optional-result.graphql @@ -0,0 +1 @@ +{ optionalResult { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/02-optional-result-name.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/02-optional-result-name.graphql new file mode 100644 index 00000000..82e4e071 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/02-optional-result-name.graphql @@ -0,0 +1 @@ +{ optionalResultName } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/03-empty-optional-result.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/03-empty-optional-result.graphql new file mode 100644 index 00000000..60fd0542 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/03-empty-optional-result.graphql @@ -0,0 +1 @@ +{ emptyOptionalResult { data } } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/schema.graphqls new file mode 100644 index 00000000..e3f18278 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/schema.graphqls @@ -0,0 +1,9 @@ +type Query { + optionalResult: Payload + optionalResultName: String + emptyOptionalResult: Payload +} + +type Payload { + data: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/01-fields.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/01-fields.graphql new file mode 100644 index 00000000..49a76a4b --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/01-fields.graphql @@ -0,0 +1,5 @@ +query Fields { + name + unimplemented + __typename +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/02-schema-introspection.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/02-schema-introspection.graphql new file mode 100644 index 00000000..c194bf8f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/02-schema-introspection.graphql @@ -0,0 +1,3 @@ +query SchemaIntrospection { + __schema { queryType { name } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/03-type-introspection.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/03-type-introspection.graphql new file mode 100644 index 00000000..e4089f34 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/03-type-introspection.graphql @@ -0,0 +1,3 @@ +query TypeIntrospection { + __type(name: "Query") { name } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/schema.graphqls new file mode 100644 index 00000000..4940232b --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/schema.graphqls @@ -0,0 +1,4 @@ +type Query { + name: String! + unimplemented: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/01-node.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/01-node.graphql new file mode 100644 index 00000000..8e7ddae2 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/01-node.graphql @@ -0,0 +1,11 @@ +query Nodes { + novel: node(id: "n1") { + __typename + id + ... on Novel { title } + } + writer: node(id: "w1") { + __typename + ... on Writer { name } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/02-union.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/02-union.graphql new file mode 100644 index 00000000..28426ae5 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/02-union.graphql @@ -0,0 +1,7 @@ +query Search { + search(term: "s") { + __typename + ... on Novel { title } + ... on Writer { name } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/schema.graphqls new file mode 100644 index 00000000..64920e7a --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/schema.graphqls @@ -0,0 +1,20 @@ +type Query { + node(id: ID!): Node + search(term: String!): [SearchResult!]! +} + +interface Node { + id: ID! +} + +type Novel implements Node { + id: ID! + title: String! +} + +type Writer implements Node { + id: ID! + name: String! +} + +union SearchResult = Novel | Writer diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/01-interface.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/01-interface.graphql new file mode 100644 index 00000000..b7680fb9 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/01-interface.graphql @@ -0,0 +1,3 @@ +{ + animal(name: "Tom") { __typename name ... on Cat { lives } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/02-union.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/02-union.graphql new file mode 100644 index 00000000..4b85d0a7 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/02-union.graphql @@ -0,0 +1,3 @@ +{ + pets { __typename ... on Dog { name barks } ... on Cat { name lives } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/03-no-mutation.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/03-no-mutation.graphql new file mode 100644 index 00000000..de47fce6 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/03-no-mutation.graphql @@ -0,0 +1,3 @@ +{ + __schema { mutationType { name } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/schema.graphqls new file mode 100644 index 00000000..55e0dca1 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/schema.graphqls @@ -0,0 +1,29 @@ +directive @tag(name: String!) on FIELD_DEFINITION +directive @contact(name: String!) on SCHEMA + +extend schema @contact(name: "pets-team") + +type Query { + animal(name: String!): Animal + pets: [Pet!]! +} + +type Mutation { + adopt(name: String!): Animal! +} + +interface Animal { + name: String! @tag(name: "public") +} + +type Dog implements Animal { + name: String! @tag(name: "public") + barks: Boolean! +} + +type Cat implements Animal { + name: String! @tag(name: "public") + lives: Int! +} + +union Pet = Dog | Cat diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.graphql new file mode 100644 index 00000000..c38a92ed --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.graphql @@ -0,0 +1,5 @@ +query Describe($filter: TreeFilter!) { + describe(filter: $filter) + literal: describe(filter: { name: "x", child: { depth: 1, siblings: [[{ depth: 2 }]] } }) + names(first: 2) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.variables.json b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.variables.json new file mode 100644 index 00000000..91519580 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.variables.json @@ -0,0 +1 @@ +{"filter": {"name": "root", "and": [{"name": "a"}, {"not": {"name": "b"}}], "child": {"depth": 3, "parent": {"name": "up"}, "siblings": [[{"depth": 4}], []]}}} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/02-introspect.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/02-introspect.graphql new file mode 100644 index 00000000..7efc5c33 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/02-introspect.graphql @@ -0,0 +1,6 @@ +query Introspect { + __schema { + directives { name args { name defaultValue type { kind name ofType { kind name ofType { kind name } } } } } + types { name inputFields { name type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/schema.graphqls new file mode 100644 index 00000000..7f300298 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/schema.graphqls @@ -0,0 +1,29 @@ +directive @limit(range: RangeInput!, unit: LimitUnit = ITEMS, labels: [String!]) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION + +enum LimitUnit { + ITEMS + PAGES +} + +input RangeInput { + min: Int! + max: Int! +} + +type Query { + describe(filter: TreeFilter!): String! @limit(range: {min: 0, max: 5}, labels: ["a", "b"]) + names(first: Int @limit(range: {min: 1, max: 10}, unit: PAGES)): [String!]! +} + +input TreeFilter { + name: String + and: [TreeFilter!] + not: TreeFilter + child: ChildFilter +} + +input ChildFilter { + parent: TreeFilter + siblings: [[ChildFilter!]!] + depth: Int! @limit(range: {min: 1, max: 3}) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/01-custom-scalar.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/01-custom-scalar.graphql new file mode 100644 index 00000000..96f15786 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/01-custom-scalar.graphql @@ -0,0 +1 @@ +{ tag(tag: "kotlin") tags(tags: ["a", "b"]) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/02-id.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/02-id.graphql new file mode 100644 index 00000000..a6cd5e09 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/02-id.graphql @@ -0,0 +1 @@ +{ id(id: "42") } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/03-nested-sets.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/03-nested-sets.graphql new file mode 100644 index 00000000..2f6288dd --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/03-nested-sets.graphql @@ -0,0 +1 @@ +{ nestedSets(tags: [["a", "a", "b"], ["c"]]) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/04-nested-lists.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/04-nested-lists.graphql new file mode 100644 index 00000000..c51981e1 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/04-nested-lists.graphql @@ -0,0 +1 @@ +{ nestedLists(tags: [["a", "a", "b"], ["c"]]) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/05-empty-kotlin-scalar.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/05-empty-kotlin-scalar.graphql new file mode 100644 index 00000000..8f06720a --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/05-empty-kotlin-scalar.graphql @@ -0,0 +1 @@ +{ tokenInput(input: { token: "input" }) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql new file mode 100644 index 00000000..641761cd --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql @@ -0,0 +1 @@ +{ markedTokens(input: { typed: "typed", wrapped: "wrapped", ids: ["first", "second"] }) } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql new file mode 100644 index 00000000..494654aa --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql @@ -0,0 +1,4 @@ +{ + optionalTypedToken(token: "optional") + optionalIdToken(token: "optional") +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/schema.graphqls new file mode 100644 index 00000000..8f527f56 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/schema.graphqls @@ -0,0 +1,27 @@ +scalar Tag +scalar Token +scalar TypedToken +scalar WrappedToken +scalar IdToken + +type Query { + tag(tag: Tag!): String! + tags(tags: [Tag!]!): String! + id(id: ID!): String! + nestedSets(tags: [[String!]!]!): String! + nestedLists(tags: [[String!]!]!): String! + tokenInput(input: TokenInput!): String! + markedTokens(input: MarkedTokensInput!): String! + optionalTypedToken(token: TypedToken): String! + optionalIdToken(token: IdToken): String! +} + +input TokenInput { + token: Token +} + +input MarkedTokensInput { + typed: TypedToken + wrapped: WrappedToken + ids: [IdToken!] +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/01-introspect-scalars.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/01-introspect-scalars.graphql new file mode 100644 index 00000000..77098e98 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/01-introspect-scalars.graphql @@ -0,0 +1,3 @@ +query { + __schema { types { name kind description specifiedByURL } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/02-use-scalars.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/02-use-scalars.graphql new file mode 100644 index 00000000..e0f4fdc3 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/02-use-scalars.graphql @@ -0,0 +1,6 @@ +query { + today + now + shift(from: "2020-01-01") + price +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/schema.graphqls new file mode 100644 index 00000000..48bba21e --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/schema.graphqls @@ -0,0 +1,17 @@ +directive @since(date: Date) on SCALAR | FIELD_DEFINITION +directive @unit(name: String!) on SCALAR + +"A calendar date" +scalar Date @specifiedBy(url: "https://example.com/date") +extend scalar Date @since(date: "2020-01-01") @unit(name: "day") + +scalar DateTime + +scalar Money @currency(code: "USD") + +type Query { + today: Date @since(date: "2021-01-01") + now: DateTime + shift(from: Date): Date + price: Money +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/01-thumbnail.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/01-thumbnail.graphql new file mode 100644 index 00000000..70583e56 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/01-thumbnail.graphql @@ -0,0 +1,3 @@ +query { + folder { images { name thumbnail(size: 64) } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/schema.graphqls new file mode 100644 index 00000000..82fdf346 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/schema.graphqls @@ -0,0 +1,12 @@ +type Query { + folder: Folder! +} + +type Folder { + images: [Image!]! +} + +type Image { + name: String! + thumbnail(size: Int): String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/01-shadowed.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/01-shadowed.graphql new file mode 100644 index 00000000..50b50a22 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/01-shadowed.graphql @@ -0,0 +1,3 @@ +query { + folder { images { name title } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/schema.graphqls new file mode 100644 index 00000000..e9a28d7c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/schema.graphqls @@ -0,0 +1,12 @@ +type Query { + folder: Folder! +} + +type Folder { + images: [Image!]! +} + +type Image { + name: String! + title: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/01-helper.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/01-helper.graphql new file mode 100644 index 00000000..50dd7b02 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/01-helper.graphql @@ -0,0 +1,3 @@ +query { + folder { images { name imageBlob preview } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/schema.graphqls new file mode 100644 index 00000000..ac354e43 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/schema.graphqls @@ -0,0 +1,13 @@ +type Query { + folder: Folder! +} + +type Folder { + images: [Image!]! +} + +type Image { + name: String! + imageBlob: String! + preview: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/01-local-context.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/01-local-context.graphql new file mode 100644 index 00000000..15559cd9 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/01-local-context.graphql @@ -0,0 +1,3 @@ +query { + folder { images { name imageBlob thumbnail(size: 64) caption } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/02-contexts.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/02-contexts.graphql new file mode 100644 index 00000000..6a5e7e1e --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/02-contexts.graphql @@ -0,0 +1,3 @@ +query { + folder { images { name owner locale signature } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/schema.graphqls new file mode 100644 index 00000000..21659169 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/schema.graphqls @@ -0,0 +1,18 @@ +type Query { + folder: Folder! +} + +type Folder { + supportedFileTypes: [String!]! + images: [Image!]! +} + +type Image { + name: String! + imageBlob: String! + thumbnail(size: Int!): String! + owner: String + locale: String! + signature: String! + caption: String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/01-count.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/01-count.graphql new file mode 100644 index 00000000..20456a0e --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/01-count.graphql @@ -0,0 +1,3 @@ +query { + count(filter: { term: "a", limit: 1, offset: 2 }) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/schema.graphqls new file mode 100644 index 00000000..8fb7ff41 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/schema.graphqls @@ -0,0 +1,15 @@ +type Query { + count(filter: Filter): Int! +} + +extend input Filter { + limit: Int +} + +input Filter { + term: String +} + +extend input Filter { + offset: Int +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql new file mode 100644 index 00000000..46ca005e --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql @@ -0,0 +1,10 @@ +query { + typeAndExtension { name } + twoExtensions { id name } + oneDefinition { name } + echo( + typeAndExtension: { id: "1" } + twoExtensions: { term: "t", id: "2" } + oneDefinition: { id: "3" } + ) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/02-introspection.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/02-introspection.graphql new file mode 100644 index 00000000..2ae3452f --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/02-introspection.graphql @@ -0,0 +1,9 @@ +query { + __schema { + types { + name + fields { name description } + inputFields { name description } + } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/schema.graphqls new file mode 100644 index 00000000..94479c98 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/schema.graphqls @@ -0,0 +1,72 @@ +type Query { + typeAndExtension: TypeAndExtension + twoExtensions: TwoExtensions + oneDefinition: OneDefinition + echo( + typeAndExtension: InputTypeAndExtension + twoExtensions: InputTwoExtensions + oneDefinition: InputOneDefinition + ): String +} + +type TypeAndExtension { + "From the type" + name: String +} + +extend type TypeAndExtension { + "From the extension" + name: String +} + +type TwoExtensions { + id: ID +} + +extend type TwoExtensions { + "From the first extension" + name: String +} + +extend type TwoExtensions { + "From the second extension" + name: String +} + +type OneDefinition { + "The first" + name: String + "The second" + name: String +} + +input InputTypeAndExtension { + "From the type" + id: ID +} + +extend input InputTypeAndExtension { + "From the extension" + id: ID +} + +input InputTwoExtensions { + term: String +} + +extend input InputTwoExtensions { + "From the first extension" + id: ID +} + +extend input InputTwoExtensions { + "From the second extension" + id: ID +} + +input InputOneDefinition { + "The first" + id: ID + "The second" + id: ID +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/01-pets-and-animals.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/01-pets-and-animals.graphql new file mode 100644 index 00000000..98533be9 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/01-pets-and-animals.graphql @@ -0,0 +1,11 @@ +query { + pets { + __typename + ... on Dog { name } + ... on Cat { lives } + } + animals { + __typename + name + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/schema.graphqls new file mode 100644 index 00000000..bdac91b3 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/schema.graphqls @@ -0,0 +1,30 @@ +type Query { + pets: [Pet!]! + animals: [Animal!]! +} + +union Pet = Dog + +extend union Pet = Cat + +type Dog { + name: String +} + +type Cat { + lives: Int +} + +interface Animal { + name: String +} + +type Cow implements Animal { + name: String +} + +type Horse { + name: String +} + +extend type Horse implements Animal diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/01-node.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/01-node.graphql new file mode 100644 index 00000000..07289dca --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/01-node.graphql @@ -0,0 +1,16 @@ +query { + article: node(id: "a1") { + __typename + id + createdAt + name + ... on Article { title } + } + video: node(id: "v1") { + __typename + id + createdAt + name + ... on Video { seconds } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/02-search-and-enums.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/02-search-and-enums.graphql new file mode 100644 index 00000000..f578be07 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/02-search-and-enums.graphql @@ -0,0 +1,10 @@ +query { + search { + __typename + ... on Article { title } + ... on Video { seconds } + } + colors + shades + count(filter: { term: "launched", limit: 5 }) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/03-introspection.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/03-introspection.graphql new file mode 100644 index 00000000..088b57c7 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/03-introspection.graphql @@ -0,0 +1,13 @@ +query { + __schema { + types { + name + kind + fields { name description } + interfaces { name } + possibleTypes { name } + enumValues { name description } + inputFields { name } + } + } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls new file mode 100644 index 00000000..b0488c03 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls @@ -0,0 +1,73 @@ +directive @tag(name: String!) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT +directive @owner(team: String!) on OBJECT + +type Query { + node(id: ID!): Node + search: [SearchResult!]! + colors: [Color!]! + shades: [Shade!]! + count(filter: Filter!): Int! +} + +interface Node @tag(name: "base") { + "The base id" + id: ID! + createdAt: String +} + +extend interface Node @tag(name: "extension") { + "The extension id" + id: ID! + name: String +} + +type Article implements Node @owner(team: "content") @tag(name: "base") { + id: ID! + createdAt: String + name: String + title: String +} + +extend type Article @owner(team: "growth") @tag(name: "extension") + +type Video { + id: ID! + createdAt: String + name: String + seconds: Int +} + +extend type Video implements Node + +union SearchResult @tag(name: "base") = Article + +extend union SearchResult @tag(name: "extension") = Video | Article + +enum Color @tag(name: "base") { + "The first red" + RED + BLUE +} + +extend enum Color @tag(name: "extension") { + RED + GREEN +} + +extend enum Shade { LIGHT } + +extend enum Shade { DARK } + +input Filter @tag(name: "base") { + term: String +} + +extend input Filter @tag(name: "extension") { + limit: Int +} + +type Note { + text: String +} + +extend union Note = Article diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/01-ignored.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/01-ignored.graphql new file mode 100644 index 00000000..da3a853c --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/01-ignored.graphql @@ -0,0 +1,3 @@ +query { + ignored(input: { inner: { name: "a", legacy: "x" } }) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/02-typo.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/02-typo.graphql new file mode 100644 index 00000000..f6465561 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/02-typo.graphql @@ -0,0 +1,3 @@ +query { + typo(input: { item: { name: "b" } }) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/schema.graphqls new file mode 100644 index 00000000..b466a9a9 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/schema.graphqls @@ -0,0 +1,21 @@ +type Query { + ignored(input: IgnoredInput!): String + typo(input: TypoInput!): String +} + +input IgnoredInput { + inner: InnerInput +} + +input InnerInput { + name: String + legacy: String +} + +input TypoInput { + item: ItemInput +} + +input ItemInput { + name: String +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/01-trees.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/01-trees.graphql new file mode 100644 index 00000000..abf0d8fc --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/01-trees.graphql @@ -0,0 +1,3 @@ +query { + trees(filter: { name: "a", children: [{ name: "b" }, { name: "c", children: [{ name: "d" }] }] }) +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/02-person.graphql b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/02-person.graphql new file mode 100644 index 00000000..9a424c39 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/02-person.graphql @@ -0,0 +1,4 @@ +query { + person { name friend { name } state someone { ... on Person { name } } } + someone { ... on Named { name } } +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/schema.graphqls b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/schema.graphqls new file mode 100644 index 00000000..180fe7d6 --- /dev/null +++ b/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/schema.graphqls @@ -0,0 +1,32 @@ +directive @inspect on INPUT_FIELD_DEFINITION +directive @required on FIELD_DEFINITION +directive @described on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT + +type Query { + trees(filter: TreeFilter): Int + person: Person + someone: Someone +} + +input TreeFilter @described { + name: String + children: [TreeFilter!] @inspect +} + +interface Named @described { + name: String +} + +type Person implements Named @described { + name: String + friend: Person @required + state: State @required + someone: Someone +} + +union Someone @described = Person + +enum State @described { + ALIVE + GONE +} From 2aa609ec563200509d3eaf8a0744194b5a90d8ef Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:49:58 -0500 Subject: [PATCH 02/64] Ignore local agent and Maven files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 5b53fe18..e6539ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ target/ pom.xml.releaseBackup release.properties +.mvn/jvm.config +.local/ +CLAUDE.local.md +.claude/settings.local.json +.claude/worktrees/ From dcf70b34574ae450a227380db11a81650e4469c3 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:52:19 -0500 Subject: [PATCH 03/64] Add AGENTS.md with the agent rules and a rule table CLAUDE.md imports it, so Claude Code, Cursor and Codex read the same rules in every clone and worktree. --- AGENTS.md | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 110 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..d0dd42b2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,109 @@ +# graphql-java-tools + +Open-source library (`io.github.graphql-java-kickstart:graphql-java-tools`) that builds a graphql-java schema from GraphQL SDL and +resolver classes. Published to Maven Central. Kotlin, with a few Java files, targeting Java 17. + +## Layout + +- `src/main/kotlin/graphql/kickstart/tools`: `SchemaParser` and its builder and options, `SchemaClassScanner` (matches schema + types to classes), `resolver/` (field resolvers and data fetchers), `directive/`, `relay/`, `util/` +- `src/test/kotlin`: JUnit tests, one class per feature or issue. `EndToEndTest` and `EndToEndSpecHelper` hold the shared schema + and resolvers +- `.claude/skills/verify-tools`: the probe that checks a change from a consuming app's side + +## Build and test + +```bash +mvn verify +``` + +Compiler warnings fail the build. CI runs `mvn verify` on JDK 17, 21 and 25. A newer local JDK can pass code that fails on +17, so run the build on JDK 17 before you push. + +Machine-specific Maven JVM flags go in `.mvn/jvm.config` and personal agent rules go in `CLAUDE.local.md`. Git ignores both. + +## Verifying + +Run the `verify-tools` skill (`.claude/skills/verify-tools/SKILL.md`) before you push any change to how the schema is built, +refactors and new or changed warnings included. `mvn verify` runs the library's own tests. The probe builds a schema +through the public API only, the way an app does. Bugfixes and small features stop at this skill. + +## Compatibility + +- Public API changes must stay backwards compatible. Deprecate before removing. +- Invalid input that used to build stays accepted until the next major. Log a WARN that names the type and the item, open a + GitHub issue with the target major in its title (the repo has no milestones), and leave `// TODO in X.0.0 (#N)`. + +## GitHub + +- PRs follow `.github/pull-request-template.md` and the + [contribution guide](https://github.com/graphql-java-kickstart/graphql-java-tools/wiki/Contribution-guide). Open them as ready + for review, not drafts. Reference the issue with `Fixes #N`. +- A follow-up to an open PR goes into that PR as another commit. +- Deferred work and out-of-scope findings become GitHub issues. +- When a PR has release-note material, add it to the PR description. + +## Releases + +Follow the [Releasing a version](https://github.com/graphql-java-kickstart/graphql-java-tools/wiki/Releasing-a-version) wiki +page. `github-build.sh` and `.github/workflows/release.yml` do the version bump, tag and publish. + +## Rules that need judgment + +No check can enforce these, so each one names the mistake it prevents. + +- **Build only what was asked.** Don't add support for a case nobody asked for. Ask first. Failure: a PR made the library call + JDK proxied resolver methods through the proxy's interfaces, a shape no user had reported. A later commit replaced that + with a warning at build and deleted 282 lines (`76b67394`). +- **Check every claim in a PR body or release note at the current head.** Re-read the body after each push. A claim about + what users do needs an issue comment or a consumer's code behind it. Failure: a PR body said existing tests already + proved scalars pass through unchanged, and none of them did. +- **Add a variant to the existing test class and its shared fixtures.** Write one test per behavior and cover variants with + a table or a generated matrix, as `NestedGenericWrapperTest` does. Failure: a directive change added a test and + fixtures per variant, and a later commit folded seven of those tests into one (`f8c7be76`). +- **Run verify-tools on refactors and warning changes too.** A change called "a refactor" or "only the wording" still + changes what an app's schema build does, and the unit tests don't build through the public API alone. Failure: an agent + skipped the probe on a scanner rewrite because it was a refactor. +- **Keep a comment only for a non-obvious why.** No comment that repeats the code, narrates history, or carries an issue or + PR number outside a TODO. Failure: a comment explained what `determineType` returned, which the `namedType` default + already showed, and a follow-up commit deleted it (`7448f2c6`). + +## Rule table + +Each rule comes from a mistake agents made in this repo more than once. The second column names what fails when the rule +is broken. "docs only" means nothing does yet, so the rule depends on you reading it. + +| Rule | Enforced by | +|---|---| +| A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | docs only | +| A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | +| One output has one builder. Don't add a second path that builds the same thing | docs only | +| Read an SDL type's members merged with its extensions, never from the raw definition | docs only | +| Reuse an existing structure before you add a parallel one | docs only | +| Argument conversion goes through one entry point | docs only | +| An input field's Java type comes from the mapping Jackson uses, not from guessed getters | docs only | +| Every recursive walk over the type graph handles cycles, and a test covers a cycle | docs only | +| Public signatures stay binary compatible, data class `copy()` and `componentN` included | docs only | +| Remove the plumbing a change leaves unused | Compiler warnings for unused locals, docs only for the rest | +| A new warning or build error names the type and the item and uses `SourceLocation.describe()` for its location | docs only | +| A check keyed on a class name or an exception type has a test that fails when the dependency moves it | docs only | +| Work that depends only on the schema happens at schema build, not on every fetch | docs only | +| Schema build time grows linearly with the schema | docs only | +| A subtype check has a test with a subclass, so an inverted check fails | docs only | +| Directive wirings decide which types become `GraphQLTypeReference` in one place | `TypeReferences` in `DirectiveWiringHelper` | +| An object built once at schema build holds no per-request state | docs only | +| Add a variant to the existing test class and its shared fixtures | docs only | +| A new test fails without the change it guards | docs only | +| A fix keeps every shape that worked on the last release | docs only | +| A test that builds a schema also queries its fields with `assertEveryFieldResolves` | docs only | +| The first commit of a fix tests the neighbouring shapes, not just the reported one | docs only | +| The build passes on JDK 17, the lowest supported version | CI on JDK 17, 21 and 25 | +| Run verify-tools before you push a schema-building change | docs only | +| The packaged jar matches the pom's module and Java target | docs only | +| Compiler warnings fail the build | `-Werror` and `failOnWarning` in `pom.xml` | +| Check every claim in a PR body or release note at the current head | docs only | +| Keep a comment only for a non-obvious why, with no history and no issue numbers outside a TODO | docs only | +| Build only what was asked | docs only | +| Agent worktrees and local settings stay out of commits | `.gitignore` | +| Agent rules live in one committed file | This file. `CLAUDE.md` imports it | +| Invalid input that used to build logs a WARN until the next major | docs only | diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..43c994c2 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md From d4c3c773b970151ae8813bdce91bfcb984f73d3b Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:51:35 -0500 Subject: [PATCH 04/64] Fail the build on issue numbers and history in comments CommentConventionsTest scans the comments in src/main and src/test and fails on an issue number outside a `// TODO in X.0.0 (#N)`, on history narration such as "as before" or "no longer", and on "@since" or "since X.Y". It matches each comment block as one text, so a phrase split across lines is caught too. Each failure names the file and line, the rule, the matched phrase and the fix. A `lint-allow until YYYY-MM-DD by : ` marker on the line suppresses one rule for at most 90 days. An expired, reasonless or malformed marker fails. Removes the two comments that broke the rules. SchemaClassScannerInterfaceFieldTest already pins the scan order the scanner comment explained. Co-Authored-By: Claude --- .../kickstart/tools/SchemaClassScanner.kt | 3 - .../kickstart/tools/CommentConventionsTest.kt | 224 ++++++++++++++++++ .../tools/SchemaClassScannerDirectiveTest.kt | 1 - 3 files changed, 224 insertions(+), 4 deletions(-) create mode 100644 src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt index 5a63f30d..42f312e2 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt @@ -123,9 +123,6 @@ internal class SchemaClassScanner( handleDictionaryTypes(getAllObjectTypeMembersOfDiscoveredUnions()) { "Object type '${it.name}' is a member of a known union, but no class could be found for that type name. Please pass a class for type '${it.name}' in the parser's dictionary." } if (scanQueue()) continue - // Look for unions and interfaces used only by interface fields last, so types that can be reached some other way - // are still discovered in the same order as before. With includeUnusedTypes the unused types loop below already - // picks these up one at a time, scanning in between, so leave that path unchanged. if (!options.includeUnusedTypes && handleInterfaceFieldTypes()) continue break diff --git a/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt b/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt new file mode 100644 index 00000000..eababb4a --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt @@ -0,0 +1,224 @@ +package graphql.kickstart.tools + +import org.junit.Assert.assertEquals +import org.junit.Assert.fail +import org.junit.Test +import java.io.File +import java.time.LocalDate + +class CommentConventionsTest { + + @Test + fun `comments carry no issue numbers, history or versions`() { + val violations = listOf(File("src/main"), File("src/test")).asSequence() + .flatMap { it.walkTopDown() } + .filter { it.isFile && it.extension in setOf("kt", "java") } + .sortedBy { it.path } + .flatMap { CommentLint.check(it.path, it.readText(), LocalDate.now()) } + .toList() + + if (violations.isNotEmpty()) { + fail(violations.joinToString("\n", "${violations.size} comment(s) break the comment conventions:\n")) + } + } + + @Test + fun `lint matches whole comment blocks and honors only valid markers`() { + fun rules(source: String) = CommentLint.check("Example.kt", source, LocalDate.of(2026, 11, 4)).map { it.rule } + + assertEquals(listOf("history"), rules("/* this used to\n * be slow */")) + assertEquals(listOf("history"), rules("// this used to\n// be slow")) + assertEquals(listOf("issue-number"), rules("// see #999")) + assertEquals(listOf("version"), rules("/** @since 15.0 */")) + assertEquals(emptyList(), rules("// TODO reject in 16.0.0 (#999)")) + assertEquals(emptyList(), rules("val s = \"// see #999\"")) + assertEquals(emptyList(), rules("// unchanged lint-allow history until 2026-12-01 by oryan: domain term")) + assertEquals(listOf("lint-allow", "history"), rules("// unchanged lint-allow history until 2026-11-03 by oryan: expired")) + assertEquals(listOf("lint-allow", "history"), rules("// unchanged lint-allow history until 2026-12-01 by oryan:")) + assertEquals(listOf("lint-allow", "history"), rules("// unchanged lint-allow history until 2027-06-01 by oryan: too late")) + assertEquals(listOf("history"), rules("// unchanged lint-allow version until 2026-12-01 by oryan: other rule")) + } +} + +internal object CommentLint { + + class Violation(val path: String, val line: Int, val rule: String, val match: String, val lineText: String, val fix: String) { + override fun toString() = "$path:$line [$rule] \"$match\" in: $lineText\n fix: $fix" + } + + private class Rule(val id: String, val pattern: Regex, val fix: String) + + private const val MOVE_TO_PR = "move the reason into the PR description" + + private val historyPhrases = listOf( + """\bused to be\b""", + """\bunchanged\b""", + """\bpreviously\b""", + """\bno longer\b""", + """\bany ?more\b""", + """\bbefore (?:this|the|that) (?:change|check|fix|pr|commit)\b""", + """\b(?:before|after|until|since) #\d+""", + """\bas (?:it|they) did\b""", + """\b(?:as|like|than) before\b""", + """\bstill (?:builds?|works?|building|working)\b""", + """\bkeeps? (?:those |these |such |existing |old )?(?:schemas? )?(?:building|working)\b""", + """\bworkaround for\b""", + """\b(?:is|are|does|do|returns?|throws?) now\b""", + """\bnow (?:also |always |only )?(?:returns?|throws?|fails?|builds?|keeps?|logs?|warns?|works?|supports?)\b""", + ) + + private val rules = listOf( + Rule( + "issue-number", + Regex("""(? in X.0.0 (#N)`" + ), + Rule( + "history", + Regex(historyPhrases.joinToString("|"), RegexOption.IGNORE_CASE), + "say what the code does and why, not how it got here; $MOVE_TO_PR" + ), + Rule( + "version", + Regex("""@since\b|\bsince (?:v|version )?\d+\.\d+""", RegexOption.IGNORE_CASE), + "drop the version; history goes in the release notes" + ), + ) + + private const val MARKER_MAX_DAYS = 90L + private val marker = Regex("""lint-allow.*""") + private val validMarker = Regex("""lint-allow ([\w-]+) until (\d{4}-\d{2}-\d{2}) by [\w-]+: \S.*""") + private val markerFix = "reword the comment and drop the marker, or write `lint-allow until YYYY-MM-DD by : " + + "` with a rule from ${rules.joinToString { it.id }} and a date at most $MARKER_MAX_DAYS days ahead" + private val todoIssue = Regex("""\bTODO\b[^#]*?\bin \d+\.0\.0 (\(#\d+\))""") + + fun check(path: String, source: String, today: LocalDate): List = + CommentLexer(source).blocks().flatMap { check(path, it, today) } + + private fun check(path: String, block: List>, today: LocalDate): List { + val violations = mutableListOf() + val allowed = mutableMapOf() + val lineStarts = mutableListOf() + val text = StringBuilder() + block.forEach { (line, lineText) -> + val found = marker.find(lineText) + if (found != null) { + val rule = allowedRule(found.value, today) + if (rule == null) violations += Violation(path, line, "lint-allow", found.value, lineText, markerFix) + else allowed[line] = rule + } + if (text.isNotEmpty()) text.append(' ') + lineStarts += text.length + text.append(if (found == null) lineText else lineText.substring(0, found.range.first)) + } + val checked = todoIssue.replace(text) { + val issue = it.groupValues[1] + it.value.dropLast(issue.length) + " ".repeat(issue.length) + } + rules.forEach { rule -> + rule.pattern.findAll(checked).forEach { match -> + val (line, lineText) = block[lineStarts.indexOfLast { it <= match.range.first }] + if (allowed[line] != rule.id) violations += Violation(path, line, rule.id, match.value, lineText, rule.fix) + } + } + return violations.sortedBy { it.line } + } + + private fun allowedRule(marker: String, today: LocalDate): String? { + val match = validMarker.matchEntire(marker) ?: return null + val until = runCatching { LocalDate.parse(match.groupValues[2]) }.getOrNull() ?: return null + val rule = match.groupValues[1] + val inWindow = !until.isBefore(today) && !until.isAfter(today.plusDays(MARKER_MAX_DAYS)) + return rule.takeIf { inWindow && rules.any { it.id == rule } } + } +} + +private class CommentLexer(private val source: String) { + private var pos = 0 + private var line = 1 + private var lastLineCommentLine = -1 + private val blocks = mutableListOf>>() + + fun blocks(): List>> { + code(insideTemplate = false) + return blocks.map { block -> block.filter { it.second.isNotEmpty() } }.filter { it.isNotEmpty() } + } + + private fun peek(text: String) = source.startsWith(text, pos) + + private fun advance(count: Int = 1) { + repeat(count) { + if (pos < source.length && source[pos] == '\n') line++ + pos++ + } + } + + private fun code(insideTemplate: Boolean) { + var depth = 0 + while (pos < source.length) { + when { + peek("//") -> lineComment() + peek("/*") -> blockComment() + peek("\"\"\"") -> rawString() + peek("\"") -> string() + peek("'") -> quoted('\'') + peek("`") -> quoted('`') + insideTemplate && peek("{") -> { depth++; advance() } + insideTemplate && peek("}") -> { if (depth == 0) { advance(); return }; depth--; advance() } + else -> advance() + } + } + } + + private fun lineComment() { + val end = source.indexOf('\n', pos).let { if (it < 0) source.length else it } + val entry = line to source.substring(pos, end).trimStart('/').trim() + if (lastLineCommentLine == line - 1) blocks.last() += entry else blocks += mutableListOf(entry) + lastLineCommentLine = line + pos = end + } + + private fun blockComment() { + val startLine = line + val start = pos + advance(2) + var depth = 1 + while (pos < source.length && depth > 0) { + when { + peek("/*") -> { depth++; advance(2) } + peek("*/") -> { depth--; advance(2) } + else -> advance() + } + } + val lines = source.substring(start, pos).removePrefix("/**").removePrefix("/*").removeSuffix("*/").lines() + blocks += lines.mapIndexedTo(mutableListOf()) { index, text -> (startLine + index) to text.trim().removePrefix("*").trim() } + lastLineCommentLine = -1 + } + + private fun rawString() { + advance(3) + while (pos < source.length && !peek("\"\"\"")) { + if (peek("\${")) { advance(2); code(insideTemplate = true) } else advance() + } + advance(3) + while (peek("\"")) advance() + } + + private fun string() { + advance() + while (pos < source.length && !peek("\"") && !peek("\n")) { + when { + peek("\\") -> advance(2) + peek("\${") -> { advance(2); code(insideTemplate = true) } + else -> advance() + } + } + advance() + } + + private fun quoted(quote: Char) { + advance() + while (pos < source.length && source[pos] != quote && source[pos] != '\n') advance(if (peek("\\")) 2 else 1) + advance() + } +} diff --git a/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerDirectiveTest.kt b/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerDirectiveTest.kt index d4be4579..34acc20b 100644 --- a/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerDirectiveTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerDirectiveTest.kt @@ -293,7 +293,6 @@ class SchemaClassScannerDirectiveTest { assertEquals(error.message, message) } - // the enum and directive from issue #823 private val linkDirective = """ enum Purpose { SECURITY EXECUTION } From eba055532598b686266c52c2741b4daf5698bd56 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:56:45 -0500 Subject: [PATCH 05/64] Drop the probe's narrating comments and unchecked casts --- .claude/skills/verify-tools/probe.sh | 5 ---- .claude/skills/verify-tools/probe/pom.xml | 4 ---- .../src/main/kotlin/probe/DirectiveDump.kt | 1 - .../probe/src/main/kotlin/probe/Main.kt | 24 ++++++------------- .../probe/src/main/kotlin/scenarios/Async.kt | 1 - .../src/main/kotlin/scenarios/Bookstore.kt | 2 -- .../kotlin/scenarios/ContextAndEnvironment.kt | 2 -- .../main/kotlin/scenarios/ContextMisbound.kt | 1 - .../main/kotlin/scenarios/DirectiveDrift.kt | 5 ---- .../src/main/kotlin/scenarios/Directives.kt | 1 - .../kotlin/scenarios/DirectivesInvalid.kt | 1 - .../kotlin/scenarios/GenericInputResolver.kt | 1 - .../probe/src/main/kotlin/scenarios/Inputs.kt | 3 --- .../src/main/kotlin/scenarios/JdkProxy.kt | 3 --- .../src/main/kotlin/scenarios/NestedUnions.kt | 3 --- .../main/kotlin/scenarios/NestedWrappers.kt | 3 --- .../kotlin/scenarios/NestedWrappersExact.kt | 5 ---- .../main/kotlin/scenarios/OptionalResults.kt | 5 ---- .../src/main/kotlin/scenarios/Options.kt | 1 - .../src/main/kotlin/scenarios/Polymorphism.kt | 4 ---- .../main/kotlin/scenarios/ReadOnlySchema.kt | 4 ---- .../main/kotlin/scenarios/RecursiveInputs.kt | 1 - .../src/main/kotlin/scenarios/ScalarArgs.kt | 6 ----- .../main/kotlin/scenarios/ScalarDirectives.kt | 2 -- .../src/main/kotlin/scenarios/Scenario.kt | 7 ------ .../src/main/kotlin/scenarios/Sourceless.kt | 4 ---- .../main/kotlin/scenarios/TypeExtensions.kt | 4 ---- .../scenarios/TypeExtensionsInputOrder.kt | 1 - .../scenarios/TypeExtensionsRepeatedFields.kt | 4 ---- .../kotlin/scenarios/TypeExtensionsSealed.kt | 4 ---- .../main/kotlin/scenarios/UnmappedInputs.kt | 1 - .../src/main/kotlin/scenarios/WiringShapes.kt | 2 -- 32 files changed, 7 insertions(+), 108 deletions(-) diff --git a/.claude/skills/verify-tools/probe.sh b/.claude/skills/verify-tools/probe.sh index b5f69a5b..dc88d731 100755 --- a/.claude/skills/verify-tools/probe.sh +++ b/.claude/skills/verify-tools/probe.sh @@ -1,7 +1,4 @@ #!/usr/bin/env bash -# Drives graphql-java-tools the way a consuming app does: installs the current directory's checkout into a private local -# Maven repository, compiles the probe project in probe/ against it, builds a scenario's schema and runs its operations. -# See SKILL.md for the commands. Evidence goes to $TMPDIR/verify-tools/evidence/ and survives `clean`. set -euo pipefail SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -21,7 +18,6 @@ pom_value() { sed -n "s:.*<$1>\(.*\).*:\1:p" "$REPO/pom.xml" | head -1; } TOOLS_VERSION="$(pom_value version)" KOTLIN_VERSION="$(pom_value kotlin.version)" -# Identifies the library sources: HEAD plus any uncommitted change to pom.xml or src/, tracked or not fingerprint() { { git -C "$REPO" rev-parse HEAD @@ -126,7 +122,6 @@ cmd_run() { evidence=$base build="$WORK/probe-target${gj:+-gj$gj}" mkdir -p "$EVIDENCE_ROOT" - # Another checkout can start the same scenario in the same second until mkdir "$evidence" 2>/dev/null; do n=$((n + 1)) evidence="$base-$n" diff --git a/.claude/skills/verify-tools/probe/pom.xml b/.claude/skills/verify-tools/probe/pom.xml index c17028ce..8cdeb468 100644 --- a/.claude/skills/verify-tools/probe/pom.xml +++ b/.claude/skills/verify-tools/probe/pom.xml @@ -1,5 +1,4 @@ - 4.0.0 @@ -9,7 +8,6 @@ UTF-8 - UNSET 2.3.10 ${project.basedir}/target @@ -21,7 +19,6 @@ graphql-java-tools ${tools.version} - com.fasterxml.jackson.core jackson-databind @@ -45,7 +42,6 @@ - graphql-java-override diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt index 0c622e39..119cff88 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt @@ -14,7 +14,6 @@ import graphql.schema.GraphQLSchema import graphql.schema.GraphQLTypeUtil import graphql.schema.InputValueWithState -/** Lists the applied and the legacy directives of every element that can carry them, in a stable order. */ fun dumpDirectives(schema: GraphQLSchema): String = buildString { @Suppress("DEPRECATION") section("schema", schema.schemaAppliedDirectives, schema.schemaDirectives) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt index 33b3115d..c17009fa 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt @@ -1,5 +1,6 @@ package probe +import com.fasterxml.jackson.core.type.TypeReference import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.SerializationFeature import graphql.ExecutionInput @@ -17,13 +18,6 @@ import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import kotlin.system.exitProcess -/** - * Builds the scenario's schema through the public API of the graphql-java-tools jar on the classpath, then runs every - * `.graphql` file under `scenarios//` against it. Everything it observes goes to the output directory. - * - * Exit codes: 0 schema built and all operations ran (operations may still have GraphQL errors, see summary.txt), - * 2 schema build threw, 64 bad arguments. - */ fun main(args: Array) { if (args.size != 2) usage("expected ") val scenario = SCENARIOS.find { it.name == args[0] } ?: usage("unknown scenario '${args[0]}'") @@ -59,8 +53,7 @@ fun main(args: Array) { for (operation in operationFiles(scenario.operations)) { val name = operation.nameWithoutExtension val variablesFile = File(operation.parentFile, "$name.variables.json") - @Suppress("UNCHECKED_CAST") - val variables = if (variablesFile.exists()) json.readValue(variablesFile, Map::class.java) as Map else emptyMap() + val variables = if (variablesFile.exists()) json.readValue(variablesFile, object : TypeReference>() {}) else emptyMap() val input = scenario.input(ExecutionInput.newExecutionInput().query(operation.readText()).variables(variables)).build() val result = try { @@ -70,9 +63,7 @@ fun main(args: Array) { report("operation $name: THREW $e") continue } - // A subscription's data is a Publisher of results - @Suppress("UNCHECKED_CAST") - val publisher = result.getData() as? Publisher + val publisher = result.getData() as? Publisher<*> val written = LinkedHashMap() var eventCount = "" if (publisher != null) { @@ -105,14 +96,13 @@ private fun operationFiles(scenario: String): List { return File(dir.toURI()).listFiles { file -> file.extension == "graphql" }!!.sortedBy { it.name } } -/** Subscribes the way a transport would and collects every event until completion, for up to 10 seconds. */ -private fun collect(publisher: Publisher): List> { +private fun collect(publisher: Publisher<*>): List> { val events = mutableListOf>() val done = CountDownLatch(1) - publisher.subscribe(object : Subscriber { + publisher.subscribe(object : Subscriber { override fun onSubscribe(subscription: Subscription) = subscription.request(Long.MAX_VALUE) - override fun onNext(event: ExecutionResult) { - synchronized(events) { events.add(event.toSpecification()) } + override fun onNext(event: Any?) { + synchronized(events) { events.add((event as ExecutionResult).toSpecification()) } } override fun onError(error: Throwable) { synchronized(events) { events.add(mapOf("publisherError" to error.toString())) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt index 535d8f4d..87ba5aa5 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt @@ -9,7 +9,6 @@ import kotlinx.coroutines.reactive.publish import org.reactivestreams.Publisher import java.util.concurrent.CompletableFuture -/** CompletableFuture and suspend resolvers, a suspend field resolver on a nested type, and a Publisher subscription. */ object Async : Scenario { override val name = "async" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt index 624ef070..7314bcb4 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt @@ -12,7 +12,6 @@ import graphql.schema.GraphQLScalarType import java.time.LocalDate import java.util.Locale -/** Root resolver, a GraphQLResolver for a nested type, data class properties, an is-getter and a custom scalar. */ object Bookstore : Scenario { override val name = "bookstore" @@ -22,7 +21,6 @@ object Bookstore : Scenario { .scalars(dateScalar) } -/** The same schema plus a field no resolver or class implements. */ object BookstoreMissingResolver : Scenario { override val name = "bookstore-missing-resolver" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt index d569d63d..fae8041e 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt @@ -8,7 +8,6 @@ import graphql.kickstart.tools.SchemaParser import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment -/** Resolver methods that take the custom context class and DataFetchingEnvironment after the schema arguments. */ object ContextAndEnvironment : Scenario { override val name = "context-and-environment" @@ -21,7 +20,6 @@ object ContextAndEnvironment : Scenario { builder.graphQLContext(mapOf(AppContext::class.java to AppContext("oryan", "en-CA"))) } -/** A trailing parameter that is neither a context nor the environment. */ object ContextAndEnvironmentInvalid : Scenario { override val name = "context-and-environment-invalid" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt index 10612981..d51223b6 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt @@ -7,7 +7,6 @@ import graphql.kickstart.tools.SchemaParser import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment -/** Resolver methods whose environment or context parameter takes the place of a schema argument. */ object ContextMisbound : Scenario { override val name = "context-misbound" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt index 87dc56e5..53ff6ca6 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt @@ -8,10 +8,6 @@ import graphql.schema.GraphQLScalarType import graphql.schema.GraphQLSchema import probe.dumpDirectives -/** - * Every place a directive can be applied, with repeated non-repeatable, undeclared, defaulted and described arguments, - * extensions, and a scalar whose directive has an unknown argument. inspect.txt lists the applied and legacy directives. - */ object DirectiveDrift : Scenario { override val name = "directive-drift" @@ -25,7 +21,6 @@ object DirectiveDrift : Scenario { override fun inspect(schema: GraphQLSchema) = dumpDirectives(schema) } -/** An undeclared directive without allowUndeclaredDirectives. */ object DirectiveDriftUndeclared : Scenario { override val name = "directive-drift-undeclared" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt index 179b0a2f..f4888d92 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt @@ -10,7 +10,6 @@ import graphql.schema.GraphQLFieldDefinition import graphql.schema.idl.SchemaDirectiveWiring import graphql.schema.idl.SchemaDirectiveWiringEnvironment -/** A named SchemaDirectiveWiring that wraps a data fetcher, @deprecated, and a relay connection generated by @connection. */ object Directives : Scenario { override val name = "directives" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt index d641ffd3..d05c34c7 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt @@ -3,7 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** Directives applied at a location their definition doesn't list, without a required argument, or twice when not repeatable. */ object DirectivesInvalid : Scenario { override val name = "directives-invalid" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt index 375ebc22..ad4dc778 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt @@ -3,7 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** A query resolver inheriting a method whose parameter is its superclass's type variable. */ object GenericInputResolver : Scenario { override val name = "generic-input-resolver" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt index 3172da5d..3665d9b7 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt @@ -7,7 +7,6 @@ import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment import java.util.Optional -/** Scalar, list, enum and input object arguments, SDL default values, DataFetchingEnvironment and omitted vs null. */ object Inputs : Scenario { override val name = "inputs" @@ -29,8 +28,6 @@ class InputsQuery : GraphQLQueryResolver { fun search(term: String, limit: Int, genres: List?, env: DataFetchingEnvironment): String = "term=$term limit=$limit genres=$genres field=${env.field.name}" - /** null when the argument was omitted, Optional.empty() when it was passed as null. */ - @Suppress("OptionalAssignedToNull") fun nickname(value: Optional?): String = when { value == null -> "omitted" value.isEmpty -> "explicit null" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt index fa417aa2..e06bddf7 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt @@ -5,14 +5,12 @@ import graphql.kickstart.tools.SchemaParser import org.springframework.aop.framework.ProxyFactory import org.springframework.aop.support.AopUtils -/** Issue #822: the resolver behind a Spring JDK dynamic proxy, which only implements GraphQLQueryResolver. */ object JdkProxy : Scenario { override val name = "jdk-proxy" override fun parser() = proxyParser(proxy(proxyTargetClass = false).also { check(AopUtils.isJdkDynamicProxy(it)) }) } -/** The workaround: the same resolver behind a CGLIB proxy. */ object JdkProxyCglib : Scenario { override val name = "jdk-proxy-cglib" override val operations = "jdk-proxy" @@ -20,7 +18,6 @@ object JdkProxyCglib : Scenario { override fun parser() = proxyParser(proxy(proxyTargetClass = true).also { check(AopUtils.isCglibProxy(it)) }) } -/** The same resolver without a proxy. */ object JdkProxyPlain : Scenario { override val name = "jdk-proxy-plain" override val operations = "jdk-proxy" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt index 0649a90b..1fd7001c 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt @@ -3,9 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** - * A union that is only a member of another union. No field returns `Media`. - */ object NestedUnions : Scenario { override val name = "nested-unions" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt index 854d19f6..440e2d65 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt @@ -13,7 +13,6 @@ import org.dataloader.DataLoaderRegistry import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture.completedFuture -/** Generic wrappers and futures nested inside lists and inside other futures (issue 254). */ object NestedWrappers : Scenario { override val name = "nested-wrappers" @@ -31,7 +30,6 @@ object NestedWrappers : Scenario { private val tryWrapper = SchemaParserOptions.GenericWrapper.withTransformer(Try::class, 0, { t -> t.get() }) } -/** The same resolvers, run by an app whose own graphql-java ValueUnboxer already unwraps Try and joins futures. */ object NestedWrappersUnboxer : Scenario by NestedWrappers { override val name = "nested-wrappers-unboxer" @@ -91,7 +89,6 @@ class NestedWrappersQuery : GraphQLQueryResolver { fun futureOfItems(): CompletableFuture> = completedFuture(plainItems()) } -/** Suspend functions returning lists of an open class, which Kotlin reflection types as List. */ object NestedWrappersSuspend : Scenario { override val name = "nested-wrappers-suspend" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt index 398f7acc..d1c111ff 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt @@ -15,11 +15,6 @@ import java.util.concurrent.CompletableFuture.completedFuture import java.util.concurrent.Future import java.util.concurrent.FutureTask -/** - * Nested wrappers unwrapped exactly where the schema build matched them (issue 905): a custom scalar's futures and wrappers, a - * plain Future in a list (also from a wrapper's transformer and a suspend function), a wrapper only a schemaWrapper introduces, - * and a subclass registered as a wrapper of its own. - */ object NestedWrappersExact : Scenario { override val name = "nested-wrappers-exact" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt index 6772d564..ddec6328 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt @@ -6,11 +6,6 @@ import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser import java.util.Optional -/** - * A DataFetcherResult inside an Optional: its data, its errors, an empty Optional, the same object type returned another way, - * a list, and DataFetcherResult nested in itself under an Optional, which the build rejects like - * DataFetcherResult>. - */ object OptionalResults : Scenario { override val name = "optional-results" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt index 6bb4ad3a..108ccce5 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt @@ -6,7 +6,6 @@ import graphql.kickstart.tools.SchemaParser import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetcher -/** A missing resolver provider standing in for a field nothing implements. */ object Options : Scenario { override val name = "options" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt index a97444b5..bd4b6778 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt @@ -3,10 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** - * Interface and union fields whose resolvers return a supertype, so the concrete classes are only known through the - * dictionary. `Writer` is backed by a class with a different name. - */ object Polymorphism : Scenario { override val name = "polymorphism" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt index 22212cfe..9a6b9763 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt @@ -4,10 +4,6 @@ import graphql.kickstart.tools.GraphQLMutationResolver import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** - * Builds the schema with `parseSchemaObjects().toReadOnlySchema()` instead of `makeExecutableSchema()`, so the mutation - * type is left out. Covers an interface, a union, a custom field directive and a directive applied to the schema. - */ object ReadOnlySchema : Scenario { override val name = "read-only-schema" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt index 94d40fcc..0c68fe7d 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt @@ -3,7 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** Input objects that reference themselves and each other through lists and non-null types, and directive arguments of input object, enum and list types. */ object RecursiveInputs : Scenario { override val name = "recursive-inputs" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt index c258d296..c6fe7a7d 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt @@ -14,10 +14,6 @@ import graphql.schema.GraphQLScalarType import java.util.Locale import java.util.Optional -/** - * Scalar arguments: a custom scalar Jackson can't build, a Kotlin scalar class without visible properties in an input object, - * the same written with a type id or an object id, ID converted to Long, and nested lists of strings. - */ object ScalarArgs : Scenario { override val name = "scalar-args" @@ -27,7 +23,6 @@ object ScalarArgs : Scenario { .resolvers(ScalarArgsQuery()) } -// no default constructor and no creator, so only the scalar's coercing can make one class Tag private constructor(val value: String) { companion object { fun of(value: String) = Tag(value) @@ -44,7 +39,6 @@ private val tagScalar = GraphQLScalarType.newScalar() }) .build() -// Jackson writes it as {} and can read {} back as a new instance holding "default" class ScalarArgsToken(private val value: String = "default") { override fun toString() = value } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt index 76501b7e..abd40c93 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt @@ -7,7 +7,6 @@ import graphql.schema.GraphQLScalarType import graphql.schema.idl.SchemaDirectiveWiring import graphql.schema.idl.SchemaDirectiveWiringEnvironment -/** Directives and @specifiedBy on scalars from the SDL, on an extension and on the provided scalar, plus an undeclared one. */ object ScalarDirectives : Scenario { override val name = "scalar-directives" @@ -26,7 +25,6 @@ object ScalarDirectives : Scenario { private fun string(name: String) = GraphQLScalarType.newScalar().name(name).coercing(Scalars.GraphQLString.coercing).build() } -/** Appends the directive and the value of [argument] that the wiring sees to the scalar's description. */ class ArgumentWiring(private val argument: String) : SchemaDirectiveWiring { override fun onScalar(environment: SchemaDirectiveWiringEnvironment): GraphQLScalarType { val directive = environment.appliedDirective diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt index cfca8e40..89b59d55 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt @@ -6,22 +6,15 @@ import graphql.kickstart.tools.SchemaParser import graphql.kickstart.tools.SchemaParserBuilder import graphql.schema.GraphQLSchema -/** - * One way a user sets up graphql-java-tools: SDL and operations under `src/main/resources/scenarios//`, resolvers - * and options in an `object` in this package, which registers it. - */ sealed interface Scenario { val name: String - /** The directory under `scenarios/` whose operations run against this scenario's schema. */ val operations: String get() = name - /** The configured builder. The probe calls `build()` on it and passes the result to [schema]. */ fun parser(): SchemaParserBuilder fun schema(parser: SchemaParser): GraphQLSchema = parser.makeExecutableSchema() - /** Extra evidence about the built schema, written to inspect.txt. */ fun inspect(schema: GraphQLSchema): String? = null fun graphQL(builder: GraphQL.Builder): GraphQL.Builder = builder diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt index 1253d5c5..f14c4ec2 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt @@ -9,7 +9,6 @@ import graphql.kickstart.tools.SchemaParser import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment -/** Resolver methods that leave out the source object and take the environment or a context last (issue 304). */ object Sourceless : Scenario { override val name = "sourceless" @@ -22,7 +21,6 @@ object Sourceless : Scenario { builder.graphQLContext(mapOf(AppContext::class.java to AppContext("oryan", "en-CA"), "owner" to "ada")) } -/** A data class getter and a with-source method that share a name with a sourceless method. */ object SourcelessShadowed : Scenario { override val name = "sourceless-shadowed" @@ -31,7 +29,6 @@ object SourcelessShadowed : Scenario { .resolvers(SourcelessQuery(), SourcelessFolderResolver(), ShadowedImageResolver()) } -/** A helper on the resolver that looks like a sourceless method for a field the app leaves unimplemented. */ object SourcelessUnimplemented : Scenario { override val name = "sourceless-unimplemented" @@ -41,7 +38,6 @@ object SourcelessUnimplemented : Scenario { .options(SchemaParserOptions.newOptions().allowUnimplementedResolvers(true).build()) } -/** Sourceless methods whose environment or context parameter would take the place of a schema argument. */ object SourcelessMisbound : Scenario { override val name = "sourceless-misbound" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt index cca70e20..a7f10476 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt @@ -3,10 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** - * Extensions of every kind of type: fields, values, members, interfaces and directives merged into the type, repeats that - * keep the first one with a warning, extensions without a type, and an extension of a different kind than its type. - */ object TypeExtensions : Scenario { override val name = "type-extensions" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt index 39657802..05dcfda3 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt @@ -5,7 +5,6 @@ import graphql.kickstart.tools.SchemaParser import graphql.schema.GraphQLInputObjectType import graphql.schema.GraphQLSchema -/** An input object whose extensions come before and after the type in the SDL. inspect.txt lists the fields in schema order. */ object TypeExtensionsInputOrder : Scenario { override val name = "type-extensions-input-order" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt index 5537a7d4..6144b6e9 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt @@ -6,10 +6,6 @@ import graphql.schema.GraphQLInputObjectType import graphql.schema.GraphQLObjectType import graphql.schema.GraphQLSchema -/** - * Object and input types that declare a field twice, between a type and its extension, between two extensions and inside - * one definition. They build, and inspect.txt lists the description of the declaration the schema kept. - */ object TypeExtensionsRepeatedFields : Scenario { override val name = "type-extensions-repeated-fields" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt index 917965ca..e5544f32 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt @@ -3,10 +3,6 @@ package scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser -/** - * A union member added by `extend union` and an interface implementor added by `extend type X implements Y`, with no - * dictionary. Their classes can only be found among the subclasses of the sealed class or interface the fields return. - */ object TypeExtensionsSealed : Scenario { override val name = "type-extensions-sealed" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt index abc97b2c..10dba5eb 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt @@ -5,7 +5,6 @@ import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser import java.util.Optional -/** Input classes with an Optional property: one ignores a field on purpose, the other misspells one. */ object UnmappedInputs : Scenario { override val name = "unmapped-inputs" diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt index 5c68d32b..840c74a7 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt @@ -6,7 +6,6 @@ import graphql.schema.* import graphql.schema.idl.SchemaDirectiveWiring import graphql.schema.idl.SchemaDirectiveWiringEnvironment -/** Directive wirings on a recursive input (#875) and on types that refer to each other: interface, union, enum, self-reference. */ object WiringShapes : Scenario { override val name = "wiring-shapes" @@ -36,7 +35,6 @@ class WiringShapesQuery : GraphQLQueryResolver { fun someone(): Any = WiringPerson("grace") } -// records the type the wiring sees in the field's description class InspectWiring : SchemaDirectiveWiring { override fun onInputObjectField(environment: SchemaDirectiveWiringEnvironment): GraphQLInputObjectField { val type = GraphQLTypeUtil.unwrapAllAs(environment.element.type) From 1be87a7c9612dbfe70a5f4a4619f182e10a626ae Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:57:02 -0500 Subject: [PATCH 06/64] Say once that verify-tools covers refactors --- AGENTS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d0dd42b2..8ac18f4c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,9 +24,9 @@ Machine-specific Maven JVM flags go in `.mvn/jvm.config` and personal agent rule ## Verifying -Run the `verify-tools` skill (`.claude/skills/verify-tools/SKILL.md`) before you push any change to how the schema is built, -refactors and new or changed warnings included. `mvn verify` runs the library's own tests. The probe builds a schema -through the public API only, the way an app does. Bugfixes and small features stop at this skill. +Run the `verify-tools` skill (`.claude/skills/verify-tools/SKILL.md`) before you push any change to how the schema is built. +`mvn verify` runs the library's own tests. The probe builds a schema through the public API only, the way an app does. +Bugfixes and small features stop at this skill. ## Compatibility From 078948c71ed62456a40ced04b2592ad877cdb279 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:57:47 -0500 Subject: [PATCH 07/64] Run every test class whatever its name and fail when none run A class named FooTests or FooSpec never ran, and an include that matched nothing passed with zero tests. --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffb7394a..0da1423b 100644 --- a/pom.xml +++ b/pom.xml @@ -243,8 +243,9 @@ + true - **/*Test.* + **/* From a20589184186a657d7dddd9dd89a0f58467b5916 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:57:52 -0500 Subject: [PATCH 08/64] Check Kotlin asserts in the tests even when the runner leaves out -ea Without -ea a Kotlin assert() does nothing, so a broken assertEquals from TestUtils or a bare assert passed. The flag is on the test compile only, so the published jar is unchanged. --- pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pom.xml b/pom.xml index 0da1423b..e42f4f85 100644 --- a/pom.xml +++ b/pom.xml @@ -218,6 +218,16 @@ -Werror + + + default-test-compile + + + -Xassertions=always-enable + + + + From 879615507157fc905da3596fce70925923cf0888 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:57:57 -0500 Subject: [PATCH 09/64] Drop the surefire-junit4 provider pin Surefire 3.6 runs JUnit 4 tests on the JUnit Platform and no longer publishes surefire-junit4, so the pin kept a 3.5.6 provider inside a 3.6.1 plugin. TestNG from reactive-streams-tck no longer hides the JUnit 4 tests: all 440 run without the pin, and failIfNoTests fails the build if a provider ever runs none. --- pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pom.xml b/pom.xml index e42f4f85..feda6ee1 100644 --- a/pom.xml +++ b/pom.xml @@ -244,14 +244,6 @@ org.apache.maven.plugins maven-surefire-plugin 3.6.1 - - - - org.apache.maven.surefire - surefire-junit4 - 3.5.6 - - true From 81d15231d432eeafa1d07fc5e56fbf61c303e39c Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:50:59 -0500 Subject: [PATCH 10/64] Check the binary API and the packaged jar in mvn verify japicmp compares the jar with the newest release, with a script that drops Kotlin internal and private declarations. A single-file Java check asserts the jar's classes, bytecode level, and that its module resolves against the runtime classpath. --- build/JarCheck.java | 87 ++++++++++++++++++++ build/japicmp-kotlin-public.groovy | 127 +++++++++++++++++++++++++++++ pom.xml | 65 +++++++++++++++ 3 files changed, 279 insertions(+) create mode 100644 build/JarCheck.java create mode 100644 build/japicmp-kotlin-public.groovy diff --git a/build/JarCheck.java b/build/JarCheck.java new file mode 100644 index 00000000..1a489840 --- /dev/null +++ b/build/JarCheck.java @@ -0,0 +1,87 @@ +import java.io.DataInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.lang.module.Configuration; +import java.lang.module.FindException; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleFinder; +import java.lang.module.ResolutionException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.TreeMap; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; + +public class JarCheck { + public static void main(String[] args) throws IOException { + Path jar = Path.of(args[0]); + int release = Integer.parseInt(args[1]); + int expectedMajor = release + 44; + String runtimeClasspath = args[2]; + List expectedClasses = Arrays.asList(args).subList(3, args.length); + List problems = new ArrayList<>(); + + TreeMap> byMajor = new TreeMap<>(); + ModuleDescriptor descriptor = null; + try (JarFile jarFile = new JarFile(jar.toFile())) { + for (String expected : expectedClasses) { + if (jarFile.getJarEntry(expected.replace('.', '/') + ".class") == null) { + problems.add("The jar has no " + expected + ". Check in pom.xml: Kotlin and Java sources live in src/main/kotlin."); + } + } + for (JarEntry entry : Collections.list(jarFile.entries())) { + if (!entry.getName().endsWith(".class")) continue; + try (DataInputStream data = new DataInputStream(jarFile.getInputStream(entry))) { + data.readInt(); + data.readUnsignedShort(); + int major = data.readUnsignedShort(); + byMajor.computeIfAbsent(major, k -> new ArrayList<>()).add(entry.getName()); + } + } + JarEntry moduleInfo = jarFile.getJarEntry("module-info.class"); + if (moduleInfo != null) { + try (InputStream in = jarFile.getInputStream(moduleInfo)) { + descriptor = ModuleDescriptor.read(in); + } + } + } + byMajor.forEach((major, classes) -> { + if (major != expectedMajor) { + problems.add(classes.size() + " classes are Java " + (major - 44) + " bytecode (major " + major + "), expected Java " + release + + " (major " + expectedMajor + "), e.g. " + classes.get(0) + + ". Set ${java.version} on kotlin-maven-plugin and ${java.version} on maven-compiler-plugin."); + } + }); + + if (descriptor == null) { + problems.add("The jar has no module-info.class."); + } else { + List modulePath = new ArrayList<>(); + modulePath.add(jar); + for (String entry : runtimeClasspath.split(File.pathSeparator)) { + if (!entry.isEmpty() && !Path.of(entry).equals(jar)) modulePath.add(Path.of(entry)); + } + try { + Configuration.resolve(ModuleFinder.of(modulePath.toArray(Path[]::new)), List.of(ModuleLayer.boot().configuration()), + ModuleFinder.of(), Set.of(descriptor.name())); + } catch (FindException | ResolutionException e) { + problems.add("A JPMS application with only this jar's compile and runtime dependencies can't start: " + e.getMessage() + + ". A module from a provided or optional dependency must be 'requires static' in module-info.java."); + } + } + + if (!problems.isEmpty()) { + System.err.println("Jar check failed for " + jar.getFileName() + ":"); + problems.forEach(p -> System.err.println(" " + p)); + System.exit(1); + } + int classCount = byMajor.values().stream().mapToInt(List::size).sum(); + System.out.println("Jar check passed for " + jar.getFileName() + ": " + classCount + " classes, all major " + expectedMajor + + ", module " + descriptor.name() + " resolves against the runtime classpath."); + } +} diff --git a/build/japicmp-kotlin-public.groovy b/build/japicmp-kotlin-public.groovy new file mode 100644 index 00000000..fabe41e2 --- /dev/null +++ b/build/japicmp-kotlin-public.groovy @@ -0,0 +1,127 @@ +import javassist.CtBehavior +import javassist.CtClass +import javassist.bytecode.AnnotationsAttribute +import javassist.bytecode.annotation.ArrayMemberValue +import javassist.bytecode.annotation.IntegerMemberValue +import javassist.bytecode.annotation.StringMemberValue +import kotlin.metadata.Attributes +import kotlin.metadata.Visibility +import kotlin.metadata.jvm.JvmExtensionsKt +import kotlin.metadata.jvm.JvmMetadataUtil +import kotlin.metadata.jvm.KotlinClassMetadata + +// Kotlin compiles internal declarations, lambdas and anonymous objects to public bytecode, and keeps their real visibility +// only in @kotlin.Metadata. Drop them, so only the public Kotlin API is compared. + +class KotlinVisibility { + boolean api + Set hiddenMembers +} + +def API = [Visibility.PUBLIC, Visibility.PROTECTED] as Set + +def readMetadata = { CtClass ctClass -> + def ann = ctClass.classFile.getAttribute(AnnotationsAttribute.visibleTag)?.getAnnotation('kotlin.Metadata') + if (ann == null) return null + def value = { String n -> ann.getMemberValue(n) } + def ints = { String n -> value(n) == null ? null : (((ArrayMemberValue) value(n)).value.collect { ((IntegerMemberValue) it).value } as int[]) } + def strs = { String n -> value(n) == null ? null : (((ArrayMemberValue) value(n)).value.collect { ((StringMemberValue) it).value } as String[]) } + def str = { String n -> value(n) == null ? null : ((StringMemberValue) value(n)).value } + def i = { String n -> value(n) == null ? null : ((IntegerMemberValue) value(n)).value } + KotlinClassMetadata.readLenient(JvmMetadataUtil.Metadata(i('k'), ints('mv'), strs('d1'), strs('d2'), str('xs'), str('pn'), i('xi'))) +} + +def kotlinVisibility = { CtClass ctClass -> + def md = readMetadata(ctClass) + if (md == null) return null + if (md instanceof KotlinClassMetadata.SyntheticClass) return new KotlinVisibility(api: false, hiddenMembers: [] as Set) + def hidden = [] as Set + def hide = { declaration, signature -> + if (signature && (declaration == null || !(Attributes.getVisibility(declaration) in API))) hidden << signature.name + signature.descriptor + } + def addFunctions = { functions -> functions.each { hide(it, JvmExtensionsKt.getSignature(it)) } } + def addProperties = { properties -> + properties.each { p -> + hide(p.getter, JvmExtensionsKt.getGetterSignature(p)) + hide(p.setter, JvmExtensionsKt.getSetterSignature(p)) + } + } + if (md instanceof KotlinClassMetadata.Class) { + def km = md.kmClass + addFunctions(km.functions) + addProperties(km.properties) + km.constructors.each { hide(it, JvmExtensionsKt.getSignature(it)) } + return new KotlinVisibility(api: Attributes.getVisibility(km) in API, hiddenMembers: hidden) + } + if (md instanceof KotlinClassMetadata.FileFacade || md instanceof KotlinClassMetadata.MultiFileClassPart) { + addFunctions(md.kmPackage.functions) + addProperties(md.kmPackage.properties) + } + new KotlinVisibility(api: true, hiddenMembers: hidden) +} + +def info = jApiClasses.collectEntries { c -> + [c.fullyQualifiedName, [old: c.oldClass.map { kotlinVisibility(it) }.orElse(null), new: c.newClass.map { kotlinVisibility(it) }.orElse(null)]] +} +def isApiClass = { String name -> + def sides = [info[name]?.old, info[name]?.new].findAll { it != null } + sides.isEmpty() || sides.any { it.api } +} +def nonApiNames = info.keySet().findAll { !isApiClass(it) } +def nestedInNonApi = { String name -> nonApiNames.any { name.startsWith(it + '$') } } + +def hiddenOn = { side, CtBehavior b -> side != null && (b.methodInfo.name + b.methodInfo.descriptor) in side.hiddenMembers } +def isHidden = { d, Optional oldB, Optional newB -> + d != null && oldB.map { hiddenOn(d.old, it) }.orElse(true) && newB.map { hiddenOn(d.new, it) }.orElse(true) +} + +// japicmp ignores the list this script returns and reads the one it passed in, so edit that one in place. +def nonApiClass = { !isApiClass(it.fullyQualifiedName) || nestedInNonApi(it.fullyQualifiedName) } +def droppedClasses = jApiClasses.count(nonApiClass) +jApiClasses.removeIf(nonApiClass) +def droppedMembers = 0 +jApiClasses.each { c -> + def d = info[c.fullyQualifiedName] + def hiddenMethod = { isHidden(d, it.oldMethod, it.newMethod) } + def hiddenConstructor = { isHidden(d, it.oldConstructor, it.newConstructor) } + droppedMembers += c.methods.count(hiddenMethod) + c.constructors.count(hiddenConstructor) + c.methods.removeIf(hiddenMethod) + c.constructors.removeIf(hiddenConstructor) +} +println "[japicmp-kotlin-public] dropped ${droppedClasses} non-API classes and ${droppedMembers} non-API members" + +def breaking = { element -> element.compatibilityChanges.findAll { !it.binaryCompatible }*.type } +def isDataClass = { CtClass ct -> + def md = ct == null ? null : readMetadata(ct) + md instanceof KotlinClassMetadata.Class && Attributes.isData(md.kmClass) +} +def problems = [] +info.each { name, d -> + if (d.old?.api && d.new != null && !d.new.api && !nestedInNonApi(name)) problems << " ${name}: public in the last release, now internal or private in Kotlin" +} +jApiClasses.each { c -> + def name = c.fullyQualifiedName + def simpleName = name.substring(name.lastIndexOf('.') + 1) + def lines = [] + breaking(c).each { lines << " ${name}: ${it}" } + breaking(c.superclass).each { lines << " ${name} superclass: ${it}" } + c.interfaces.each { i -> breaking(i).each { lines << " ${name} implements ${i.fullyQualifiedName}: ${it}" } } + c.constructors.each { m -> breaking(m).each { lines << " ${name}#${simpleName}(${m.parameters*.type.join(', ')}): ${it}" } } + c.methods.each { m -> breaking(m).each { lines << " ${name}#${m.name}(${m.parameters*.type.join(', ')}): ${it}" } } + c.fields.each { f -> breaking(f).each { lines << " ${name}#${f.name}: ${it}" } } + if (lines.isEmpty()) return + problems.addAll(lines) + if (isDataClass(c.oldClass.orElse(null)) && c.methods.any { it.name == 'copy' && !breaking(it).isEmpty() }) { + problems << " -> ${name} is a Kotlin data class, so a new or changed property changes its constructor and copy() for " + + "compiled callers. Keep the old copy() as a @Deprecated(level = DeprecationLevel.HIDDEN) overload that forwards to the new " + + "one, and keep the old constructor with @JvmOverloads or a secondary constructor." + } +} +if (!problems.isEmpty()) { + throw new IllegalStateException("Binary-incompatible change to the public API since the last release:\n" + problems.join('\n') + + "\nCode compiled against the last release fails with NoSuchMethodError or a similar linkage error. Keep the old signature " + + "as a @Deprecated overload. In Kotlin, @Deprecated(level = DeprecationLevel.HIDDEN) keeps it for compiled callers only. " + + "If the break is planned for the next major, add the text before the colon as an under " + + "of japicmp-maven-plugin in pom.xml, with a TODO comment naming that major.") +} +jApiClasses diff --git a/pom.xml b/pom.xml index ffb7394a..7e74e660 100644 --- a/pom.xml +++ b/pom.xml @@ -281,6 +281,71 @@ + + org.codehaus.mojo + exec-maven-plugin + 3.6.4 + + + check-jar + verify + + exec + + + ${java.home}/bin/java + runtime + + ${project.basedir}/build/JarCheck.java + ${project.build.directory}/${project.build.finalName}.jar + ${java.version} + + graphql.kickstart.tools.SchemaParser + graphql.kickstart.tools.proxy.GuiceAopProxyHandler + + + + + + + + com.github.siom79.japicmp + japicmp-maven-plugin + 0.26.5 + + + \d+\.\d+\.\d+ + true + true + + true + true + true + ${project.basedir}/build/japicmp-kotlin-public.groovy + + + + + org.jetbrains.kotlin + kotlin-metadata-jvm + ${kotlin.version} + + + + org.apache.groovy + groovy-jsr223 + 4.0.33 + + + + + verify + + cmp + + + + org.sonatype.central central-publishing-maven-plugin From e85afc8f4ea9f30ff606752c3c3c22e6a0509f43 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 13:54:55 -0500 Subject: [PATCH 11/64] Run the bounded return value unwrapping check in mvn verify ReturnValueUnwrappingTest compiles the check from src/test/resources/returnvalue and fails the build when a resolver return type the schema build accepts doesn't reach graphql-java fully unwrapped. The verify-return-value-unwrapping skill's check.sh now runs that test, with its options passed as -Dunwrapping.args. --- .../verify-return-value-unwrapping/SKILL.md | 151 ++++ .../verify-return-value-unwrapping/check.sh | 23 + .../returnvalue/ReturnValueUnwrappingTest.kt | 59 ++ src/test/resources/returnvalue/Check.java | 655 ++++++++++++++++++ src/test/resources/returnvalue/Fixtures.java | 113 +++ .../resources/returnvalue/known-findings.txt | 0 6 files changed, 1001 insertions(+) create mode 100644 .claude/skills/verify-return-value-unwrapping/SKILL.md create mode 100755 .claude/skills/verify-return-value-unwrapping/check.sh create mode 100644 src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt create mode 100644 src/test/resources/returnvalue/Check.java create mode 100644 src/test/resources/returnvalue/Fixtures.java create mode 100644 src/test/resources/returnvalue/known-findings.txt diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md new file mode 100644 index 00000000..c9ed81c9 --- /dev/null +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -0,0 +1,151 @@ +--- +name: verify-return-value-unwrapping +description: Exhaustively check, up to a bound, that a resolver method's return value reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to ReturnValueUnwrapper, TypeClassMatcher's unwrapping, GenericTypeResolver.resolve, the data fetchers in MethodFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. +--- + +# Verify return value unwrapping + +## The property + +A user writes a resolver method whose return type nests containers, such as +`CompletableFuture>>`. If the schema build accepts that method, then graphql-java must get +exactly the value the method returned, with every container removed. Futures are waited on and generic wrappers go +through their transformers. List order and nulls are kept. A failed future or a throwing transformer fails the field. +A `Future` that isn't a `CompletionStage` fails the field with the "can't wait on" error. + +When this breaks, a production query returns `CompletableFuture@1a2b[Completed normally]` as a string, or fails with +"Expected source object to be an instance of 'Payload' but instead got 'CompletableFuture'". It only happens for the +return types and values nobody wrote a test for. + +## How the check works + +`src/test/resources/returnvalue/Check.java` lists every return type built from up to `--depth` (default 3) of these containers around a leaf: + +| Container | Value variants (the first one is the default) | +|---|---| +| `List` | 2 elements, `null`, empty | +| `Page` (a `listCollectionWithTransformer` wrapper) | 2 elements, `null`, empty | +| `CompletableFuture` | completes with the value, `null`, fails | +| `Future` | a `CompletableFuture`, `null`, a completed `FutureTask` | +| `Later` (a `withCompletionStageTransformer` wrapper whose transformer returns its `CompletableFuture`, like `Mono::toFuture`) | holds a future of the value, `null`, holds a failing future | +| `Try` (a wrapper whose transformer returns the value or throws) | success, `null`, failure | +| `DataFetcherResult` | the value, `null`, the value plus an error | +| `Optional` | present, empty | + +The leaf is `Payload` (an object type), `String`, or `Object` for a union `Item = Payload | FutureItem`. `FutureItem` +implements `Future`, so only the declared type tells a leaf from a future. Each return type runs with an all-nullable +and an all-non-null GraphQL type. + +For each combination the check compiles a Java resolver class with that return type at runtime. It builds the schema +through the public `SchemaParser` API, which rejects about a quarter of the combinations, such as `Optional` below the top +level. For every accepted one it executes the query once for each value that makes at most `--budget` (default 2) +non-default choices. When the return type holds futures, it runs each value three ways: futures already completed, +and pending futures completed after the data fetcher returns, first-created first and last-created first. + +The expected result is what graphql-java returns when a plain data fetcher on the same schema returns the plain value, +or throws the failure. So graphql-java's own null handling and error format apply to both sides. When one value +holds several failures, any one of them failing the field counts as correct. + +`ReturnValueUnwrappingTest` compiles `Check.java` and `Fixtures.java` at test time and runs the check, so `mvn verify` +runs it at the default bounds on every build. About 172,000 executions run in about 15 seconds. + +## Run + +From the root of the checkout or worktree you want to check: + +```bash +.claude/skills/verify-return-value-unwrapping/check.sh +``` + +It prints the commit and the JDK, runs `mvn clean test -Dtest=ReturnValueUnwrappingTest` with the options below passed +as `-Dunwrapping.args`, and prints the report. On a failure it also prints the path of the Maven log. + +| Exit | Meaning | +|---|---| +| 0 | `PASS`, or `PASS apart from the known findings above` | +| 1 | `FAIL`: a return type that isn't a known finding breaks the property | +| 2 | `MODEL ERROR`: the checkout or the check didn't compile, or the build rejected a return type the check must exercise, so a pass would prove nothing | +| 3 | `STALE`: a known finding no longer fails. Delete its line from `known-findings.txt` | + +Options: `--depth N`, `--budget N`, `--show N` (counterexamples printed, default 15), and `--rejected`, which lists +every combination the schema build rejected, with the build's error. A depth below 3 can't build the `mustAccept` +return types, so it ends in `MODEL ERROR`. + +## Reading a counterexample + +``` +public List> field() for field: [Payload] (21 failing executions, first shown) + returns: List[CompletableFuture(Payload(v1)), FutureTask] + futures complete before the data fetcher returns + expected: {errors=[{message=Exception while fetching data (/field) : Resolver method '...' resolved to a java.util.concurrent.FutureTask, which graphql-java can't wait on. ... + got: {errors=[{message=Exception while fetching data (/field[1]/data) : Expected source object to be an instance of 'unwrapcheck.Fixtures$Payload' but instead got 'java.util.concurrent.FutureTask', ... +``` + +The first line is the resolver method and the field's GraphQL type. `returns` is the value the method returned. +`Later(CompletableFuture(x))` means a `Later` whose transformer returns a `CompletableFuture` of `x`. Only the first +failing value per return type is shown. Rerun with a higher `--show` to see more return types. + +A real bug versus a modeling error: + +- **Real bug.** `got` holds a container object (a future, `Optional`, `DataFetcherResult`, `Try`) as a value, an + "Expected source object" error, a lost or reordered element, a missing error, or a blocked data fetcher. Report it with + the counterexample. Don't change the check to make it pass. +- **Real bug in the schema build.** `expected` is itself nonsense, such as `Payload` bound to the `DataFetcherResult` + class, which returned `"unwrapcheck.Fixtures$Payload@5a77273c"` as `data`. The plain data fetcher runs on the same schema, so if the build bound the GraphQL + type to the wrong class, both sides go wrong. +- **Modeling error.** The check's own idea of the value is wrong. For example, a new container variant builds a value + that its declared type doesn't allow, or the error message the check expects for a `FutureTask` (in `build`, case + `FUTURE_TASK`) differs from a message the library changed on purpose. Confirm against the library's own tests in + `src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt` before you edit the check. +- **`MODEL ERROR` about rejected return types.** A change made the build reject a return type in `mustAccept` in + `Check.java`. That's either a regression in the build, which you report, or an intended change, after which you swap in + another accepted return type of the same kind. + +## Known findings + +`src/test/resources/returnvalue/known-findings.txt` lists the return types that break the property at the sync commit, one per line as +` # `. They still +print as `KNOWN` with a counterexample on every run, and the check passes apart from them. A new break inside a known +pattern is hidden, so after a change to the code a known finding covers, read its counterexample. + +At the sync commit there are none. The check found two bugs when it was written, and both are fixed. One was a +`DataFetcherResult` inside an `Optional` (#939). The other was a wrapper whose transformer returns a future, directly around +a declared future (#938). A `withTransformer` registration keeps that #938 behavior, which is why `Later` is registered +through `withCompletionStageTransformer`. + +When a fix lands, the check exits 3. Delete the line then, so that a regression shows up as `FAIL`. + +## What this does not cover + +- Suspend functions, subscriptions and `Publisher`, arrays, and Kotlin-declared resolver methods. The generated resolvers + are Java methods without parameters, so only `LightMethodFieldResolverDataFetcher` runs, not + `MethodFieldResolverDataFetcher`. +- Wrappers picked by a subclass of the value (`Box` and `SpecialBox` in `NestedGenericWrapperTest`), wrappers with a type + argument index other than 0, custom `schemaWrapper`s other than the list one, transformers that return a `FutureTask`, + and DataLoader futures. +- Lists of more than 2 elements, more than 2 non-default choices per value, more than 3 containers, and completion + orders other than the two listed. A pass says nothing beyond those bounds. +- Which return types the schema build should reject. The check only exercises what the build accepts. + +## Coverage and sync + +Last confirmed to describe the code at commit `cd3233ca` (master, 2026-10-30). It covers: + +| File | What | +|---|---| +| `src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt` | all of it | +| `src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt` | `PotentialMatch.unwrap`, `Unwrapped` | +| `src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt` | `resolve`, `resolveTypeVariables` | +| `src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt` | `createDataFetcher` (`valueClass`, the unwrapper), `returnType`, `returnValueMatch`, `LightMethodFieldResolverDataFetcher` | +| `src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt` | `GenericWrapper` and the default wrappers in `build()` | + +To see whether a change needs another look: + +```bash +git log --oneline cd3233ca..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt +``` + +Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and +expected values in `Check.java` still describe them. For example, a new default wrapper or a new kind of unwrapping +step needs a new `Container` with its variants and its plain value in `build`. After an intended change, rerun the check, +and break the new code on purpose once in a scratch worktree to see the check fail before you trust its pass. diff --git a/.claude/skills/verify-return-value-unwrapping/check.sh b/.claude/skills/verify-return-value-unwrapping/check.sh new file mode 100755 index 00000000..6f57e1b0 --- /dev/null +++ b/.claude/skills/verify-return-value-unwrapping/check.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -euo pipefail + +checkout=$(git rev-parse --show-toplevel) +log=$(mktemp "${TMPDIR:-/tmp}/verify-return-value-unwrapping.XXXXXX") + +echo "checkout $checkout at $(git -C "$checkout" rev-parse --short HEAD)$(git -C "$checkout" diff --quiet HEAD -- src || echo ' plus uncommitted src changes')" +java -version 2>&1 | head -1 + +if (cd "$checkout" && mvn -B -ntp clean test -Dtest=ReturnValueUnwrappingTest "-Dunwrapping.args=$*") > "$log" 2>&1; then + sed -n '/Running .*ReturnValueUnwrappingTest/,/Tests run:/p' "$log" | sed -e '1d' -e '$d' + rm "$log" + exit 0 +fi + +sed -n '/AssertionError: /,/^\tat /p' "$log" | sed -e '1s/.*AssertionError: //' -e '$d' +echo "Maven log: $log" +grep -q '^FAIL:' "$log" && exit 1 +grep -q 'MODEL ERROR:' "$log" && exit 2 +grep -q '^STALE:' "$log" && exit 3 +tail -40 "$log" +echo "MODEL ERROR: the checkout didn't build" +exit 2 diff --git a/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt b/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt new file mode 100644 index 00000000..aeedf198 --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt @@ -0,0 +1,59 @@ +package graphql.kickstart.tools.returnvalue + +import org.junit.Assert.fail +import org.junit.Test +import java.io.ByteArrayOutputStream +import java.io.File +import java.io.PrintStream +import java.net.URLClassLoader +import java.nio.file.Files +import java.nio.file.Path +import java.util.spi.ToolProvider + +class ReturnValueUnwrappingTest { + + @Test + fun `every return type the schema build accepts reaches graphql-java unwrapped`() { + val dir = Files.createTempDirectory("return-value-unwrapping") + try { + val classpath = listOfNotNull(System.getProperty("jdk.module.path"), System.getProperty("java.class.path")) + .joinToString(File.pathSeparator) + compile(classpath, dir, copy("Check.java", dir), copy("Fixtures.java", dir)) + + val args = System.getProperty("unwrapping.args", "").split(" ").filter { it.isNotBlank() } + + listOf("--known", copy("known-findings.txt", dir).toString()) + val report = ByteArrayOutputStream() + val passed = URLClassLoader(arrayOf(dir.toUri().toURL()), javaClass.classLoader).use { loader -> + PrintStream(report, true, Charsets.UTF_8).use { out -> + loader.loadClass("unwrapcheck.Check") + .getMethod("check", Array::class.java, String::class.java, PrintStream::class.java) + .invoke(null, args.toTypedArray(), classpath + File.pathSeparator + dir, out) as Boolean + } + } + if (!passed) { + fail(report.toString(Charsets.UTF_8)) + } + print(report.toString(Charsets.UTF_8)) + } finally { + dir.toFile().deleteRecursively() + } + } + + private fun copy(resource: String, dir: Path): Path { + val target = dir.resolve(resource) + javaClass.getResourceAsStream("/returnvalue/$resource")!!.use { Files.copy(it, target) } + return target + } + + // java.util.spi.ToolProvider is in java.base, so this module needs no access to java.compiler + private fun compile(classpath: String, dir: Path, vararg sources: Path) { + val output = ByteArrayOutputStream() + val javac = ToolProvider.findFirst("javac").orElseThrow() + val status = PrintStream(output, true, Charsets.UTF_8).use { out -> + javac.run(out, out, "-d", dir.toString(), "-classpath", classpath, "-nowarn", "-proc:none", *sources.map { it.toString() }.toTypedArray()) + } + if (status != 0) { + fail("MODEL ERROR: the check doesn't compile against this checkout:\n" + output.toString(Charsets.UTF_8)) + } + } +} diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java new file mode 100644 index 00000000..c801ac13 --- /dev/null +++ b/src/test/resources/returnvalue/Check.java @@ -0,0 +1,655 @@ +package unwrapcheck; + +import graphql.ExecutionInput; +import graphql.ExecutionResult; +import graphql.GraphQL; +import graphql.GraphqlErrorBuilder; +import graphql.execution.DataFetcherResult; +import graphql.kickstart.tools.GraphQLResolver; +import graphql.kickstart.tools.SchemaParser; +import graphql.kickstart.tools.SchemaParserBuilder; +import graphql.kickstart.tools.SchemaParserOptions; +import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper; +import graphql.schema.DataFetcher; +import graphql.schema.FieldCoordinates; +import graphql.schema.GraphQLSchema; +import unwrapcheck.Fixtures.FutureItem; +import unwrapcheck.Fixtures.Later; +import unwrapcheck.Fixtures.Page; +import unwrapcheck.Fixtures.Payload; +import unwrapcheck.Fixtures.Try; + +import javax.tools.DiagnosticCollector; +import javax.tools.FileObject; +import javax.tools.ForwardingJavaFileManager; +import javax.tools.JavaCompiler; +import javax.tools.JavaFileObject; +import javax.tools.SimpleJavaFileObject; +import javax.tools.StandardJavaFileManager; +import javax.tools.ToolProvider; +import java.io.ByteArrayOutputStream; +import java.io.OutputStream; +import java.io.PrintStream; +import java.net.URI; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +public final class Check { + + enum Container { + LIST("java.util.List", Variant.VALUE, Variant.NULL, Variant.EMPTY), + PAGE("unwrapcheck.Fixtures.Page", Variant.VALUE, Variant.NULL, Variant.EMPTY), + COMPLETABLE_FUTURE("java.util.concurrent.CompletableFuture", Variant.VALUE, Variant.NULL, Variant.FAILED), + FUTURE("java.util.concurrent.Future", Variant.VALUE, Variant.NULL, Variant.FUTURE_TASK), + LATER("unwrapcheck.Fixtures.Later", Variant.VALUE, Variant.NULL, Variant.FAILED), + TRY("unwrapcheck.Fixtures.Try", Variant.VALUE, Variant.NULL, Variant.FAILED), + DATA_FETCHER_RESULT("graphql.execution.DataFetcherResult", Variant.VALUE, Variant.NULL, Variant.WITH_ERROR), + OPTIONAL("java.util.Optional", Variant.VALUE, Variant.EMPTY); + + final String javaName; + final List variants; + + Container(String javaName, Variant... variants) { + this.javaName = javaName; + this.variants = List.of(variants); + } + + boolean isList() { + return this == LIST || this == PAGE; + } + + boolean isFuture() { + return this == COMPLETABLE_FUTURE || this == FUTURE || this == LATER; + } + } + + enum Leaf { + PAYLOAD("unwrapcheck.Fixtures.Payload", "Payload", " { data }"), + STRING("java.lang.String", "String", ""), + OBJECT("java.lang.Object", "Item", " { __typename ... on Payload { data } ... on FutureItem { data } }"); + + final String javaName; + final String graphQLName; + final String selection; + + Leaf(String javaName, String graphQLName, String selection) { + this.javaName = javaName; + this.graphQLName = graphQLName; + this.selection = selection; + } + } + + enum Nullability {NULLABLE, NON_NULL} + + enum Variant {VALUE, NULL, EMPTY, FAILED, FUTURE_TASK, WITH_ERROR, FUTURE_ITEM} + + enum Timing { + DONE("before the data fetcher returns"), + PENDING_IN_ORDER("after the data fetcher returns, first created first"), + PENDING_REVERSED("after the data fetcher returns, last created first"); + + final String description; + + Timing(String description) { + this.description = description; + } + } + + static final class Case { + final List shape; + final Leaf leaf; + final Nullability nullability; + final String className; + + Case(List shape, Leaf leaf, Nullability nullability, String className) { + this.shape = shape; + this.leaf = leaf; + this.nullability = nullability; + this.className = className; + } + + String javaType() { + String type = leaf.javaName; + for (int i = shape.size() - 1; i >= 0; i--) { + type = shape.get(i).javaName + "<" + type + ">"; + } + return type; + } + + String graphQLType() { + boolean nonNull = nullability == Nullability.NON_NULL; + String type = leaf.graphQLName + (nonNull ? "!" : ""); + long lists = shape.stream().filter(Container::isList).count(); + for (long i = 0; i < lists; i++) { + type = "[" + type + "]" + (nonNull ? "!" : ""); + } + return type; + } + + String shortJavaType() { + return javaType().replace("unwrapcheck.Fixtures.", "").replaceAll("[a-z.]+\\.(?=[A-Z])", ""); + } + + String describe() { + return "public " + shortJavaType() + " field() for field: " + graphQLType(); + } + } + + static final class Plan { + final Variant variant; + final List children; + final int cost; + + Plan(Variant variant, List children, int cost) { + this.variant = variant; + this.children = children; + this.cost = cost; + } + } + + static final class Built { + final Object returned; + final Object expected; + final String text; + + Built(Object returned, Object expected, String text) { + this.returned = returned; + this.expected = expected; + this.text = text; + } + } + + static final class Context { + final Timing timing; + final String method; + final List completions = new ArrayList<>(); + final Set failures = new LinkedHashSet<>(); + int nextId = 1; + + Context(Timing timing, String method) { + this.timing = timing; + this.method = method; + } + + CompletableFuture future(Object value, String failure) { + if (timing == Timing.DONE) { + return failure == null ? CompletableFuture.completedFuture(value) : CompletableFuture.failedFuture(new IllegalStateException(failure)); + } + CompletableFuture future = new CompletableFuture<>(); + completions.add(() -> { + if (failure == null) { + future.complete(value); + } else { + future.completeExceptionally(new IllegalStateException(failure)); + } + }); + return future; + } + } + + static final class Violation { + final Case testCase; + final String value; + final Timing timing; + final String expected; + final String actual; + + Violation(Case testCase, String value, Timing timing, String expected, String actual) { + this.testCase = testCase; + this.value = value; + this.timing = timing; + this.expected = expected; + this.actual = actual; + } + } + + private static final String BLOCKED = "the data fetcher blocked until they completed"; + + private static volatile Object oracleValue; + private static volatile String oracleFailure; + + private static final ExecutorService fetching = Executors.newSingleThreadExecutor(runnable -> { + Thread thread = new Thread(runnable, "fetch"); + thread.setDaemon(true); + return thread; + }); + + private static final SchemaParserOptions options = SchemaParserOptions.newOptions() + .genericWrappers( + GenericWrapper.withTransformer(Try.class, 0, (Try t) -> t.get(), type -> type), + GenericWrapper.listCollectionWithTransformer(Page.class, 0, (Page p) -> p.getContent()), + GenericWrapper.withCompletionStageTransformer(Later.class, 0, (Later l) -> l.toFuture())) + .build(); + + private static final List mustAccept = List.of( + "java.util.List> [Payload]", + "java.util.concurrent.CompletableFuture>> [Payload]", + "graphql.execution.DataFetcherResult>> [String]", + "java.util.Optional>> [Item]", + "java.util.List>> [Item!]!" + ); + + public static boolean check(String[] args, String classpath, PrintStream out) throws Exception { + int depth = intArg(args, "--depth", 3); + int budget = intArg(args, "--budget", 2); + long started = System.nanoTime(); + + List cases = cases(depth); + Map> resolvers = compile(cases, classpath); + + int rejected = 0; + int runs = 0; + boolean blocked = false; + Set accepted = new LinkedHashSet<>(); + Map> violations = new LinkedHashMap<>(); + for (Case testCase : cases) { + GraphQLSchema schema; + try { + schema = schema(testCase, resolvers.get(testCase.className).getDeclaredConstructor().newInstance()); + } catch (RuntimeException e) { + rejected++; + if (flag(args, "--rejected")) { + out.println("rejected " + testCase.describe() + ": " + e.getMessage().lines().findFirst().orElse("")); + } + continue; + } + accepted.add(testCase.javaType() + " " + testCase.graphQLType()); + GraphQL actual = GraphQL.newGraphQL(schema).build(); + GraphQL oracle = GraphQL.newGraphQL(oracleSchema(schema)).build(); + String query = "query { field" + testCase.leaf.selection + " }"; + List timings = testCase.shape.stream().anyMatch(Container::isFuture) && !blocked ? List.of(Timing.values()) : List.of(Timing.DONE); + plans: + for (Plan plan : plansWithinBudget(testCase, 0, budget)) { + for (Timing timing : timings) { + runs++; + Violation violation = run(testCase, plan, timing, actual, oracle, query); + if (violation != null) { + violations.computeIfAbsent(testCase, c -> new ArrayList<>()).add(violation); + if (violation.actual.equals(BLOCKED)) { + blocked = true; + break plans; + } + } + } + } + } + + List missing = mustAccept.stream().filter(it -> !accepted.contains(it)).collect(Collectors.toList()); + out.printf("depth %d, budget %d: %d return types, %d rejected by the schema build, %d accepted, %d executions, %.1fs%n", + depth, budget, cases.size(), rejected, accepted.size(), runs, (System.nanoTime() - started) / 1e9); + if (blocked) { + out.println("A data fetcher blocked on a pending future, so later return types ran with completed futures only."); + } + + Map known = knownFindings(stringArg(args, "--known")); + Map> knownFailing = new LinkedHashMap<>(); + known.keySet().forEach(pattern -> knownFailing.put(pattern, new ArrayList<>())); + List> unknown = new ArrayList<>(); + violations.forEach((testCase, list) -> { + String pattern = known.keySet().stream().filter(it -> Pattern.compile(it).matcher(testCase.shortJavaType()).find()).findFirst().orElse(null); + if (pattern == null) { + unknown.add(list); + } else { + knownFailing.get(pattern).add(testCase); + } + }); + + knownFailing.forEach((pattern, failing) -> { + if (!failing.isEmpty()) { + out.printf("%nKNOWN (%s): %d return types still fail, e.g.%n", known.get(pattern), failing.size()); + print(out, violations.get(failing.get(0)).get(0), violations.get(failing.get(0)).size()); + } + }); + if (!unknown.isEmpty()) { + int total = unknown.stream().mapToInt(List::size).sum(); + out.printf("%nFAIL: %d executions in %d return types gave graphql-java something other than the value the resolver returned.%n", total, unknown.size()); + unknown.stream().limit(intArg(args, "--show", 15)).forEach(list -> print(out, list.get(0), list.size())); + return false; + } + if (!missing.isEmpty() || runs == 0) { + out.println("\nMODEL ERROR: the schema build rejected return types the check must exercise, so a pass would prove nothing:"); + missing.forEach(it -> out.println(" " + it)); + return false; + } + List fixed = knownFailing.entrySet().stream().filter(it -> it.getValue().isEmpty()).map(it -> known.get(it.getKey())).collect(Collectors.toList()); + if (!fixed.isEmpty()) { + out.println("\nSTALE: these known findings no longer fail. Delete their lines from src/test/resources/returnvalue/known-findings.txt so a regression shows up as FAIL:"); + fixed.forEach(it -> out.println(" " + it)); + return false; + } + out.println(violations.isEmpty() ? "PASS" : "\nPASS apart from the known findings above"); + return true; + } + + private static Map knownFindings(String path) throws Exception { + Map known = new LinkedHashMap<>(); + for (String line : Files.readAllLines(Path.of(path))) { + if (!line.isBlank() && !line.startsWith("#")) { + int separator = line.indexOf(" # "); + if (separator < 0) { + throw new IllegalArgumentException("A known finding is \" # \", not: " + line); + } + known.put(line.substring(0, separator).trim(), line.substring(separator + 3).trim()); + } + } + return known; + } + + private static void print(PrintStream out, Violation v, int count) { + out.println(); + out.println(v.testCase.describe() + (count > 1 ? " (" + count + " failing executions, first shown)" : "")); + out.println(" returns: " + v.value); + if (v.testCase.shape.stream().anyMatch(Container::isFuture)) { + out.println(" futures complete " + v.timing.description); + } + out.println(" expected: " + v.expected); + out.println(" got: " + v.actual); + } + + static List cases(int depth) { + List> shapes = new ArrayList<>(); + shapes.add(List.of()); + for (int start = 0, size = 0; size < depth; size++) { + int end = shapes.size(); + for (int i = start; i < end; i++) { + for (Container container : Container.values()) { + List shape = new ArrayList<>(); + shape.add(container); + shape.addAll(shapes.get(i)); + shapes.add(List.copyOf(shape)); + } + } + start = end; + } + List cases = new ArrayList<>(); + for (int i = 0; i < shapes.size(); i++) { + for (Leaf leaf : Leaf.values()) { + String className = "unwrapcheck.gen.R" + i + "_" + leaf.ordinal(); + for (Nullability nullability : Nullability.values()) { + cases.add(new Case(shapes.get(i), leaf, nullability, className)); + } + } + } + return cases; + } + + static List plansWithinBudget(Case testCase, int level, int budget) { + List plans = new ArrayList<>(); + if (level == testCase.shape.size()) { + plans.add(new Plan(Variant.VALUE, List.of(), 0)); + if (budget > 0) { + plans.add(new Plan(Variant.NULL, List.of(), 1)); + if (testCase.leaf == Leaf.OBJECT) { + plans.add(new Plan(Variant.FUTURE_ITEM, List.of(), 1)); + } + } + return plans; + } + Container container = testCase.shape.get(level); + for (Variant variant : container.variants) { + int cost = variant == Variant.VALUE ? 0 : 1; + if (cost > budget) { + continue; + } + boolean hasInner = variant == Variant.VALUE || variant == Variant.WITH_ERROR; + if (!hasInner) { + plans.add(new Plan(variant, List.of(), cost)); + } else if (container.isList()) { + for (Plan first : plansWithinBudget(testCase, level + 1, budget - cost)) { + for (Plan second : plansWithinBudget(testCase, level + 1, budget - cost - first.cost)) { + plans.add(new Plan(variant, List.of(first, second), cost + first.cost + second.cost)); + } + } + } else { + for (Plan inner : plansWithinBudget(testCase, level + 1, budget - cost)) { + plans.add(new Plan(variant, List.of(inner), cost + inner.cost)); + } + } + } + return plans; + } + + static Built build(Case testCase, Plan plan, int level, Context context) { + if (level == testCase.shape.size()) { + if (plan.variant == Variant.NULL) { + return new Built(null, null, "null"); + } + String id = "v" + context.nextId++; + if (plan.variant == Variant.FUTURE_ITEM) { + return new Built(new FutureItem(id), new FutureItem(id), "FutureItem(" + id + ")"); + } + if (testCase.leaf == Leaf.STRING) { + return new Built(id, id, "\"" + id + "\""); + } + return new Built(new Payload(id), new Payload(id), "Payload(" + id + ")"); + } + Container container = testCase.shape.get(level); + switch (plan.variant) { + case NULL: + return new Built(null, null, "null"); + case EMPTY: + switch (container) { + case LIST: + return new Built(List.of(), List.of(), "List[]"); + case PAGE: + return new Built(new Page<>(List.of()), List.of(), "Page[]"); + default: + return new Built(Optional.empty(), null, "Optional.empty()"); + } + case FAILED: { + String failure = "failed " + container.name().toLowerCase() + " v" + context.nextId++; + context.failures.add(failure); + switch (container) { + case TRY: + return new Built(Try.failure(failure), null, "Try.failure(\"" + failure + "\")"); + case LATER: + return new Built(new Later<>(context.future(null, failure)), null, "Later(failed CompletableFuture \"" + failure + "\")"); + default: + return new Built(context.future(null, failure), null, "failed CompletableFuture(\"" + failure + "\")"); + } + } + case FUTURE_TASK: { + context.failures.add("Resolver method '" + context.method + "' resolved to a " + FutureTask.class.getName() + ", which graphql-java can't wait on. " + + "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."); + FutureTask task = new FutureTask<>(() -> null); + task.run(); + return new Built(task, null, "FutureTask"); + } + default: + break; + } + List inner = new ArrayList<>(); + for (Plan child : plan.children) { + inner.add(build(testCase, child, level + 1, context)); + } + Built first = inner.get(0); + switch (container) { + case LIST: + case PAGE: { + List returned = inner.stream().map(it -> it.returned).collect(Collectors.toCollection(ArrayList::new)); + List expected = inner.stream().map(it -> it.expected).collect(Collectors.toCollection(ArrayList::new)); + String text = inner.stream().map(it -> it.text).collect(Collectors.joining(", ", "[", "]")); + return container == Container.LIST ? new Built(returned, expected, "List" + text) : new Built(new Page<>(returned), expected, "Page" + text); + } + case COMPLETABLE_FUTURE: + case FUTURE: + return new Built(context.future(first.returned, null), first.expected, "CompletableFuture(" + first.text + ")"); + case LATER: + return new Built(new Later<>(context.future(first.returned, null)), first.expected, "Later(CompletableFuture(" + first.text + "))"); + case TRY: + return new Built(Try.success(first.returned), first.expected, "Try.success(" + first.text + ")"); + case OPTIONAL: + return new Built(Optional.ofNullable(first.returned), first.expected, "Optional.ofNullable(" + first.text + ")"); + default: { + boolean withError = plan.variant == Variant.WITH_ERROR; + String error = "error beside " + first.text; + return new Built(result(first.returned, withError ? error : null), result(first.expected, withError ? error : null), + "DataFetcherResult(" + first.text + (withError ? ", error)" : ")")); + } + } + } + + private static DataFetcherResult result(Object data, String error) { + DataFetcherResult.Builder builder = DataFetcherResult.newResult().data(data); + if (error != null) { + builder.error(GraphqlErrorBuilder.newError().message(error).build()); + } + return builder.build(); + } + + static Violation run(Case testCase, Plan plan, Timing timing, GraphQL actual, GraphQL oracle, String query) { + Context context = new Context(timing, testCase.className + ".field"); + Built built = build(testCase, plan, 0, context); + if (timing == Timing.PENDING_REVERSED) { + Collections.reverse(context.completions); + } + + String got; + Fixtures.nextReturnValue = built.returned; + java.util.concurrent.Future> fetch = fetching.submit(() -> actual.executeAsync(ExecutionInput.newExecutionInput().query(query).build())); + CompletableFuture result; + try { + try { + result = fetch.get(1, TimeUnit.SECONDS); + } catch (TimeoutException e) { + context.completions.forEach(Runnable::run); + return new Violation(testCase, built.text, timing, "the data fetcher returns before its futures complete", BLOCKED); + } + context.completions.forEach(Runnable::run); + got = result.get(2, TimeUnit.SECONDS).toSpecification().toString(); + } catch (TimeoutException e) { + return new Violation(testCase, built.text, timing, "a result once every future completed", "no result after 2 seconds"); + } catch (Exception e) { + return new Violation(testCase, built.text, timing, "a result", "execute threw " + e); + } + + List acceptable = new ArrayList<>(); + if (context.failures.isEmpty()) { + oracleValue = built.expected; + oracleFailure = null; + acceptable.add(oracle.execute(query).toSpecification().toString()); + } else { + for (String failure : context.failures) { + oracleValue = null; + oracleFailure = failure; + acceptable.add(oracle.execute(query).toSpecification().toString()); + } + } + return acceptable.contains(got) ? null : new Violation(testCase, built.text, timing, String.join("\n or ", acceptable), got); + } + + static GraphQLSchema schema(Case testCase, Object resolver) { + String sdl = "type Query { field: " + testCase.graphQLType() + " }\n"; + SchemaParserBuilder parser = SchemaParser.newParser().resolvers((GraphQLResolver) resolver).options(options); + if (testCase.leaf != Leaf.STRING) { + sdl += "type Payload { data: String }\n"; + } + if (testCase.leaf == Leaf.OBJECT) { + sdl += "type FutureItem { data: String }\nunion Item = Payload | FutureItem\n"; + parser.dictionary(Payload.class, FutureItem.class); + } + return parser.schemaString(sdl).build().makeExecutableSchema(); + } + + static GraphQLSchema oracleSchema(GraphQLSchema schema) { + DataFetcher plain = environment -> { + if (oracleFailure != null) { + throw new IllegalStateException(oracleFailure); + } + return oracleValue; + }; + return schema.transform(builder -> builder.codeRegistry( + schema.getCodeRegistry().transform(registry -> registry.dataFetcher(FieldCoordinates.coordinates("Query", "field"), plain)))); + } + + static Map> compile(List cases, String classpath) throws Exception { + Map sources = new LinkedHashMap<>(); + for (Case testCase : cases) { + String simpleName = testCase.className.substring(testCase.className.lastIndexOf('.') + 1); + sources.putIfAbsent(testCase.className, + "package unwrapcheck.gen;\n" + + "public class " + simpleName + " implements graphql.kickstart.tools.GraphQLQueryResolver {\n" + + " @SuppressWarnings(\"unchecked\")\n" + + " public " + testCase.javaType() + " field() { return (" + testCase.javaType() + ") unwrapcheck.Fixtures.nextReturnValue; }\n" + + "}\n"); + } + + JavaCompiler javac = ToolProvider.getSystemJavaCompiler(); + Map output = new HashMap<>(); + StandardJavaFileManager files = javac.getStandardFileManager(null, null, null); + ForwardingJavaFileManager memory = new ForwardingJavaFileManager<>(files) { + @Override + public JavaFileObject getJavaFileForOutput(Location location, String className, JavaFileObject.Kind kind, FileObject sibling) { + return new SimpleJavaFileObject(URI.create("mem:///" + className.replace('.', '/') + kind.extension), kind) { + @Override + public OutputStream openOutputStream() { + return output.computeIfAbsent(className, name -> new ByteArrayOutputStream()); + } + }; + } + }; + List units = sources.entrySet().stream().map(source -> + new SimpleJavaFileObject(URI.create("string:///" + source.getKey().replace('.', '/') + ".java"), JavaFileObject.Kind.SOURCE) { + @Override + public CharSequence getCharContent(boolean ignoreEncodingErrors) { + return source.getValue(); + } + }).collect(Collectors.toList()); + DiagnosticCollector diagnostics = new DiagnosticCollector<>(); + List javacOptions = List.of("-classpath", classpath, "-nowarn", "-proc:none"); + if (!javac.getTask(null, memory, diagnostics, javacOptions, null, units).call()) { + throw new IllegalStateException("generated resolvers don't compile: " + diagnostics.getDiagnostics()); + } + + ClassLoader loader = new ClassLoader(Check.class.getClassLoader()) { + @Override + protected Class findClass(String name) throws ClassNotFoundException { + ByteArrayOutputStream bytes = output.get(name); + if (bytes == null) { + throw new ClassNotFoundException(name); + } + return defineClass(name, bytes.toByteArray(), 0, bytes.size()); + } + }; + Map> classes = new HashMap<>(); + for (String name : sources.keySet()) { + classes.put(name, loader.loadClass(name)); + } + return classes; + } + + private static String stringArg(String[] args, String name) { + int i = List.of(args).indexOf(name); + return i >= 0 && i < args.length - 1 ? args[i + 1] : null; + } + + private static boolean flag(String[] args, String name) { + return List.of(args).contains(name); + } + + private static int intArg(String[] args, String name, int fallback) { + for (int i = 0; i < args.length - 1; i++) { + if (args[i].equals(name)) { + return Integer.parseInt(args[i + 1]); + } + } + return fallback; + } +} diff --git a/src/test/resources/returnvalue/Fixtures.java b/src/test/resources/returnvalue/Fixtures.java new file mode 100644 index 00000000..aea82b7d --- /dev/null +++ b/src/test/resources/returnvalue/Fixtures.java @@ -0,0 +1,113 @@ +package unwrapcheck; + +import java.util.List; +import java.util.Objects; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; + +public final class Fixtures { + + public static volatile Object nextReturnValue; + + private Fixtures() { + } + + public static final class Payload { + private final String data; + + public Payload(String data) { + this.data = data; + } + + public String getData() { + return data; + } + } + + public static final class FutureItem implements Future { + private final String data; + + public FutureItem(String data) { + this.data = data; + } + + public String getData() { + return data; + } + + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + return false; + } + + @Override + public boolean isCancelled() { + return false; + } + + @Override + public boolean isDone() { + return true; + } + + @Override + public String get() { + return data; + } + + @Override + public String get(long timeout, TimeUnit unit) { + return data; + } + } + + public static final class Try { + private final T value; + private final String failure; + + private Try(T value, String failure) { + this.value = value; + this.failure = failure; + } + + public static Try success(T value) { + return new Try<>(value, null); + } + + public static Try failure(String message) { + return new Try<>(null, Objects.requireNonNull(message)); + } + + public T get() { + if (failure != null) { + throw new IllegalStateException(failure); + } + return value; + } + } + + public static final class Page { + private final List content; + + public Page(List content) { + this.content = content; + } + + public List getContent() { + return content; + } + } + + public static final class Later { + private final CompletableFuture future; + + public Later(CompletableFuture future) { + this.future = future; + } + + public CompletableFuture toFuture() { + return future; + } + } +} diff --git a/src/test/resources/returnvalue/known-findings.txt b/src/test/resources/returnvalue/known-findings.txt new file mode 100644 index 00000000..e69de29b From 4b418c4193954c8841a9e80a7bd702e6fbcddd46 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:10:35 -0500 Subject: [PATCH 12/64] Clean-build the probe install and exit 64 on bad usage probe.sh install ran mvn install without clean, so a class left in target/ by an earlier build could end up in the jar the probe tests. A missing or unknown scenario exited 1, which the skill documents as a harness failure. The hash falls back to shasum -a 256 where sha256sum is missing. The skill's run block now lists install. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/verify-tools/SKILL.md | 10 ++++++---- .claude/skills/verify-tools/probe.sh | 20 ++++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.claude/skills/verify-tools/SKILL.md b/.claude/skills/verify-tools/SKILL.md index e05f506c..89a3d8e7 100644 --- a/.claude/skills/verify-tools/SKILL.md +++ b/.claude/skills/verify-tools/SKILL.md @@ -18,20 +18,22 @@ and run another checkout's `probe.sh` from inside it. ```bash .claude/skills/verify-tools/probe.sh doctor # checkout, branch, install state, lock .claude/skills/verify-tools/probe.sh list # scenario names +.claude/skills/verify-tools/probe.sh install # clean-build the checkout into the private repo .claude/skills/verify-tools/probe.sh run [--graphql-java ] # build the schema, run every operation .claude/skills/verify-tools/probe.sh clean # remove this checkout's work dir, keep evidence ``` - `run` first installs the checkout into a private Maven repo under `$TMPDIR/verify-tools/work/-/` when the install is missing or stale, meaning HEAD or uncommitted `pom.xml`/`src/` changes differ from the last install. It - reads `~/.m2` but never writes it. The work dir is keyed on the checkout's path, so clones and worktrees run in parallel, - even when two share a folder name. If `doctor` shows the - lock held by a live pid, wait for that run. + reads `~/.m2` but never writes it. The install runs `mvn clean install`, so it empties the checkout's `target/`. Don't + run it while another build uses the same checkout. The work dir is keyed on the checkout's path, so clones and worktrees + run in parallel, even when two share a folder name. If `doctor` shows the lock held by a live pid, wait for that run. - It builds the schema from the scenario's `parser()`, prints it, then executes every `*.graphql` in `probe/src/main/resources/scenarios//` in name order, with `.variables.json` as variables. It collects subscription events until the stream completes, for at most 10 seconds. - Exit `0`: the schema built and every operation ran, though operations can still return GraphQL errors. `2`: the build - threw. `1`: harness failure (install log or `maven.log`). `64`: bad usage. + threw. `1`: harness failure (install log or `maven.log`) or a held lock. `64`: bad usage, such as a missing or unknown + scenario. - `--graphql-java` swaps only the runtime graphql-java, like a user who pins another version. It doesn't recompile the library against it. `--skip-install` runs a stale install on purpose and doesn't count as proof. diff --git a/.claude/skills/verify-tools/probe.sh b/.claude/skills/verify-tools/probe.sh index dc88d731..89dc2afa 100755 --- a/.claude/skills/verify-tools/probe.sh +++ b/.claude/skills/verify-tools/probe.sh @@ -5,7 +5,10 @@ SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO="$(git rev-parse --show-toplevel 2>/dev/null)" || REPO="$(git -C "$SKILL_DIR" rev-parse --show-toplevel)" ROOT="${TMPDIR:-/tmp}" ROOT="${ROOT%/}/verify-tools" -KEY="$(basename "$REPO")-$(printf '%s' "$REPO" | sha256sum | cut -c1-8)" + +sha256() { if command -v sha256sum > /dev/null; then sha256sum; else shasum -a 256; fi; } + +KEY="$(basename "$REPO")-$(printf '%s' "$REPO" | sha256 | cut -c1-8)" WORK="$ROOT/work/$KEY" M2="$WORK/m2" TAIL_M2="$HOME/.m2/repository" @@ -13,6 +16,7 @@ EVIDENCE_ROOT="$ROOT/evidence" STAMP="$WORK/installed.stamp" die() { echo "probe: $*" >&2; exit 1; } +usage_error() { echo "probe: $*" >&2; exit 64; } pom_value() { sed -n "s:.*<$1>\(.*\).*:\1:p" "$REPO/pom.xml" | head -1; } TOOLS_VERSION="$(pom_value version)" @@ -26,7 +30,7 @@ fingerprint() { echo "$file" cat "$REPO/$file" done - } | sha256sum | cut -c1-16 + } | sha256 | cut -c1-16 } installed_jar() { echo "$M2/io/github/graphql-java-kickstart/graphql-java-tools/$TOOLS_VERSION/graphql-java-tools-$TOOLS_VERSION.jar"; } @@ -62,7 +66,7 @@ cmd_install() { fp="$(fingerprint)" log="$WORK/install.log" echo "probe: installing $TOOLS_VERSION from $REPO into $M2 (log: $log)" - if ! (cd "$REPO" && mvn_isolated install -DskipTests > "$log" 2>&1); then + if ! (cd "$REPO" && mvn_isolated clean install -DskipTests > "$log" 2>&1); then grep -E '^\[ERROR\]' "$log" | head -30 >&2 || true die "install failed, see $log" fi @@ -99,12 +103,12 @@ cmd_run() { case "$1" in --graphql-java) gj="$2"; shift 2 ;; --skip-install) skip_install=true; shift ;; - -*) die "unknown option $1" ;; - *) [[ -z "$scenario" ]] || die "one scenario per run"; scenario="$1"; shift ;; + -*) usage_error "unknown option $1" ;; + *) [[ -z "$scenario" ]] || usage_error "one scenario per run"; scenario="$1"; shift ;; esac done - [[ -n "$scenario" ]] || die "usage: probe.sh run [--graphql-java VERSION] [--skip-install]" - cmd_list | grep -qx "$scenario" || die "unknown scenario '$scenario', known: $(cmd_list | tr '\n' ' ')" + [[ -n "$scenario" ]] || usage_error "usage: probe.sh run [--graphql-java VERSION] [--skip-install]" + cmd_list | grep -qx "$scenario" || usage_error "unknown scenario '$scenario', known: $(cmd_list | tr '\n' ' ')" lock local state @@ -168,5 +172,5 @@ case "${1:-}" in list) cmd_list ;; run) shift; cmd_run "$@" ;; clean) cmd_clean ;; - *) echo "usage: probe.sh {doctor|list|install|run [--graphql-java VERSION] [--skip-install]|clean}" >&2; exit 64 ;; + *) usage_error "usage: probe.sh {doctor|list|install|run [--graphql-java VERSION] [--skip-install]|clean}" ;; esac From a3c3861689d3a30939ebdb1424de697f292ce740 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:10:42 -0500 Subject: [PATCH 13/64] Make AGENTS.md agree with itself and the repo The layout said one test class per feature or issue, while the judgment rule says to add a variant to the existing class. The f8c7be76 example now says what that commit did: five failure tests folded into one, two dropped. The rule table header no longer claims every row names a failing check or an agent mistake. The jar row names module-info and java.version, the layout lists proxy/, the build command cleans, and a row covers stale classes in target/. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 8ac18f4c..4714eb7a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,15 +6,16 @@ resolver classes. Published to Maven Central. Kotlin, with a few Java files, tar ## Layout - `src/main/kotlin/graphql/kickstart/tools`: `SchemaParser` and its builder and options, `SchemaClassScanner` (matches schema - types to classes), `resolver/` (field resolvers and data fetchers), `directive/`, `relay/`, `util/` -- `src/test/kotlin`: JUnit tests, one class per feature or issue. `EndToEndTest` and `EndToEndSpecHelper` hold the shared schema - and resolvers + types to classes), `resolver/` (field resolvers and data fetchers), `directive/`, `relay/`, `proxy/` (finds the class + behind a Spring, Guice, Weld or Javassist proxied resolver), `util/` +- `src/test/kotlin`: JUnit tests, one class per feature. A test for an issue goes into the class for its feature. + `EndToEndTest` and `EndToEndSpecHelper` hold the shared schema and resolvers - `.claude/skills/verify-tools`: the probe that checks a change from a consuming app's side ## Build and test ```bash -mvn verify +mvn clean verify ``` Compiler warnings fail the build. CI runs `mvn verify` on JDK 17, 21 and 25. A newer local JDK can pass code that fails on @@ -60,7 +61,8 @@ No check can enforce these, so each one names the mistake it prevents. proved scalars pass through unchanged, and none of them did. - **Add a variant to the existing test class and its shared fixtures.** Write one test per behavior and cover variants with a table or a generated matrix, as `NestedGenericWrapperTest` does. Failure: a directive change added a test and - fixtures per variant, and a later commit folded seven of those tests into one (`f8c7be76`). + fixtures per variant. A later commit folded five of the failure tests into one `assertSchemaError` test and dropped two + that repeated other tests (`f8c7be76`). - **Run verify-tools on refactors and warning changes too.** A change called "a refactor" or "only the wording" still changes what an app's schema build does, and the unit tests don't build through the public API alone. Failure: an agent skipped the probe on a scanner rewrite because it was a refactor. @@ -70,8 +72,9 @@ No check can enforce these, so each one names the mistake it prevents. ## Rule table -Each rule comes from a mistake agents made in this repo more than once. The second column names what fails when the rule -is broken. "docs only" means nothing does yet, so the rule depends on you reading it. +Each rule comes from a mistake made in this repo more than once, mostly by agents and in a few cases by older human code. +The second column names what enforces the rule: a check that fails the build, or code or config that keeps the mistake from +happening. "docs only" means nothing does yet, so the rule depends on you reading it. | Rule | Enforced by | |---|---| @@ -99,11 +102,12 @@ is broken. "docs only" means nothing does yet, so the rule depends on you readin | The first commit of a fix tests the neighbouring shapes, not just the reported one | docs only | | The build passes on JDK 17, the lowest supported version | CI on JDK 17, 21 and 25 | | Run verify-tools before you push a schema-building change | docs only | -| The packaged jar matches the pom's module and Java target | docs only | +| The packaged jar holds `module-info.class`, its non-static `requires` resolve from the runtime dependencies, and every class targets the pom's `java.version` | docs only | | Compiler warnings fail the build | `-Werror` and `failOnWarning` in `pom.xml` | | Check every claim in a PR body or release note at the current head | docs only | | Keep a comment only for a non-obvious why, with no history and no issue numbers outside a TODO | docs only | | Build only what was asked | docs only | +| A build you trust starts from an empty `target/`, so no class from an earlier build ships | `clean` in `probe.sh install`, docs only for your own `mvn` runs | | Agent worktrees and local settings stay out of commits | `.gitignore` | | Agent rules live in one committed file | This file. `CLAUDE.md` imports it | | Invalid input that used to build logs a WARN until the next major | docs only | From f9492f1ff75f7ed3e69dfd8aafec8facdaec9217 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:12:14 -0500 Subject: [PATCH 14/64] Let -DfailIfNoTests=false override the no-tests check Surefire only reads the failIfNoTests user property when the plugin config leaves the parameter unset, so the literal value ignored the flag its own error message suggests. Co-Authored-By: Claude --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index feda6ee1..6cb99b38 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ 26.1 1.0.4 + true false github @@ -245,7 +246,6 @@ maven-surefire-plugin 3.6.1 - true **/* From 078507b4010c03a7208214613434d899cd92af00 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:15:00 -0500 Subject: [PATCH 15/64] Make the comment lint precise enough to trust Ordinary prose failed the build: "returns the list unchanged", "the previously resolved type", "no longer than 80 characters", "is now cached", "keeps working", "step #1", a #000000 color, "since 2.5 seconds" and a comment that mentions lint-allow. The history list keeps only phrases that narrate a change, "no longer" needs a verb of change, the version rule needs a version-shaped token, and #N skips hex colors, URL fragments and ordinals like "step #1". Text is a marker only in the full `lint-allow until` form. Every fix line names the lint-allow escape, and an invalid marker says why: expired, more than 90 days out, no reason, or an unknown rule. Java block comments no longer nest and Java strings have no templates. The test fails when it finds no sources instead of passing, and the header counts violations and lines. Co-Authored-By: Claude --- .../kickstart/tools/CommentConventionsTest.kt | 155 ++++++++++++------ 1 file changed, 108 insertions(+), 47 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt b/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt index eababb4a..a1fdb31e 100644 --- a/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt @@ -1,6 +1,7 @@ package graphql.kickstart.tools import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Assert.fail import org.junit.Test import java.io.File @@ -10,33 +11,75 @@ class CommentConventionsTest { @Test fun `comments carry no issue numbers, history or versions`() { - val violations = listOf(File("src/main"), File("src/test")).asSequence() + val sources = listOf(File("src/main"), File("src/test")).asSequence() .flatMap { it.walkTopDown() } .filter { it.isFile && it.extension in setOf("kt", "java") } .sortedBy { it.path } - .flatMap { CommentLint.check(it.path, it.readText(), LocalDate.now()) } .toList() + assertTrue("no .kt or .java files under ${File("src").absolutePath}, run the test from the project root", sources.isNotEmpty()) + val violations = sources.flatMap { CommentLint.check(it.path, it.readText(), LocalDate.now()) } if (violations.isNotEmpty()) { - fail(violations.joinToString("\n", "${violations.size} comment(s) break the comment conventions:\n")) + val lines = violations.distinctBy { it.path to it.line }.size + fail(violations.joinToString("\n", "${violations.size} comment convention violation(s) on $lines line(s):\n")) } } - @Test - fun `lint matches whole comment blocks and honors only valid markers`() { - fun rules(source: String) = CommentLint.check("Example.kt", source, LocalDate.of(2026, 11, 4)).map { it.rule } + private val today = LocalDate.of(2026, 11, 4) + + private fun check(source: String, path: String = "Example.kt") = CommentLint.check(path, source, today) + + private fun rules(source: String, path: String = "Example.kt") = check(source, path).map { it.rule } + private fun markerFix(source: String) = check(source).single { it.rule == "lint-allow" }.fix + + @Test + fun `lint flags issue numbers, history and versions in whole comment blocks`() { assertEquals(listOf("history"), rules("/* this used to\n * be slow */")) assertEquals(listOf("history"), rules("// this used to\n// be slow")) assertEquals(listOf("issue-number"), rules("// see #999")) + assertEquals(listOf("issue-number"), rules("// the enum and directive from issue #823")) + assertEquals(listOf("issue-number"), rules("// from https://github.com/o/r/issues/424")) + assertEquals(listOf("issue-number", "history"), rules("// built as the type before #552")) + assertEquals(listOf("history"), rules("// in the same order as before")) + assertEquals(listOf("history", "history"), rules("// converted, as it did before this check")) + assertEquals(listOf("history"), rules("// to keep those schemas building")) + assertEquals(listOf("history"), rules("// so those schemas keep building")) + assertEquals(listOf("history"), rules("// this check is no longer needed")) assertEquals(listOf("version"), rules("/** @since 15.0 */")) - assertEquals(emptyList(), rules("// TODO reject in 16.0.0 (#999)")) - assertEquals(emptyList(), rules("val s = \"// see #999\"")) - assertEquals(emptyList(), rules("// unchanged lint-allow history until 2026-12-01 by oryan: domain term")) - assertEquals(listOf("lint-allow", "history"), rules("// unchanged lint-allow history until 2026-11-03 by oryan: expired")) - assertEquals(listOf("lint-allow", "history"), rules("// unchanged lint-allow history until 2026-12-01 by oryan:")) - assertEquals(listOf("lint-allow", "history"), rules("// unchanged lint-allow history until 2027-06-01 by oryan: too late")) - assertEquals(listOf("history"), rules("// unchanged lint-allow version until 2026-12-01 by oryan: other rule")) + assertEquals(listOf("version"), rules("// since 1.2.0 the parser")) + assertTrue(check("// see #999 as before, since 1.2.0").all { "lint-allow" in it.fix }) + } + + @Test + fun `lint leaves ordinary prose, code and other languages' syntax alone`() { + listOf( + "// returns the list unchanged", + "// the previously resolved type wins", + "// no longer than 80 characters", + "// the result is now cached for the next call", + "// so the loop keeps working on an empty map", + "// step #1 builds the dictionary", + "// the border is #000000 and the text is #fff", + "// waits since 2.5 seconds have passed", + "// explains the lint-allow marker syntax for readers", + "// https://example.com/docs/#123", + "// TODO reject in 16.0.0 (#999)", + "val s = \"// see #999\"", + ).forEach { assertEquals(it, emptyList(), rules(it)) } + + assertEquals(listOf("issue-number"), rules("/* a /* b */\nString s = \"no longer needed\"; // see #13", "Example.java")) + assertEquals(listOf("issue-number"), rules("String s = \"\"\"\n \\\"\"\" // #1\n \"\"\"; // see #2", "Example.java")) + } + + @Test + fun `lint honors only valid markers and says why a marker is invalid`() { + assertEquals(emptyList(), rules("// as before lint-allow history until 2026-12-01 by oryan: domain term")) + assertEquals(listOf("history"), rules("// as before lint-allow version until 2026-12-01 by oryan: other rule")) + assertTrue(markerFix("// as before lint-allow history until 2026-11-03 by oryan: stale").contains("expired on 2026-11-03")) + assertTrue(markerFix("// as before lint-allow history until 2027-06-01 by oryan: too late").contains("more than 90 days")) + assertTrue(markerFix("// as before lint-allow history until 2026-12-01 by oryan:").contains("no reason")) + assertTrue(markerFix("// as before lint-allow histroy until 2026-12-01 by oryan: typo").contains("unknown rule `histroy`")) } } @@ -46,31 +89,37 @@ internal object CommentLint { override fun toString() = "$path:$line [$rule] \"$match\" in: $lineText\n fix: $fix" } - private class Rule(val id: String, val pattern: Regex, val fix: String) - + private const val MARKER_MAX_DAYS = 90L + private const val MARKER_FORM = "lint-allow until YYYY-MM-DD by : " private const val MOVE_TO_PR = "move the reason into the PR description" + private class Rule(val id: String, val pattern: Regex, advice: String) { + val fix = "$advice; for a false positive add `lint-allow $id until YYYY-MM-DD by : ` to the line, " + + "at most $MARKER_MAX_DAYS days out" + } + + private val ordinalNouns = listOf("step", "phase", "stage", "item", "case", "rule", "row", "column", "line", "attempt", "round", "part", "pass", "example", "option") + private val historyPhrases = listOf( """\bused to be\b""", - """\bunchanged\b""", - """\bpreviously\b""", - """\bno longer\b""", - """\bany ?more\b""", - """\bbefore (?:this|the|that) (?:change|check|fix|pr|commit)\b""", + """\bno longer (?:needed|necessary|required|supported|used|works?|fails?|throws?|returns?|builds?|breaks?|applies|happens|exists?|runs?)\b""", + """\banymore\b""", + """\bbefore (?:this|that) (?:change|check|fix|pr|commit)\b""", + """\bbefore the (?:fix|pr)\b""", """\b(?:before|after|until|since) #\d+""", """\bas (?:it|they) did\b""", """\b(?:as|like|than) before\b""", - """\bstill (?:builds?|works?|building|working)\b""", - """\bkeeps? (?:those |these |such |existing |old )?(?:schemas? )?(?:building|working)\b""", - """\bworkaround for\b""", - """\b(?:is|are|does|do|returns?|throws?) now\b""", - """\bnow (?:also |always |only )?(?:returns?|throws?|fails?|builds?|keeps?|logs?|warns?|works?|supports?)\b""", + """\bkeeps? (?:those|these|such|existing|old) (?:\w+ )?(?:building|working)\b""", + """\b(?:those|these|such|existing|old) schemas? (?:still|keeps?) (?:builds?|building|works?|working)\b""", ) private val rules = listOf( Rule( "issue-number", - Regex("""(? in X.0.0 (#N)`" ), Rule( @@ -80,20 +129,17 @@ internal object CommentLint { ), Rule( "version", - Regex("""@since\b|\bsince (?:v|version )?\d+\.\d+""", RegexOption.IGNORE_CASE), + Regex("""@since\b|\bsince (?:v\d+(?:\.\d+)*|version \d+(?:\.\d+)*|\d+\.\d+\.\d+)\b""", RegexOption.IGNORE_CASE), "drop the version; history goes in the release notes" ), ) - private const val MARKER_MAX_DAYS = 90L - private val marker = Regex("""lint-allow.*""") - private val validMarker = Regex("""lint-allow ([\w-]+) until (\d{4}-\d{2}-\d{2}) by [\w-]+: \S.*""") - private val markerFix = "reword the comment and drop the marker, or write `lint-allow until YYYY-MM-DD by : " + - "` with a rule from ${rules.joinToString { it.id }} and a date at most $MARKER_MAX_DAYS days ahead" + private val marker = Regex("""lint-allow [\w-]+ until\b.*""") + private val markerParts = Regex("""lint-allow ([\w-]+) until (\S+) by [\w-]+: ?(.*)""") private val todoIssue = Regex("""\bTODO\b[^#]*?\bin \d+\.0\.0 (\(#\d+\))""") fun check(path: String, source: String, today: LocalDate): List = - CommentLexer(source).blocks().flatMap { check(path, it, today) } + CommentLexer(source, kotlin = path.endsWith(".kt")).blocks().flatMap { check(path, it, today) } private fun check(path: String, block: List>, today: LocalDate): List { val violations = mutableListOf() @@ -103,9 +149,14 @@ internal object CommentLint { block.forEach { (line, lineText) -> val found = marker.find(lineText) if (found != null) { - val rule = allowedRule(found.value, today) - if (rule == null) violations += Violation(path, line, "lint-allow", found.value, lineText, markerFix) - else allowed[line] = rule + val parts = markerParts.matchEntire(found.value) + val problem = markerProblem(parts, today) + if (problem == null) allowed[line] = parts!!.groupValues[1] + else violations += Violation( + path, line, "lint-allow", found.value, lineText, + "$problem; write `$MARKER_FORM` with a rule from ${rules.joinToString { it.id }} and a date at most " + + "$MARKER_MAX_DAYS days out, or reword the comment and drop the marker" + ) } if (text.isNotEmpty()) text.append(' ') lineStarts += text.length @@ -124,16 +175,22 @@ internal object CommentLint { return violations.sortedBy { it.line } } - private fun allowedRule(marker: String, today: LocalDate): String? { - val match = validMarker.matchEntire(marker) ?: return null - val until = runCatching { LocalDate.parse(match.groupValues[2]) }.getOrNull() ?: return null - val rule = match.groupValues[1] - val inWindow = !until.isBefore(today) && !until.isAfter(today.plusDays(MARKER_MAX_DAYS)) - return rule.takeIf { inWindow && rules.any { it.id == rule } } + private fun markerProblem(parts: MatchResult?, today: LocalDate): String? { + if (parts == null) return "the marker does not have the form `$MARKER_FORM`" + val (rule, date, reason) = parts.destructured + val until = runCatching { LocalDate.parse(date) }.getOrNull() + return when { + rules.none { it.id == rule } -> "unknown rule `$rule`" + until == null -> "`$date` is not a YYYY-MM-DD date" + until.isBefore(today) -> "the marker expired on $until" + until.isAfter(today.plusDays(MARKER_MAX_DAYS)) -> "$until is more than $MARKER_MAX_DAYS days out" + reason.isBlank() -> "the marker has no reason after `by :`" + else -> null + } } } -private class CommentLexer(private val source: String) { +private class CommentLexer(private val source: String, private val kotlin: Boolean) { private var pos = 0 private var line = 1 private var lastLineCommentLine = -1 @@ -185,7 +242,7 @@ private class CommentLexer(private val source: String) { var depth = 1 while (pos < source.length && depth > 0) { when { - peek("/*") -> { depth++; advance(2) } + kotlin && peek("/*") -> { depth++; advance(2) } peek("*/") -> { depth--; advance(2) } else -> advance() } @@ -198,10 +255,14 @@ private class CommentLexer(private val source: String) { private fun rawString() { advance(3) while (pos < source.length && !peek("\"\"\"")) { - if (peek("\${")) { advance(2); code(insideTemplate = true) } else advance() + when { + !kotlin && peek("\\") -> advance(2) + kotlin && peek("\${") -> { advance(2); code(insideTemplate = true) } + else -> advance() + } } advance(3) - while (peek("\"")) advance() + while (kotlin && peek("\"")) advance() } private fun string() { @@ -209,7 +270,7 @@ private class CommentLexer(private val source: String) { while (pos < source.length && !peek("\"") && !peek("\n")) { when { peek("\\") -> advance(2) - peek("\${") -> { advance(2); code(insideTemplate = true) } + kotlin && peek("\${") -> { advance(2); code(insideTemplate = true) } else -> advance() } } From 7d3341ababde97d697132130dec86e0ea5b7d640 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:15:38 -0500 Subject: [PATCH 16/64] Pin how type extensions behave before merging definitions Characterization tests for what a user sees when types have extensions: the built types for every kind, lone and orphan extensions, wrong-kind warnings, error order and source names, union cycles and diamonds through extensions, and three edge cases (a type defined twice, an ignored scalar extension on an input, a reused TypeName in type errors). They pass on the current code, so merging each type with its extensions once can show it changed nothing. --- .../SchemaClassScannerInterfaceFieldTest.kt | 42 ++- .../tools/SchemaParserDictionaryTest.kt | 24 ++ .../kickstart/tools/SchemaParserTest.kt | 79 ++++ .../kickstart/tools/TypeExtensionTest.kt | 345 +++++++++++++++++- 4 files changed, 480 insertions(+), 10 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerInterfaceFieldTest.kt b/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerInterfaceFieldTest.kt index de4c06b0..a8d44642 100644 --- a/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerInterfaceFieldTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerInterfaceFieldTest.kt @@ -304,6 +304,46 @@ class SchemaClassScannerInterfaceFieldTest { assert(schema.getType("Entry") is GraphQLInterfaceType) } + @Test + fun `scanner handles interfaces used only by fields of interface extensions`() { + val schema = SchemaParser.newParser() + .schemaString( + """ + type Query { + container: Container + } + + interface Container { + id: ID + } + + extend interface Container { + entry: Entry + } + + interface Entry { + id: ID! + } + + interface Draft implements Entry { + id: ID! + } + + type Box implements Container { + id: ID + entry: Draft + } + """) + .resolvers(InterfaceOnlyInterface()) + .dictionary(InterfaceOnlyInterface.Box::class) + .build() + .makeExecutableSchema() + .assertEveryFieldResolves() + + assertEquals((schema.getType("Container") as GraphQLInterfaceType).fieldDefinitions.map { it.name }, listOf("id", "entry")) + assert(schema.getType("Entry") is GraphQLInterfaceType) + } + class InterfaceOnlyInterface : GraphQLQueryResolver { fun container(): Container? = null @@ -311,7 +351,7 @@ class SchemaClassScannerInterfaceFieldTest { interface Draft - class Box(val entry: Draft?) : Container + class Box(val entry: Draft?, val id: String? = null) : Container } @Test diff --git a/src/test/kotlin/graphql/kickstart/tools/SchemaParserDictionaryTest.kt b/src/test/kotlin/graphql/kickstart/tools/SchemaParserDictionaryTest.kt index 17a4adf5..103174e6 100644 --- a/src/test/kotlin/graphql/kickstart/tools/SchemaParserDictionaryTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/SchemaParserDictionaryTest.kt @@ -196,4 +196,28 @@ class SchemaParserDictionaryTest { assertEquals(error.message, "Class in supplied dictionary '${ThirdItem::class.java.name}' specified type names 'A', 'B', " + "but only input object types can share a class!") } + + @Test + fun `dictionary names need a type definition, which an object or input extension alone isn't`() { + fun parser(extension: String) = SchemaParser.newParser() + .schemaString("type Query { id: ID }\n$extension") + .resolvers(object : GraphQLQueryResolver { + fun id(): String = "1" + }) + .dictionary("Item", ThirdItem::class) + .build() + + listOf("extend type Item { id: Int }", "extend input Item { id: Int }").forEach { extension -> + val error = assertThrows(SchemaClassScannerError::class.java) { parser(extension) } + + assertEquals(error.message, "Class in supplied dictionary '${ThirdItem::class.java.name}' specified type name 'Item', " + + "but a type definition with that name was not found!") + } + + val (_, warnings) = withWarnings { parser("extend union Item = Query") } + assertEquals(warnings, listOf( + "Dictionary mapping was provided but never used, and can be safely deleted: \"Item\" -> ${ThirdItem::class.java.name}", + "Schema type was defined but can never be accessed, and can be safely deleted: Item" + )) + } } diff --git a/src/test/kotlin/graphql/kickstart/tools/SchemaParserTest.kt b/src/test/kotlin/graphql/kickstart/tools/SchemaParserTest.kt index 61d1d457..0a6d510b 100644 --- a/src/test/kotlin/graphql/kickstart/tools/SchemaParserTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/SchemaParserTest.kt @@ -3,6 +3,7 @@ package graphql.kickstart.tools import graphql.ExecutionResult import graphql.GraphQL import graphql.kickstart.tools.resolver.FieldResolverError +import graphql.language.ObjectTypeDefinition import graphql.parser.InvalidSyntaxException import graphql.schema.* import graphql.schema.idl.SchemaDirectiveWiring @@ -316,6 +317,84 @@ class SchemaParserTest { assertEquals(error.message, "Union 'Result' contains itself through Result -> Result at line 5, column 23.") } + @Test + fun `parser should throw descriptive exception when a union extension lists a union that contains it`() { + val error = assertThrows(SchemaError::class.java) { + unionParser( + """ + |union Result = Book | Media + |union Media = Movie + |extend union Media = Result + """.trimMargin()) + } + + assertEquals(error.message, "Union 'Result' contains itself through Result -> Media -> Result at line 7, column 22.") + } + + @Test + fun `parser lists a member once when nested unions reach it more than once`() { + val schema = unionParser( + """ + |union Result = Left | Right + |union Left = Book + |extend union Left = Shared + |union Right = Shared + |union Shared = Movie + """.trimMargin()) + + assertEquals(listOf("Result", "Left", "Right").associateWith { name -> (schema.getType(name) as GraphQLUnionType).types.map { it.name } }, mapOf( + "Result" to listOf("Book", "Movie"), + "Left" to listOf("Book", "Movie"), + "Right" to listOf("Movie") + )) + } + + @Test + fun `parser builds a type defined twice from its last definition, or from its first when only its interface reaches it`() { + val (throughField, fieldWarnings) = withWarnings { + SchemaParser.newParser() + .schemaString( + """ + type Query { item: Item } + type Item { id: ID } + type Item { id: ID name: String } + """) + .resolvers(TwiceDefinedQuery()) + .build() + } + + assertEquals(fieldWarnings, listOf()) + assertEquals(throughField.getUnusedDefinitions(), setOf()) + assertEquals((throughField.makeExecutableSchema().getType("Item") as GraphQLObjectType).fieldDefinitions.map { it.name }, listOf("id", "name")) + + val (throughInterface, interfaceWarnings) = withWarnings { + SchemaParser.newParser() + .schemaString( + """ + type Query { node: Node } + interface Node { id: ID } + type Item implements Node { id: ID } + type Item implements Node { id: ID name: String } + """) + .resolvers(TwiceDefinedQuery()) + .dictionary("Item", TwiceDefined::class) + .build() + } + + assertEquals(interfaceWarnings, listOf("Schema type was defined but can never be accessed, and can be safely deleted: Item")) + assertEquals(throughInterface.getUnusedDefinitions().map { it.name to (it as ObjectTypeDefinition).fieldDefinitions.map { field -> field.name } }, listOf("Item" to listOf("id", "name"))) + assertEquals((throughInterface.makeExecutableSchema().getType("Item") as GraphQLObjectType).fieldDefinitions.map { it.name }, listOf("id")) + } + + class TwiceDefinedQuery : GraphQLQueryResolver { + fun item(): TwiceDefined = TwiceDefined("1", "one") + fun node(): TwiceDefinedNode = TwiceDefined("1", "one") + } + + interface TwiceDefinedNode + + class TwiceDefined(val id: String, val name: String?) : TwiceDefinedNode + private fun unionParser(unions: String) = SchemaParser.newParser() .schemaString( """ diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeExtensionTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeExtensionTest.kt index 1d92cc3a..67c8ef4e 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeExtensionTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeExtensionTest.kt @@ -6,6 +6,7 @@ import graphql.language.Definition import graphql.language.EnumTypeDefinition import graphql.language.FieldDefinition import graphql.language.InterfaceTypeDefinition +import graphql.language.InterfaceTypeExtensionDefinition import graphql.language.ObjectTypeDefinition import graphql.language.ScalarTypeDefinition import graphql.language.TypeName @@ -54,7 +55,7 @@ class TypeExtensionTest { $fooBarBaz """) { dictionary(Foo::class, Bar::class, Baz::class, Item::class) - scalars(GraphQLScalarType.newScalar().name("Date").coercing(Scalars.GraphQLString.coercing).build()) + scalars(date) }.makeExecutableSchema() .assertEveryFieldResolves() @@ -96,6 +97,116 @@ class TypeExtensionTest { assertEquals(data, mapOf("fooBar" to mapOf("__typename" to "Baz"), "color" to "GREEN", "node" to mapOf("id" to "1", "name" to "item"))) } + @Test + fun `every kind of type is built from its definition followed by its extensions`() { + val schema = parser( + """ + directive @tag(name: String!) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + + type Query @tag(name: "Query") { node: Node } + extend type Query @tag(name: "Query extension") { + fooBar: FooBar + color: Color + search(filter: Filter): String + today: Date + } + + interface Entity { id: ID! } + interface Node @tag(name: "Node") { id: ID! } + extend interface Node implements Entity @tag(name: "Node extension") { name: String } + + type Item implements Node @tag(name: "Item") { id: ID! } + extend type Item implements Entity @tag(name: "Item extension") { name: String } + + union FooBar @tag(name: "FooBar") = Foo + extend union FooBar @tag(name: "FooBar extension") = Bar | Baz + + enum Color @tag(name: "Color") { RED } + extend enum Color @tag(name: "Color extension") { GREEN } + + input Filter @tag(name: "Filter") { id: ID } + extend input Filter @tag(name: "Filter extension") { limit: Int inner: Inner and: Filter } + input Inner { id: ID } + + scalar Date @tag(name: "Date") + extend scalar Date @tag(name: "Date extension") @specifiedBy(url: "https://example.com/date") + + $fooBarBaz + """) { + dictionary(Foo::class, Bar::class, Baz::class, Item::class) + scalars(date) + }.makeExecutableSchema() + .assertEveryFieldResolves() + + val types = listOf("Query", "Node", "Item", "FooBar", "Color", "Filter", "Date") + val printer = SchemaPrinter(SchemaPrinter.Options.defaultOptions().setComparators(GraphqlTypeComparatorRegistry.AS_IS_REGISTRY)) + assertEquals(types.joinToString("\n") { printer.print(schema.getType(it)) }, """ + |type Query @tag(name : "Query") @tag(name : "Query extension") { + | node: Node + | fooBar: FooBar + | color: Color + | search(filter: Filter): String + | today: Date + |} + | + |interface Node implements Entity @tag(name : "Node") @tag(name : "Node extension") { + | id: ID! + | name: String + |} + | + |type Item implements Node & Entity @tag(name : "Item") @tag(name : "Item extension") { + | id: ID! + | name: String + |} + | + |union FooBar @tag(name : "FooBar") @tag(name : "FooBar extension") = Foo | Bar | Baz + | + |enum Color @tag(name : "Color") @tag(name : "Color extension") { + | RED + | GREEN + |} + | + |input Filter @tag(name : "Filter") @tag(name : "Filter extension") { + | id: ID + | limit: Int + | inner: Inner + | and: Filter + |} + | + |scalar Date @tag(name : "Date") @tag(name : "Date extension") @specifiedBy(url : "https://example.com/date") + |""".trimMargin()) + + assertEquals(types.associateWith { schema.definitionClasses(it) }, mapOf( + "Query" to listOf("ObjectTypeDefinition", "ObjectTypeExtensionDefinition"), + "Node" to listOf("InterfaceTypeDefinition", "InterfaceTypeExtensionDefinition"), + "Item" to listOf("ObjectTypeDefinition", "ObjectTypeExtensionDefinition"), + "FooBar" to listOf("UnionTypeDefinition", "UnionTypeExtensionDefinition"), + "Color" to listOf("EnumTypeDefinition", "EnumTypeExtensionDefinition"), + "Filter" to listOf("InputObjectTypeDefinition", "InputObjectTypeExtensionDefinition"), + "Date" to listOf("ScalarTypeDefinition", "ScalarTypeExtensionDefinition") + )) + + val data = assertNoGraphQlErrors(GraphQL.newGraphQL(schema).build()) { + """ + query { + node { id name } + fooBar { __typename } + color + search(filter: { id: "1", limit: 2, and: { id: "2" } }) + today + } + """ + } + + assertEquals(data, mapOf( + "node" to mapOf("id" to "1", "name" to "item"), + "fooBar" to mapOf("__typename" to "Baz"), + "color" to "GREEN", + "search" to "1 limit 2 and 2 limit null", + "today" to "2026-10-12" + )) + } + @Test fun `union extensions can add nested unions that no field returns`() { val schema = parser( @@ -254,7 +365,7 @@ class TypeExtensionTest { type Baz { baz: String } """) { dictionary(Item::class, Baz::class) - scalars(GraphQLScalarType.newScalar().name("Date").coercing(Scalars.GraphQLString.coercing).build()) + scalars(date) directive("tag", wiring) directive("once", wiring) }.makeExecutableSchema() @@ -365,13 +476,17 @@ class TypeExtensionTest { } @Test - fun `enums and unions that only have extensions are built from them`() { + fun `interfaces, unions, enums and scalars that only have extensions are built from the first one`() { val (schema, warnings) = withWarnings { parser( """ + directive @tag(name: String!) on SCALAR + type Query { color: Color fooBar: FooBar + node: Node + today: Date } extend enum Color { @@ -383,9 +498,17 @@ class TypeExtensionTest { extend union FooBar = Foo | Bar extend union FooBar = Baz + extend interface Node { id: ID! } + extend interface Node { name: String } + type Item implements Node { id: ID! name: String } + + extend scalar Date @tag(name: "Date extension") + extend scalar Date @specifiedBy(url: "https://example.com/date") + $fooBarBaz """) { - dictionary(Foo::class, Bar::class, Baz::class) + dictionary(Foo::class, Bar::class, Baz::class, Item::class) + scalars(date) }.makeExecutableSchema() } schema.assertEveryFieldResolves() @@ -393,9 +516,43 @@ class TypeExtensionTest { assertEquals(warnings, listOf()) val color = schema.getType("Color") as GraphQLEnumType + val date = schema.getType("Date") as GraphQLScalarType assertEquals(color.values.map { it.name }, listOf("RED", "GREEN")) assertEquals(color.getValue("RED")?.description, "The first red") assertEquals((schema.getType("FooBar") as GraphQLUnionType).types.map { it.name }, listOf("Foo", "Bar", "Baz")) + assertEquals((schema.getType("Node") as GraphQLInterfaceType).fieldDefinitions.map { it.name }, listOf("id", "name")) + assertEquals(date.appliedDirectives.map { it.name }, listOf("tag", "specifiedBy")) + assertEquals(date.specifiedByUrl, "https://example.com/date") + + assertEquals(listOf("Color", "FooBar", "Node", "Date").associateWith { schema.definitionClasses(it) }, mapOf( + "Color" to listOf("EnumTypeExtensionDefinition", "EnumTypeExtensionDefinition"), + "FooBar" to listOf("UnionTypeExtensionDefinition", "UnionTypeExtensionDefinition"), + "Node" to listOf("InterfaceTypeExtensionDefinition", "InterfaceTypeExtensionDefinition"), + "Date" to listOf("ScalarTypeExtensionDefinition", "ScalarTypeExtensionDefinition") + )) + } + + @Test + fun `object and input extensions without a definition don't define their type`() { + val (schema, warnings) = withWarnings { + parser( + """ + type Query { today: String } + extend type Orphan { id: ID } + extend input OrphanInput { id: ID } + """).makeExecutableSchema() + } + + assertEquals(warnings, listOf()) + assertEquals(listOf("Orphan", "OrphanInput").map { schema.getType(it) }, listOf(null, null)) + + listOf( + "type Query { node: Node } extend type Node { id: ID! }" to "Node", + "type Query { search(filter: Filter): String } extend input Filter { id: ID }" to "Filter" + ).forEach { (sdl, name) -> + val message = assertThrows(SchemaClassScannerError::class.java) { parser(sdl) }.message.orEmpty() + assert(message.startsWith("Unable to match type definition ($name) for reference ") && message.endsWith(": No TypeDefinition for type name $name")) { message } + } } @Test @@ -547,6 +704,79 @@ class TypeExtensionTest { assertEquals(error.message, "Type 'Item' declares field 'name' more than once.") } + @Test + fun `a repeat in an extension is reported after scanner and Java enum errors and before missing enum values`() { + val cases = listOf( + Repeat( + """ + |type Query { fooBar: FooBar } + |union FooBar = Foo | Bar + |extend union FooBar = Bar | Baz + |$fooBarBaz + """, + "SchemaClassScannerError: Object type 'Baz' is a member of a known union, but no class could be found for that type name. Please pass a class for type 'Baz' in the parser's dictionary.", + Foo::class, Bar::class + ), + Repeat( + """ + |type Query { shade: Shade } + |enum Shade { DARK } + |extend enum Shade { DARK } + """, + "SchemaError: Type 'Shade' is declared as an enum in the GraphQL schema but is not a Java enum!" + ), + Repeat( + """ + |type Query { color: Color } + |enum Color { BLUE } + |extend enum Color { BLUE } + """, + "SchemaError: Type 'Color' declares value 'BLUE' more than once at line 3, column 21." + ) + ) + + cases.forEach { repeat -> + val error = assertThrows(RuntimeException::class.java) { + parser(repeat.schema.trimMargin()) { dictionary(*repeat.dictionary) }.makeExecutableSchema() + } + + assertEquals("${error.javaClass.simpleName}: ${error.message}", repeat.message) + } + } + + @Test + fun `a repeat in an extension names the source of the extension`() { + val error = assertThrows(SchemaError::class.java) { + SchemaParser.newParser() + .schemaString("type Query { search(filter: Filter): String }\ninput Filter { id: ID }", "Base.graphqls") + .schemaString("extend input Filter {\n id: ID\n}", "Extensions.graphqls") + .resolvers(Query()) + .build() + .makeExecutableSchema() + } + + assertEquals(error.message, "Type 'Filter' declares field 'id' more than once at line 2, column 5 in Extensions.graphqls.") + } + + @Test + fun `a type error names the first use of a type reference in the definitions before the uses in extensions`() { + val filter = TypeName("Filter") + fun field(name: String) = FieldDefinition.newFieldDefinition().name(name).type(filter).build() + val error = assertThrows(SchemaError::class.java) { + parser("type Query { today: String }\ninterface Node { id: ID }\ninput Filter { id: ID }") { + options(SchemaParserOptions.newOptions().includeUnusedTypes(true).typeDefinitionFactory(object : TypeDefinitionFactory { + override fun create(existing: MutableList>) = listOf( + InterfaceTypeExtensionDefinition.newInterfaceTypeExtensionDefinition().name("Node").definitions(listOf(field("fromExtension"))).build(), + InterfaceTypeDefinition.newInterfaceTypeDefinition().name("Other").definitions(listOf(field("fromDefinition"))).build() + ) + }).build()) + }.makeExecutableSchema() + } + + assertEquals(error.message, "Type 'Filter' used by field 'Other.fromDefinition' is an input object type, which can't be used as an output type. " + + "Output types are object types, interfaces, unions, enums and scalars.") + } + @Test fun `input object fields list those of the type before those of its extensions`() { val schema = parser( @@ -567,7 +797,13 @@ class TypeExtensionTest { val (schema, warnings) = withWarnings { parser( """ - type Query { node: Node } + type Query { + node: Node + fooBar: FooBar + color: Color + search(filter: Filter): String + today: Date + } interface Node { id: ID! } extend type Node { name: String } @@ -576,8 +812,23 @@ class TypeExtensionTest { extend union Item = Foo type Foo { foo: String } + + union FooBar = Baz + extend enum FooBar { RED } + + enum Color { RED GREEN } + extend input Color { id: ID } + + input Filter { id: ID } + extend scalar Filter @specifiedBy(url: "https://example.com/filter") + + scalar Date + extend interface Date { id: ID } + + type Baz { baz: String } """) { - dictionary(Item::class) + dictionary(Item::class, Baz::class) + scalars(date) }.makeExecutableSchema() } schema.assertEveryFieldResolves() @@ -585,6 +836,10 @@ class TypeExtensionTest { assertEquals(warnings, listOf( "Type 'Node' is defined as an interface, but extended as an object type. The extension is ignored.", "Type 'Item' is defined as an object type, but extended as a union. The extension is ignored.", + "Type 'FooBar' is defined as a union, but extended as an enum. The extension is ignored.", + "Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored.", + "Type 'Filter' is defined as an input object type, but extended as a scalar. The extension is ignored.", + "Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored.", "Schema type was defined but can never be accessed, and can be safely deleted: Foo" )) @@ -592,7 +847,34 @@ class TypeExtensionTest { val item = schema.getType("Item") as GraphQLObjectType assertEquals(node.fieldDefinitions.map { it.name }, listOf("id")) assertEquals(item.interfaces.map { it.name }, listOf("Node")) - assertEquals(node.extensionDefinitions.size + item.extensionDefinitions.size, 0) + assertEquals((schema.getType("FooBar") as GraphQLUnionType).types.map { it.name }, listOf("Baz")) + assertEquals((schema.getType("Color") as GraphQLEnumType).values.map { it.name }, listOf("RED", "GREEN")) + assertEquals((schema.getType("Filter") as GraphQLInputObjectType).fieldDefinitions.map { it.name }, listOf("id")) + assertEquals((schema.getType("Date") as GraphQLScalarType).specifiedByUrl, null) + assertEquals(listOf("Node", "Item", "FooBar", "Color", "Filter", "Date").map { schema.definitionClasses(it).size }, listOf(1, 1, 1, 1, 1, 1)) + } + + @Test + fun `a Map argument of an input object with an ignored scalar extension still gets the coerced values unconverted`() { + fun describe(extension: String): Map { + val schema = SchemaParser.newParser() + .schemaString( + """ + type Query { describe(filter: Filter!): String } + input Filter { color: Color } + enum Color { RED GREEN } + $extension + """) + .resolvers(MapQuery()) + .dictionary(Color::class) + .build() + .makeExecutableSchema() + + return assertNoGraphQlErrors(GraphQL.newGraphQL(schema).build()) { "query { describe(filter: { color: GREEN }) }" } + } + + assertEquals(describe(""), mapOf("describe" to "color: String")) + assertEquals(describe("extend scalar Filter @specifiedBy(url: \"https://example.com/filter\")"), mapOf("describe" to "color: Color")) } @Test @@ -642,8 +924,32 @@ class TypeExtensionTest { assertEquals(schema.getSchemaAppliedDirectives("link").map { it.getArgument("for")?.getValue() }, listOf("EXECUTION")) } + @Test + fun `enums used by directives and by fields of interface extensions need a class`() { + val error = assertThrows(SchemaError::class.java) { + parser( + """ + directive @link(for: Purpose) repeatable on SCHEMA + extend schema @link(for: SECURITY) + + type Query { today: String } + + interface Node { id: ID! } + extend interface Node { purpose: Purpose } + + enum Purpose { SECURITY } + """) { + options(SchemaParserOptions.newOptions().includeUnusedTypes(true).build()) + }.makeExecutableSchema() + } + + assertEquals(error.message, "Expected enum with name 'Purpose' but found none!") + } + private class Repeat(val schema: String, val message: String, vararg val dictionary: KClass<*>) + private val date = GraphQLScalarType.newScalar().name("Date").coercing(Scalars.GraphQLString.coercing).build() + private val fooBarBaz = """ type Foo { foo: String } type Bar { bar: String } @@ -657,8 +963,9 @@ class TypeExtensionTest { fun fooBar(): FooBar = Baz("baz") fun color(): Color = Color.GREEN fun node(): Node = Item("1", "item") - fun search(filter: Filter?): String? = null + fun search(filter: Filter?): String? = generateSequence(filter) { it.and }.joinToString(" and ") { "${it.id} limit ${it.limit}" } fun today(): String = "2026-10-12" + fun shade(): Shade = Shade() } interface FooBar @@ -673,12 +980,18 @@ class TypeExtensionTest { class Item(val id: String, val name: String?, val fooBar: Foo? = null) : Node - class Filter(val id: String?, val limit: Int? = null, val offset: Int? = null, val inner: Inner? = null) + class Filter(val id: String?, val limit: Int? = null, val offset: Int? = null, val inner: Inner? = null, val and: Filter? = null) class Inner(val id: String?) enum class Color { RED, GREEN } + class Shade + + class MapQuery : GraphQLQueryResolver { + fun describe(filter: Map): String = filter.entries.joinToString { "${it.key}: ${it.value?.javaClass?.simpleName}" } + } + private class RecordingWiring : SchemaDirectiveWiring { val wired = mutableListOf() @@ -702,3 +1015,17 @@ class TypeExtensionTest { } private fun GraphQLAppliedDirective.describe() = "@$name(${getArgument("name")?.getValue()})" + +private fun GraphQLSchema.definitionClasses(name: String): List { + val type = getType(name) as GraphQLNamedType + val extensions = when (type) { + is GraphQLObjectType -> type.extensionDefinitions + is GraphQLInterfaceType -> type.extensionDefinitions + is GraphQLUnionType -> type.extensionDefinitions + is GraphQLEnumType -> type.extensionDefinitions + is GraphQLInputObjectType -> type.extensionDefinitions + is GraphQLScalarType -> type.extensionDefinitions + else -> error("$name has no extensions") + } + return (listOf(type.definition) + extensions).map { it?.javaClass?.simpleName } +} From 1ffb216c9fe16c47cccf57847e4e7bd7d11253b0 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:23:43 -0500 Subject: [PATCH 17/64] Catch keeps-building and old-behavior narration in comments "keeps building old schemas" slipped through after the precision pass narrowed the keep-building phrase to one word order. Flag keep(s) building next to schemas in either order, and old or previous behavior. Self-tests pin both, plus "used to build the type" as purpose, not history. --- .../graphql/kickstart/tools/CommentConventionsTest.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt b/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt index a1fdb31e..318997d8 100644 --- a/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/CommentConventionsTest.kt @@ -45,6 +45,10 @@ class CommentConventionsTest { assertEquals(listOf("history", "history"), rules("// converted, as it did before this check")) assertEquals(listOf("history"), rules("// to keep those schemas building")) assertEquals(listOf("history"), rules("// so those schemas keep building")) + assertEquals(listOf("history"), rules("// keeps building old schemas")) + assertEquals(listOf("history"), rules("// so schemas keep building")) + assertEquals(listOf("history"), rules("// the old behavior was to throw here")) + assertEquals(listOf("history"), rules("// restores the previous behaviour")) assertEquals(listOf("history"), rules("// this check is no longer needed")) assertEquals(listOf("version"), rules("/** @since 15.0 */")) assertEquals(listOf("version"), rules("// since 1.2.0 the parser")) @@ -56,6 +60,7 @@ class CommentConventionsTest { listOf( "// returns the list unchanged", "// the previously resolved type wins", + "// the cache used to build the type in the scanner", "// no longer than 80 characters", "// the result is now cached for the next call", "// so the loop keeps working on an empty map", @@ -111,6 +116,9 @@ internal object CommentLint { """\b(?:as|like|than) before\b""", """\bkeeps? (?:those|these|such|existing|old) (?:\w+ )?(?:building|working)\b""", """\b(?:those|these|such|existing|old) schemas? (?:still|keeps?) (?:builds?|building|works?|working)\b""", + """\bkeeps? building (?:\w+ )?schemas?\b""", + """\bschemas? keeps? building\b""", + """\b(?:old|previous) behaviou?r\b""", ) private val rules = listOf( From 4e823d358ddc4d8a45b0b01123d75e7a6b260782 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:33:17 -0500 Subject: [PATCH 18/64] Move the probe scenarios into the library's tests as data Each scenario now lists its SDL files and resolvers and configures the rest of the builder, so a test can read its schema and swap its resolvers. The probe compiles the same directory. The type-extensions scenario repeated a field, a member, a value and a directive in its extensions, which 15.0.0 rejects, so it dropped them and its feature page says what 15.0.0 does. --- .claude/skills/verify-tools/SKILL.md | 22 +++++++----- .../features/context-and-environment.md | 2 +- .../features/directives-and-relay.md | 4 +-- .../skills/verify-tools/features/proxies.md | 2 +- .../verify-tools/features/schema-building.md | 2 +- .../verify-tools/features/type-extensions.md | 34 +++++++------------ .claude/skills/verify-tools/probe.sh | 5 +-- .claude/skills/verify-tools/probe/pom.xml | 16 +++++++++ .../probe/src/main/kotlin/probe/Main.kt | 5 +-- .../tools/compat}/scenarios/Async.kt | 8 ++--- .../tools/compat}/scenarios/Bookstore.kt | 18 +++++----- .../scenarios/ContextAndEnvironment.kt | 18 +++++----- .../compat}/scenarios/ContextMisbound.kt | 11 +++--- .../tools/compat}/scenarios/DirectiveDrift.kt | 17 +++++----- .../tools/compat/scenarios}/DirectiveDump.kt | 4 +-- .../tools/compat}/scenarios/Directives.kt | 11 +++--- .../compat}/scenarios/DirectivesInvalid.kt | 11 +++--- .../compat}/scenarios/GenericInputResolver.kt | 8 ++--- .../tools/compat}/scenarios/Inputs.kt | 11 +++--- .../tools/compat}/scenarios/JdkProxy.kt | 16 ++++----- .../tools/compat}/scenarios/NestedUnions.kt | 11 +++--- .../tools/compat}/scenarios/NestedWrappers.kt | 16 ++++----- .../compat}/scenarios/NestedWrappersExact.kt | 11 +++--- .../compat}/scenarios/OptionalResults.kt | 23 +++++-------- .../tools/compat}/scenarios/Options.kt | 11 +++--- .../tools/compat}/scenarios/Polymorphism.kt | 11 +++--- .../tools/compat}/scenarios/ReadOnlySchema.kt | 10 +++--- .../compat}/scenarios/RecursiveInputs.kt | 11 +++--- .../tools/compat}/scenarios/ScalarArgs.kt | 11 +++--- .../compat}/scenarios/ScalarDirectives.kt | 11 +++--- .../tools/compat}/scenarios/Scenario.kt | 12 +++++-- .../tools/compat}/scenarios/Sourceless.kt | 28 +++++++-------- .../tools/compat}/scenarios/TypeExtensions.kt | 11 +++--- .../scenarios/TypeExtensionsInputOrder.kt | 8 ++--- .../scenarios/TypeExtensionsRepeatedFields.kt | 8 ++--- .../compat}/scenarios/TypeExtensionsSealed.kt | 8 ++--- .../tools/compat}/scenarios/UnmappedInputs.kt | 8 ++--- .../tools/compat}/scenarios/WiringShapes.kt | 11 +++--- .../compat}/scenarios/async/01-query.graphql | 0 .../scenarios/async/02-subscription.graphql | 0 .../compat}/scenarios/async/schema.graphqls | 0 .../extension.graphqls | 0 .../scenarios/bookstore/01-books.graphql | 0 .../scenarios/bookstore/02-book-by-id.graphql | 0 .../bookstore/02-book-by-id.variables.json | 0 .../scenarios/bookstore/schema.graphqls | 0 .../schema.graphqls | 3 ++ .../context-and-environment/01-query.graphql | 0 .../context-and-environment/schema.graphqls | 0 .../01-without-argument.graphql | 0 .../context-misbound/02-with-argument.graphql | 0 .../03-context-and-correct.graphql | 0 .../context-misbound/04-type-resolver.graphql | 0 .../context-misbound/schema.graphqls | 0 .../schema.graphqls | 0 .../scenarios/directive-drift/schema.graphqls | 0 .../directives-invalid/01-query.graphql | 0 .../directives-invalid/schema.graphqls | 0 .../scenarios/directives/01-uppercase.graphql | 0 .../directives/02-deprecated.graphql | 0 .../directives/03-connection.graphql | 0 .../scenarios/directives/schema.graphqls | 0 .../generic-input-resolver/01-plain.graphql | 0 .../generic-input-resolver/02-generic.graphql | 0 .../generic-input-resolver/schema.graphqls | 0 .../scenarios/inputs/01-search.graphql | 0 .../scenarios/inputs/02-nickname.graphql | 0 .../scenarios/inputs/03-add-book.graphql | 0 .../inputs/03-add-book.variables.json | 0 .../scenarios/inputs/04-invalid-enum.graphql | 0 .../compat}/scenarios/inputs/schema.graphqls | 0 .../scenarios/jdk-proxy/01-query.graphql | 0 .../scenarios/jdk-proxy/schema.graphqls | 0 .../nested-unions/01-results.graphql | 0 .../scenarios/nested-unions/schema.graphqls | 0 .../nested-wrappers-exact/01-dates.graphql | 0 .../02-tried-dates.graphql | 0 .../03-plain-future-items.graphql | 0 .../04-batched-items.graphql | 0 .../05-boxed-items.graphql | 0 .../06-later-items.graphql | 0 .../07-suspend-plain-future-items.graphql | 0 .../nested-wrappers-exact/schema.graphqls | 0 .../01-nullable-items.graphql | 0 .../02-non-null-items.graphql | 0 .../03-type-variable-strings.graphql | 0 .../nested-wrappers-suspend/schema.graphqls | 0 .../nested-wrappers/01-payload.graphql | 0 .../nested-wrappers/02-payloads.graphql | 0 .../03-payload-strings.graphql | 0 .../nested-wrappers/04-items.graphql | 0 .../nested-wrappers/05-item-names.graphql | 0 .../06-future-of-future.graphql | 0 .../07-future-of-tries.graphql | 0 .../08-tries-of-futures.graphql | 0 .../nested-wrappers/09-loaded-items.graphql | 0 .../10-failed-try-in-list.graphql | 0 .../11-failed-future-in-list.graphql | 0 .../nested-wrappers/12-controls.graphql | 0 .../scenarios/nested-wrappers/schema.graphqls | 0 .../01-optional-result-list.graphql | 0 .../optional-results-list/schema.graphqls | 0 .../01-optional-result.graphql | 0 .../02-result-of-optional.graphql | 0 .../optional-results-mixed/schema.graphqls | 0 .../01-optional-result-of-result.graphql | 0 .../optional-results-nested/schema.graphqls | 0 .../01-optional-result.graphql | 0 .../02-optional-result-name.graphql | 0 .../03-empty-optional-result.graphql | 0 .../optional-results/schema.graphqls | 0 .../scenarios/options/01-fields.graphql | 0 .../options/02-schema-introspection.graphql | 0 .../options/03-type-introspection.graphql | 0 .../compat}/scenarios/options/schema.graphqls | 0 .../scenarios/polymorphism/01-node.graphql | 0 .../scenarios/polymorphism/02-union.graphql | 0 .../scenarios/polymorphism/schema.graphqls | 0 .../read-only-schema/01-interface.graphql | 0 .../read-only-schema/02-union.graphql | 0 .../read-only-schema/03-no-mutation.graphql | 0 .../read-only-schema/schema.graphqls | 0 .../recursive-inputs/01-describe.graphql | 0 .../01-describe.variables.json | 0 .../recursive-inputs/02-introspect.graphql | 0 .../recursive-inputs/schema.graphqls | 0 .../scalar-args/01-custom-scalar.graphql | 0 .../scenarios/scalar-args/02-id.graphql | 0 .../scalar-args/03-nested-sets.graphql | 0 .../scalar-args/04-nested-lists.graphql | 0 .../05-empty-kotlin-scalar.graphql | 0 .../06-marked-empty-kotlin-scalars.graphql | 0 ...tional-marked-empty-kotlin-scalars.graphql | 0 .../scenarios/scalar-args/schema.graphqls | 0 .../01-introspect-scalars.graphql | 0 .../scalar-directives/02-use-scalars.graphql | 0 .../scalar-directives/schema.graphqls | 0 .../sourceless-misbound/01-thumbnail.graphql | 0 .../sourceless-misbound/schema.graphqls | 0 .../sourceless-shadowed/01-shadowed.graphql | 0 .../sourceless-shadowed/schema.graphqls | 0 .../01-helper.graphql | 0 .../sourceless-unimplemented/schema.graphqls | 0 .../sourceless/01-local-context.graphql | 0 .../scenarios/sourceless/02-contexts.graphql | 0 .../scenarios/sourceless/schema.graphqls | 0 .../01-count.graphql | 0 .../schema.graphqls | 0 .../01-kept-declarations.graphql | 0 .../02-introspection.graphql | 0 .../schema.graphqls | 0 .../01-pets-and-animals.graphql | 0 .../type-extensions-sealed/schema.graphqls | 0 .../scenarios/type-extensions/01-node.graphql | 0 .../02-search-and-enums.graphql | 0 .../type-extensions/03-introspection.graphql | 0 .../scenarios/type-extensions/schema.graphqls | 7 ++-- .../unmapped-inputs/01-ignored.graphql | 0 .../scenarios/unmapped-inputs/02-typo.graphql | 0 .../scenarios/unmapped-inputs/schema.graphqls | 0 .../scenarios/wiring-shapes/01-trees.graphql | 0 .../scenarios/wiring-shapes/02-person.graphql | 0 .../scenarios/wiring-shapes/schema.graphqls | 0 163 files changed, 237 insertions(+), 218 deletions(-) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Async.kt (82%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Bookstore.kt (77%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/ContextAndEnvironment.kt (76%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/ContextMisbound.kt (75%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/DirectiveDrift.kt (76%) rename {.claude/skills/verify-tools/probe/src/main/kotlin/probe => src/test/kotlin/graphql/kickstart/tools/compat/scenarios}/DirectiveDump.kt (95%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Directives.kt (81%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/DirectivesInvalid.kt (53%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/GenericInputResolver.kt (66%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Inputs.kt (81%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/JdkProxy.kt (59%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/NestedUnions.kt (58%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/NestedWrappers.kt (89%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/NestedWrappersExact.kt (91%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/OptionalResults.kt (74%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Options.kt (68%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Polymorphism.kt (73%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/ReadOnlySchema.kt (76%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/RecursiveInputs.kt (69%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/ScalarArgs.kt (92%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/ScalarDirectives.kt (82%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Scenario.kt (61%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/Sourceless.kt (74%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/TypeExtensions.kt (78%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/TypeExtensionsInputOrder.kt (74%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/TypeExtensionsRepeatedFields.kt (88%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/TypeExtensionsSealed.kt (72%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/UnmappedInputs.kt (76%) rename {.claude/skills/verify-tools/probe/src/main/kotlin => src/test/kotlin/graphql/kickstart/tools/compat}/scenarios/WiringShapes.kt (89%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/async/01-query.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/async/02-subscription.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/async/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/bookstore-missing-resolver/extension.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/bookstore/01-books.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/bookstore/02-book-by-id.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/bookstore/02-book-by-id.variables.json (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/bookstore/schema.graphqls (100%) create mode 100644 src/test/resources/compat/scenarios/context-and-environment-invalid/schema.graphqls rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-and-environment/01-query.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-and-environment/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-misbound/01-without-argument.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-misbound/02-with-argument.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-misbound/03-context-and-correct.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-misbound/04-type-resolver.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/context-misbound/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directive-drift-undeclared/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directive-drift/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directives-invalid/01-query.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directives-invalid/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directives/01-uppercase.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directives/02-deprecated.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directives/03-connection.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/directives/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/generic-input-resolver/01-plain.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/generic-input-resolver/02-generic.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/generic-input-resolver/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/inputs/01-search.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/inputs/02-nickname.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/inputs/03-add-book.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/inputs/03-add-book.variables.json (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/inputs/04-invalid-enum.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/inputs/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/jdk-proxy/01-query.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/jdk-proxy/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-unions/01-results.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-unions/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/01-dates.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/02-tried-dates.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/03-plain-future-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/04-batched-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/05-boxed-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/06-later-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-exact/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-suspend/01-nullable-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-suspend/02-non-null-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers-suspend/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/01-payload.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/02-payloads.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/03-payload-strings.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/04-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/05-item-names.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/06-future-of-future.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/07-future-of-tries.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/08-tries-of-futures.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/09-loaded-items.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/10-failed-try-in-list.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/11-failed-future-in-list.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/12-controls.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/nested-wrappers/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-list/01-optional-result-list.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-list/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-mixed/01-optional-result.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-mixed/02-result-of-optional.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-mixed/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-nested/01-optional-result-of-result.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results-nested/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results/01-optional-result.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results/02-optional-result-name.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results/03-empty-optional-result.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/optional-results/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/options/01-fields.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/options/02-schema-introspection.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/options/03-type-introspection.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/options/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/polymorphism/01-node.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/polymorphism/02-union.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/polymorphism/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/read-only-schema/01-interface.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/read-only-schema/02-union.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/read-only-schema/03-no-mutation.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/read-only-schema/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/recursive-inputs/01-describe.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/recursive-inputs/01-describe.variables.json (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/recursive-inputs/02-introspect.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/recursive-inputs/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/01-custom-scalar.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/02-id.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/03-nested-sets.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/04-nested-lists.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/05-empty-kotlin-scalar.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-args/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-directives/01-introspect-scalars.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-directives/02-use-scalars.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/scalar-directives/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless-misbound/01-thumbnail.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless-misbound/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless-shadowed/01-shadowed.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless-shadowed/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless-unimplemented/01-helper.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless-unimplemented/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless/01-local-context.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless/02-contexts.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/sourceless/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-input-order/01-count.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-input-order/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-repeated-fields/02-introspection.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-repeated-fields/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-sealed/01-pets-and-animals.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions-sealed/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions/01-node.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions/02-search-and-enums.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions/03-introspection.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/type-extensions/schema.graphqls (86%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/unmapped-inputs/01-ignored.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/unmapped-inputs/02-typo.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/unmapped-inputs/schema.graphqls (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/wiring-shapes/01-trees.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/wiring-shapes/02-person.graphql (100%) rename {.claude/skills/verify-tools/probe/src/main/resources => src/test/resources/compat}/scenarios/wiring-shapes/schema.graphqls (100%) diff --git a/.claude/skills/verify-tools/SKILL.md b/.claude/skills/verify-tools/SKILL.md index 89a3d8e7..45a44bad 100644 --- a/.claude/skills/verify-tools/SKILL.md +++ b/.claude/skills/verify-tools/SKILL.md @@ -28,8 +28,8 @@ and run another checkout's `probe.sh` from inside it. reads `~/.m2` but never writes it. The install runs `mvn clean install`, so it empties the checkout's `target/`. Don't run it while another build uses the same checkout. The work dir is keyed on the checkout's path, so clones and worktrees run in parallel, even when two share a folder name. If `doctor` shows the lock held by a live pid, wait for that run. -- It builds the schema from the scenario's `parser()`, prints it, then executes every `*.graphql` in - `probe/src/main/resources/scenarios//` in name order, with `.variables.json` as variables. It collects +- It builds the schema from the scenario's files, resolvers and `configure`, prints it, then executes every `*.graphql` in + `src/test/resources/compat/scenarios//` in name order, with `.variables.json` as variables. It collects subscription events until the stream completes, for at most 10 seconds. - Exit `0`: the schema built and every operation ran, though operations can still return GraphQL errors. `2`: the build threw. `1`: harness failure (install log or `maven.log`) or a held lock. `64`: bad usage, such as a missing or unknown @@ -65,17 +65,21 @@ Proof standards: ## Adding a scenario -1. Write the SDL as `probe/src/main/resources/scenarios//schema.graphqls` and load it with `.file(...)`, unless the - behavior is about `schemaString`. -2. Add `object : Scenario` with `name` and `parser()` in `probe/src/main/kotlin/scenarios/.kt`. Being an - object in that package registers it. Classes share the package, so prefix resolver and data classes with the scenario. - Use only public API. If the probe needs `internal` or test classes, a user can't reach the behavior either, so report - that. +Scenarios live in the library's tests, so `mvn verify` compiles them and `CompatTest` builds each one, plus invalid +variants of it, against the last release's results. + +1. Write the SDL as `src/test/resources/compat/scenarios//schema.graphqls`. +2. Add `object : Scenario` with `name`, `files` and `resolvers` in + `src/test/kotlin/graphql/kickstart/tools/compat/scenarios/.kt`, and override `configure(builder)` for scalars, + dictionary, directives or options. Being an object in that package registers it. Classes share the package, so prefix + resolver and data classes with the scenario. Use only public API and nothing from other test packages, since the probe + compiles this directory alone. If the probe needs `internal` or test classes, a user can't reach the behavior either, + so report that. 3. Add operations as `NN-.graphql`, plus `NN-.variables.json` when they take variables. graphql-java rejects a second `__type` in one operation and still exits `0`, so read several types through `__schema { types { ... } }`. 4. Override what the scenario needs. `operations` reuses another scenario's operation directory. `schema(parser)` takes another build path such as `toReadOnlySchema()`. `inspect(schema)` returns evidence the printer doesn't show, and - `probe.dumpDirectives(schema)` lists every element's applied and legacy directives. `graphQL(builder)` and + `dumpDirectives(schema)` lists every element's applied and legacy directives. `graphQL(builder)` and `input(builder)` add instrumentation, context or data loaders. 5. A scenario that doesn't compile breaks every checkout's run, so finish it before running. Keep a scenario that proves a lasting feature and add its exact expected results to the matching file in `features/`. Delete a one-off diff --git a/.claude/skills/verify-tools/features/context-and-environment.md b/.claude/skills/verify-tools/features/context-and-environment.md index ef0b1bb2..24d43d6e 100644 --- a/.claude/skills/verify-tools/features/context-and-environment.md +++ b/.claude/skills/verify-tools/features/context-and-environment.md @@ -44,7 +44,7 @@ Any other trailing parameter type fails the build with "No method found". throws, so `01-helper.json` is `{"threw": "java.util.concurrent.CompletionException: kotlin.NotImplementedError: An operation is not implemented: Schema resolver not implemented"}`. - `run sourceless-misbound`: exit `2`. `thumbnail(GraphQLContext, env)` for `thumbnail(size: Int)` still fails the build. - The signatures listed for `scenarios/sourceless-misbound/schema.graphqls:11` end with + The signatures listed for `compat/scenarios/sourceless-misbound/schema.graphqls:11` end with `scenarios.MisboundImageResolver.thumbnail(~size, )` and `scenarios.MisboundImageResolver.getThumbnail(~size, )`. diff --git a/.claude/skills/verify-tools/features/directives-and-relay.md b/.claude/skills/verify-tools/features/directives-and-relay.md index 5a30a8a8..f7a92751 100644 --- a/.claude/skills/verify-tools/features/directives-and-relay.md +++ b/.claude/skills/verify-tools/features/directives-and-relay.md @@ -67,7 +67,7 @@ application, and fails for a directive with no definition unless `allowUndeclare - **Drift warnings.** `probe.log` of `directive-drift` has 12 `SchemaParser` WARNs. Six are `isn't repeatable but is applied more than once`, two are an extension of `Date` or `Query` applying `@once` again, two are `is missing its required argument` (`@tag` and `@needs`), one is `Directive @fieldOnly at line 38, column 28 in - scenarios/directive-drift/schema.graphqls is applied to ARGUMENT_DEFINITION, but it's declared on FIELD_DEFINITION.`, and + compat/scenarios/directive-drift/schema.graphqls is applied to ARGUMENT_DEFINITION, but it's declared on FIELD_DEFINITION.`, and one is `Scalar 'Money' is built without its directives from the schema: Found an unexpected directive argument tag#nam .` None names `@undeclared`, because `directive-drift` sets `allowUndeclaredDirectives(true)`. - **Undeclared.** `run directive-drift-undeclared`. Exit `2`. `summary.txt` has `schema build: FAILED @@ -75,7 +75,7 @@ application, and fails for a directive with no definition unless `allowUndeclare and `build-error.txt` starts with the same message. - **Invalid applications.** `run directives-invalid`. Exit `0` and `errors=0`. `01-query.json` has `data.motto = "KEEP IT SIMPLE"`, so the misplaced `@uppercase` still wires. `probe.log` has exactly 5 `SchemaParser` - WARNs, each naming its line and column in `scenarios/directives-invalid/schema.graphqls`. + WARNs, each naming its line and column in `compat/scenarios/directives-invalid/schema.graphqls`. `Directive @uppercase at line 12, column 20 ... is applied to FIELD_DEFINITION, but it's declared on OBJECT.` `Directive @deprecated at line 17, column 13 ... is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION.` diff --git a/.claude/skills/verify-tools/features/proxies.md b/.claude/skills/verify-tools/features/proxies.md index b446eb25..529ebe69 100644 --- a/.claude/skills/verify-tools/features/proxies.md +++ b/.claude/skills/verify-tools/features/proxies.md @@ -33,4 +33,4 @@ warning per field that suggests class-based proxies, plus a getter for a field. - The proxy number in `jdk.proxy2.$ProxyN` varies between runs. - CGLIB can't override `final` members, so the resolver and its members must be `open`. A final getter is called on the proxy itself and reads the proxy's empty field, like `count` does. -- The three scenarios share the schema and operations in `scenarios/jdk-proxy/`. +- The three scenarios share the schema and operations in `compat/scenarios/jdk-proxy/`. diff --git a/.claude/skills/verify-tools/features/schema-building.md b/.claude/skills/verify-tools/features/schema-building.md index 177aa820..7e388f79 100644 --- a/.claude/skills/verify-tools/features/schema-building.md +++ b/.claude/skills/verify-tools/features/schema-building.md @@ -34,7 +34,7 @@ signature it tried. Types no root can reach get a warning and are dropped from t Review`. `schema.graphqls` has no `type Review`. - **Missing resolver.** `run bookstore-missing-resolver`. Exit `2`. `summary.txt` has `schema build: FAILED graphql.kickstart.tools.resolver.FieldResolverError: No method or field found as defined in - schema scenarios/bookstore-missing-resolver/extension.graphqls:2`. The 8 listed signatures start with + schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2`. The 8 listed signatures start with `scenarios.AuthorResolver.isbn(scenarios.Book)`, have `scenarios.Book.isbn` sixth, and end with `scenarios.AuthorResolver.getIsbn()`. `build-error.txt` has the stack trace. - **Read-only schema.** `run read-only-schema`. Exit `0` and all three operations diff --git a/.claude/skills/verify-tools/features/type-extensions.md b/.claude/skills/verify-tools/features/type-extensions.md index 51361af7..f8ff2d25 100644 --- a/.claude/skills/verify-tools/features/type-extensions.md +++ b/.claude/skills/verify-tools/features/type-extensions.md @@ -2,23 +2,21 @@ `extend type`, `extend interface`, `extend union`, `extend enum`, `extend input` and `extend scalar` add to the type they extend: fields, interfaces, members, values and directives are merged into one graphql-java type, base first. Where a type -declares an enum value, interface field or union member twice, or an extension applies a non-repeatable directive again, -the first one is kept and a WARN is logged. An object or input field declared twice keeps the last declaration, the type's -own for an input since its extensions are applied first, and logs a WARN that names that declaration. An extension of a different kind than its type is ignored with a WARN. A union, -enum, interface or scalar that only has extensions is built from them. +and its extensions declare a field, enum value or union member twice, or apply a non-repeatable directive again, the build +fails with a `SchemaError` that names the type, the item and its line. An extension of a different kind than its type is +ignored with a WARN. A union, enum, interface or scalar that only has extensions is built from them. ## Sub-features - `ext-interface-fields` merges the fields of `extend interface`, keeping the base `id` and its description. - `ext-implements` makes `extend type Video implements Node` take effect. - `ext-union-members` merges the members of `extend union`. -- `ext-enum-values` merges the values of `extend enum`, keeping the base description of a repeated value. +- `ext-enum-values` merges the values of `extend enum`, keeping the base description. - `ext-lone-enum` builds an enum that only has extensions, from all of them. - `ext-directives` applies the directives of every extension after those of the type. -- `ext-non-repeatable` keeps the first of a non-repeatable directive that an extension applies again, with a WARN. -- `ext-repeats` warns about a repeated interface field, union member and enum value. -- `ext-repeated-fields` warns about an object or input field declared twice, between a type and its extension, between - two extensions and inside one definition, and keeps the last declaration, the type's own for an input. +- `ext-repeats` fails the build on a field, enum value or union member declared twice, or a non-repeatable directive + applied twice, across a type and its extensions. `type-extensions-repeated-fields` shows it for fields, and the + `repeat` and `repeat-directive` cases of `CompatTest` cover every scenario type. - `ext-other-kind` ignores `extend union Note` of `type Note` with a WARN. - `ext-sealed` finds the class of a union member added by `extend union`, and of an implementor added by `extend type X implements Y`, among the subclasses of a sealed class or interface. @@ -36,19 +34,11 @@ enum, interface or scalar that only has extensions is built from them. "The first red". - **Directives.** `schema.graphqls` has `@tag(name : "base") @tag(name : "extension")` on `Node`, `SearchResult`, `Color`, `Filter` and `Article`, and `Article` has `@owner(team : "content")` once, before its `@tag`s. -- **Warnings.** `probe.log` has one WARN each for `Type 'Note' is defined as an object type, but extended as a union`, - `@owner isn't repeatable`, `Type 'Node' declares field 'id'`, `Type 'SearchResult' declares member 'Article'` and - `Type 'Color' declares value 'RED'`. -- **Repeated fields.** `run type-extensions-repeated-fields`. Exit `0`, `errors=0` for both operations, and the same - schema, operation results and `inspect.txt` as master. `01-kept-declarations.json` has `typeAndExtension.name = "a"`, - `twoExtensions = {"id": "b", "name": "c"}`, `oneDefinition.name = "d"` and `echo = "1,t,2,3"`. `inspect.txt` has - `TypeAndExtension.name: From the extension`, `TwoExtensions.name: From the second extension`, - `OneDefinition.name: The second`, `InputTypeAndExtension.id: From the type`, - `InputTwoExtensions.id: From the second extension` and `InputOneDefinition.id: The second`. `probe.log` has exactly six - WARNs, one per type, each `Type '' declares field '' more than once, only the one at line , column 5 in - scenarios/type-extensions-repeated-fields/schema.graphqls is kept.` with lines 18 (`TypeAndExtension`), 32 - (`TwoExtensions`), 39 (`OneDefinition`), 44 (`InputTypeAndExtension`), 63 (`InputTwoExtensions`) and 70 - (`InputOneDefinition`). On master `probe.log` is empty. +- **Warnings.** `probe.log` has `Type 'Note' is defined as an object type, but extended as a union. The extension is + ignored.` and `Schema type was defined but can never be accessed, and can be safely deleted: Note`, and nothing else. +- **Repeated fields.** `run type-extensions-repeated-fields`. Exit `2`, and `summary.txt` has `schema build: FAILED + graphql.kickstart.tools.SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, + column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls.` - **Sealed.** `run type-extensions-sealed`. `01-pets-and-animals.json` has `pets = [{"__typename": "Dog", "name": "Rex"}, {"__typename": "Cat", "lives": 9}]` and `animals` with a `Cow` and a `Horse`, with no WARN in `probe.log`. diff --git a/.claude/skills/verify-tools/probe.sh b/.claude/skills/verify-tools/probe.sh index 89dc2afa..285c5e89 100755 --- a/.claude/skills/verify-tools/probe.sh +++ b/.claude/skills/verify-tools/probe.sh @@ -14,6 +14,7 @@ M2="$WORK/m2" TAIL_M2="$HOME/.m2/repository" EVIDENCE_ROOT="$ROOT/evidence" STAMP="$WORK/installed.stamp" +SCENARIOS="$SKILL_DIR/../../../src/test/kotlin/graphql/kickstart/tools/compat/scenarios" die() { echo "probe: $*" >&2; exit 1; } usage_error() { echo "probe: $*" >&2; exit 64; } @@ -94,7 +95,7 @@ cmd_doctor() { } cmd_list() { - grep -h 'override val name = ' "$SKILL_DIR"/probe/src/main/kotlin/scenarios/*.kt | sed 's/.*= "\(.*\)"/\1/' + grep -h 'override val name = ' "$SCENARIOS"/*.kt | sed 's/.*= "\(.*\)"/\1/' } cmd_run() { @@ -134,7 +135,7 @@ cmd_run() { "-Dprobe.build.dir=$build" "-Dmdep.outputFile=$build/classpath.txt") [[ -z "$gj" ]] || mvn_args+=("-Dgraphql-java.version=$gj") # resources:resources only copies, so an operation deleted from a scenario would keep running - rm -rf "$build"/classes/scenarios/*/ + rm -rf "$build"/classes/compat/scenarios/*/ if ! mvn_isolated "${mvn_args[@]}" compile dependency:build-classpath > "$evidence/maven.log" 2>&1; then grep -E '^\[ERROR\]|^e: ' "$evidence/maven.log" | head -30 >&2 || true die "probe compile failed, see $evidence/maven.log" diff --git a/.claude/skills/verify-tools/probe/pom.xml b/.claude/skills/verify-tools/probe/pom.xml index 8cdeb468..dbb14762 100644 --- a/.claude/skills/verify-tools/probe/pom.xml +++ b/.claude/skills/verify-tools/probe/pom.xml @@ -11,6 +11,7 @@ UNSET 2.3.10 ${project.basedir}/target + ${project.basedir}/../../../.. @@ -64,6 +65,17 @@ ${probe.build.dir} src/main/kotlin + + + src/main/resources + + + ${checkout.dir}/src/test/resources + + compat/scenarios/** + + + org.jetbrains.kotlin @@ -71,6 +83,10 @@ ${kotlin.version} 11 + + src/main/kotlin + ${checkout.dir}/src/test/kotlin/graphql/kickstart/tools/compat/scenarios + diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt index c17009fa..f010a78a 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt +++ b/.claude/skills/verify-tools/probe/src/main/kotlin/probe/Main.kt @@ -7,12 +7,13 @@ import graphql.ExecutionInput import graphql.ExecutionResult import graphql.GraphQL import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.compat.scenarios.SCENARIOS +import graphql.kickstart.tools.compat.scenarios.parser import graphql.schema.GraphQLSchema import graphql.schema.idl.SchemaPrinter import org.reactivestreams.Publisher import org.reactivestreams.Subscriber import org.reactivestreams.Subscription -import scenarios.SCENARIOS import java.io.File import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit @@ -91,7 +92,7 @@ private fun usage(problem: String): Nothing { private fun jarOf(clazz: Class<*>) = clazz.protectionDomain.codeSource?.location?.path ?: "unknown" private fun operationFiles(scenario: String): List { - val dir = Thread.currentThread().contextClassLoader.getResource("scenarios/$scenario") + val dir = Thread.currentThread().contextClassLoader.getResource("compat/scenarios/$scenario") ?: return emptyList() return File(dir.toURI()).listFiles { file -> file.extension == "graphql" }!!.sortedBy { it.name } } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Async.kt similarity index 82% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Async.kt index 87ba5aa5..dddab4ee 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Async.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Async.kt @@ -1,9 +1,8 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.GraphQLResolver import graphql.kickstart.tools.GraphQLSubscriptionResolver -import graphql.kickstart.tools.SchemaParser import kotlinx.coroutines.delay import kotlinx.coroutines.reactive.publish import org.reactivestreams.Publisher @@ -12,9 +11,8 @@ import java.util.concurrent.CompletableFuture object Async : Scenario { override val name = "async" - override fun parser() = SchemaParser.newParser() - .file("scenarios/async/schema.graphqls") - .resolvers(AsyncQuery(), ShipmentResolver(), AsyncSubscription()) + override val files = listOf("compat/scenarios/async/schema.graphqls") + override val resolvers = listOf(AsyncQuery(), ShipmentResolver(), AsyncSubscription()) } data class Shipment(val id: String) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Bookstore.kt similarity index 77% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Bookstore.kt index 7314bcb4..cbeec0ea 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Bookstore.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Bookstore.kt @@ -1,10 +1,10 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.GraphQLContext import graphql.execution.CoercedVariables import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.GraphQLResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.language.StringValue import graphql.language.Value import graphql.schema.Coercing @@ -15,18 +15,20 @@ import java.util.Locale object Bookstore : Scenario { override val name = "bookstore" - override fun parser() = SchemaParser.newParser() - .file("scenarios/bookstore/schema.graphqls") - .resolvers(BookstoreQuery(), AuthorResolver()) + override val files = listOf("compat/scenarios/bookstore/schema.graphqls") + override val resolvers = listOf(BookstoreQuery(), AuthorResolver()) + + override fun configure(builder: SchemaParserBuilder) = builder .scalars(dateScalar) } object BookstoreMissingResolver : Scenario { override val name = "bookstore-missing-resolver" - override fun parser() = SchemaParser.newParser() - .files("scenarios/bookstore/schema.graphqls", "scenarios/bookstore-missing-resolver/extension.graphqls") - .resolvers(BookstoreQuery(), AuthorResolver()) + override val files = listOf("compat/scenarios/bookstore/schema.graphqls", "compat/scenarios/bookstore-missing-resolver/extension.graphqls") + override val resolvers = listOf(BookstoreQuery(), AuthorResolver()) + + override fun configure(builder: SchemaParserBuilder) = builder .scalars(dateScalar) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ContextAndEnvironment.kt similarity index 76% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ContextAndEnvironment.kt index fae8041e..934921d6 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextAndEnvironment.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ContextAndEnvironment.kt @@ -1,19 +1,20 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.ExecutionInput import graphql.GraphQLContext import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.GraphQLResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment object ContextAndEnvironment : Scenario { override val name = "context-and-environment" - override fun parser() = SchemaParser.newParser() - .file("scenarios/context-and-environment/schema.graphqls") - .resolvers(ContextAndEnvironmentQuery(), UserResolver()) + override val files = listOf("compat/scenarios/context-and-environment/schema.graphqls") + override val resolvers = listOf(ContextAndEnvironmentQuery(), UserResolver()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = @@ -23,9 +24,10 @@ object ContextAndEnvironment : Scenario { object ContextAndEnvironmentInvalid : Scenario { override val name = "context-and-environment-invalid" - override fun parser() = SchemaParser.newParser() - .schemaString("type Query { greeting(name: String!): String! }") - .resolvers(ContextAndEnvironmentInvalidQuery()) + override val files = listOf("compat/scenarios/context-and-environment-invalid/schema.graphqls") + override val resolvers = listOf(ContextAndEnvironmentInvalidQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ContextMisbound.kt similarity index 75% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ContextMisbound.kt index d51223b6..e61ce8d7 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ContextMisbound.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ContextMisbound.kt @@ -1,18 +1,19 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.ExecutionInput import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.GraphQLResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment object ContextMisbound : Scenario { override val name = "context-misbound" - override fun parser() = SchemaParser.newParser() - .file("scenarios/context-misbound/schema.graphqls") - .resolvers(ContextMisboundQuery(), MisboundUserResolver()) + override val files = listOf("compat/scenarios/context-misbound/schema.graphqls") + override val resolvers = listOf(ContextMisboundQuery(), MisboundUserResolver()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt similarity index 76% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt index 53ff6ca6..26ca21de 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectiveDrift.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt @@ -1,19 +1,19 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.Scalars import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.GraphQLScalarType import graphql.schema.GraphQLSchema -import probe.dumpDirectives object DirectiveDrift : Scenario { override val name = "directive-drift" - override fun parser() = SchemaParser.newParser() - .file("scenarios/directive-drift/schema.graphqls") - .resolvers(DirectiveDriftQuery()) + override val files = listOf("compat/scenarios/directive-drift/schema.graphqls") + override val resolvers = listOf(DirectiveDriftQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .dictionary("Dog", DriftDog::class.java) .scalars(stringScalar("Date"), stringScalar("Money")) .options(SchemaParserOptions.newOptions().allowUndeclaredDirectives(true).build()) @@ -24,9 +24,8 @@ object DirectiveDrift : Scenario { object DirectiveDriftUndeclared : Scenario { override val name = "directive-drift-undeclared" - override fun parser() = SchemaParser.newParser() - .file("scenarios/directive-drift-undeclared/schema.graphqls") - .resolvers(DirectiveDriftOneField()) + override val files = listOf("compat/scenarios/directive-drift-undeclared/schema.graphqls") + override val resolvers = listOf(DirectiveDriftOneField()) } private fun stringScalar(name: String) = GraphQLScalarType.newScalar().name(name).coercing(Scalars.GraphQLString.coercing).build() diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDump.kt similarity index 95% rename from .claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDump.kt index 119cff88..abe336c0 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/probe/DirectiveDump.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDump.kt @@ -1,4 +1,4 @@ -package probe +package graphql.kickstart.tools.compat.scenarios import graphql.language.AstPrinter import graphql.language.Node @@ -41,7 +41,7 @@ private fun StringBuilder.section(label: String, applied: List - appendLine(" applied @${directive.name} description=${directive.description} definition=${directive.definition?.sourceLocation?.let { "${it.line}:${it.column}" }}") + appendLine(" applied @${directive.name} description=${directive.description} definition=${directive.definition.sourceLocation?.let { "${it.line}:${it.column}" }}") directive.arguments.forEach { appendLine(" ${it.name}: ${GraphQLTypeUtil.simplePrint(it.type)} = ${describe(it.argumentValue)} description=${it.description}") } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Directives.kt similarity index 81% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Directives.kt index f4888d92..0d8aa9a8 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Directives.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Directives.kt @@ -1,7 +1,7 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.relay.Connection import graphql.relay.SimpleListConnection import graphql.schema.DataFetcherFactories @@ -13,9 +13,10 @@ import graphql.schema.idl.SchemaDirectiveWiringEnvironment object Directives : Scenario { override val name = "directives" - override fun parser() = SchemaParser.newParser() - .file("scenarios/directives/schema.graphqls") - .resolvers(DirectivesQuery()) + override val files = listOf("compat/scenarios/directives/schema.graphqls") + override val resolvers = listOf(DirectivesQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .directive("uppercase", UppercaseDirective()) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectivesInvalid.kt similarity index 53% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectivesInvalid.kt index d05c34c7..572c42f9 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/DirectivesInvalid.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectivesInvalid.kt @@ -1,14 +1,15 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder object DirectivesInvalid : Scenario { override val name = "directives-invalid" - override fun parser() = SchemaParser.newParser() - .file("scenarios/directives-invalid/schema.graphqls") - .resolvers(DirectivesInvalidQuery()) + override val files = listOf("compat/scenarios/directives-invalid/schema.graphqls") + override val resolvers = listOf(DirectivesInvalidQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .directive("uppercase", UppercaseDirective()) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/GenericInputResolver.kt similarity index 66% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/GenericInputResolver.kt index ad4dc778..06540a9f 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/GenericInputResolver.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/GenericInputResolver.kt @@ -1,14 +1,12 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser object GenericInputResolver : Scenario { override val name = "generic-input-resolver" - override fun parser() = SchemaParser.newParser() - .file("scenarios/generic-input-resolver/schema.graphqls") - .resolvers(GreetingQuery()) + override val files = listOf("compat/scenarios/generic-input-resolver/schema.graphqls") + override val resolvers = listOf(GreetingQuery()) } data class GreetingInput(val name: String) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Inputs.kt similarity index 81% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Inputs.kt index 3665d9b7..6e3af064 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Inputs.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Inputs.kt @@ -1,8 +1,8 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLMutationResolver import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment import java.util.Optional @@ -10,9 +10,10 @@ import java.util.Optional object Inputs : Scenario { override val name = "inputs" - override fun parser() = SchemaParser.newParser() - .file("scenarios/inputs/schema.graphqls") - .resolvers(InputsQuery(), InputsMutation()) + override val files = listOf("compat/scenarios/inputs/schema.graphqls") + override val resolvers = listOf(InputsQuery(), InputsMutation()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().inputArgumentOptionalDetectOmission(true).build()) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/JdkProxy.kt similarity index 59% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/JdkProxy.kt index e06bddf7..a1fa0da6 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/JdkProxy.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/JdkProxy.kt @@ -1,28 +1,30 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser import org.springframework.aop.framework.ProxyFactory import org.springframework.aop.support.AopUtils object JdkProxy : Scenario { override val name = "jdk-proxy" - override fun parser() = proxyParser(proxy(proxyTargetClass = false).also { check(AopUtils.isJdkDynamicProxy(it)) }) + override val files = listOf("compat/scenarios/jdk-proxy/schema.graphqls") + override val resolvers get() = listOf(proxy(proxyTargetClass = false).also { check(AopUtils.isJdkDynamicProxy(it)) }) } object JdkProxyCglib : Scenario { override val name = "jdk-proxy-cglib" override val operations = "jdk-proxy" - override fun parser() = proxyParser(proxy(proxyTargetClass = true).also { check(AopUtils.isCglibProxy(it)) }) + override val files = JdkProxy.files + override val resolvers get() = listOf(proxy(proxyTargetClass = true).also { check(AopUtils.isCglibProxy(it)) }) } object JdkProxyPlain : Scenario { override val name = "jdk-proxy-plain" override val operations = "jdk-proxy" - override fun parser() = proxyParser(ProxiedQuery()) + override val files = JdkProxy.files + override val resolvers = listOf(ProxiedQuery()) } open class ProxiedQuery : GraphQLQueryResolver { @@ -36,7 +38,3 @@ open class ProxiedQuery : GraphQLQueryResolver { private fun proxy(proxyTargetClass: Boolean) = ProxyFactory(ProxiedQuery()).apply { isProxyTargetClass = proxyTargetClass }.proxy as GraphQLQueryResolver - -private fun proxyParser(resolver: GraphQLQueryResolver) = SchemaParser.newParser() - .file("scenarios/jdk-proxy/schema.graphqls") - .resolvers(resolver) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedUnions.kt similarity index 58% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedUnions.kt index 1fd7001c..14805c87 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedUnions.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedUnions.kt @@ -1,14 +1,15 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder object NestedUnions : Scenario { override val name = "nested-unions" - override fun parser() = SchemaParser.newParser() - .file("scenarios/nested-unions/schema.graphqls") - .resolvers(NestedUnionsQuery()) + override val files = listOf("compat/scenarios/nested-unions/schema.graphqls") + override val resolvers = listOf(NestedUnionsQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .dictionary(NestedUnionsQuery.Book::class.java, NestedUnionsQuery.Movie::class.java) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedWrappers.kt similarity index 89% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedWrappers.kt index 440e2d65..eda6f9fd 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappers.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedWrappers.kt @@ -1,9 +1,9 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.GraphQL import graphql.execution.DefaultValueUnboxer import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.ExecutionInput import graphql.schema.DataFetchingEnvironment @@ -16,9 +16,10 @@ import java.util.concurrent.CompletableFuture.completedFuture object NestedWrappers : Scenario { override val name = "nested-wrappers" - override fun parser() = SchemaParser.newParser() - .file("scenarios/nested-wrappers/schema.graphqls") - .resolvers(NestedWrappersQuery()) + override val files = listOf("compat/scenarios/nested-wrappers/schema.graphqls") + override val resolvers = listOf(NestedWrappersQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().genericWrappers(tryWrapper).build()) override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = builder.dataLoaderRegistry( @@ -92,9 +93,8 @@ class NestedWrappersQuery : GraphQLQueryResolver { object NestedWrappersSuspend : Scenario { override val name = "nested-wrappers-suspend" - override fun parser() = SchemaParser.newParser() - .file("scenarios/nested-wrappers-suspend/schema.graphqls") - .resolvers(NestedWrappersSuspendQuery()) + override val files = listOf("compat/scenarios/nested-wrappers-suspend/schema.graphqls") + override val resolvers = listOf(NestedWrappersSuspendQuery()) } class NestedWrappersSuspendQuery : GraphQLQueryResolver { diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedWrappersExact.kt similarity index 91% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedWrappersExact.kt index d1c111ff..c326a28d 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/NestedWrappersExact.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/NestedWrappersExact.kt @@ -1,8 +1,8 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.GraphQLContext import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.Coercing import graphql.schema.CoercingSerializeException @@ -18,9 +18,10 @@ import java.util.concurrent.FutureTask object NestedWrappersExact : Scenario { override val name = "nested-wrappers-exact" - override fun parser() = SchemaParser.newParser() - .file("scenarios/nested-wrappers-exact/schema.graphqls") - .resolvers(NestedWrappersExactQuery()) + override val files = listOf("compat/scenarios/nested-wrappers-exact/schema.graphqls") + override val resolvers = listOf(NestedWrappersExactQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .scalars(dateTime) .options(SchemaParserOptions.newOptions().genericWrappers(tryWrapper, batchWrapper, boxWrapper, specialBoxWrapper, laterWrapper).build()) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/OptionalResults.kt similarity index 74% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/OptionalResults.kt index ddec6328..4892da21 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/OptionalResults.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/OptionalResults.kt @@ -1,41 +1,36 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.GraphQLError import graphql.execution.DataFetcherResult import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser import java.util.Optional object OptionalResults : Scenario { override val name = "optional-results" - override fun parser() = SchemaParser.newParser() - .file("scenarios/optional-results/schema.graphqls") - .resolvers(OptionalResultsQuery()) + override val files = listOf("compat/scenarios/optional-results/schema.graphqls") + override val resolvers = listOf(OptionalResultsQuery()) } object OptionalResultsMixed : Scenario { override val name = "optional-results-mixed" - override fun parser() = SchemaParser.newParser() - .file("scenarios/optional-results-mixed/schema.graphqls") - .resolvers(OptionalResultsMixedQuery()) + override val files = listOf("compat/scenarios/optional-results-mixed/schema.graphqls") + override val resolvers = listOf(OptionalResultsMixedQuery()) } object OptionalResultsList : Scenario { override val name = "optional-results-list" - override fun parser() = SchemaParser.newParser() - .file("scenarios/optional-results-list/schema.graphqls") - .resolvers(OptionalResultsListQuery()) + override val files = listOf("compat/scenarios/optional-results-list/schema.graphqls") + override val resolvers = listOf(OptionalResultsListQuery()) } object OptionalResultsNested : Scenario { override val name = "optional-results-nested" - override fun parser() = SchemaParser.newParser() - .file("scenarios/optional-results-nested/schema.graphqls") - .resolvers(OptionalResultsNestedQuery()) + override val files = listOf("compat/scenarios/optional-results-nested/schema.graphqls") + override val resolvers = listOf(OptionalResultsNestedQuery()) } class OptionalResultsPayload(val data: String) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Options.kt similarity index 68% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Options.kt index 108ccce5..bedc0773 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Options.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Options.kt @@ -1,17 +1,18 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.resolver.MissingResolverDataFetcherProvider -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetcher object Options : Scenario { override val name = "options" - override fun parser() = SchemaParser.newParser() - .file("scenarios/options/schema.graphqls") - .resolvers(OptionsQuery()) + override val files = listOf("compat/scenarios/options/schema.graphqls") + override val resolvers = listOf(OptionsQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .options( SchemaParserOptions.newOptions() .missingResolverDataFetcherProvider(MissingResolverDataFetcherProvider { field, _ -> diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Polymorphism.kt similarity index 73% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Polymorphism.kt index bd4b6778..e1cb43b4 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Polymorphism.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Polymorphism.kt @@ -1,14 +1,15 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder object Polymorphism : Scenario { override val name = "polymorphism" - override fun parser() = SchemaParser.newParser() - .file("scenarios/polymorphism/schema.graphqls") - .resolvers(PolymorphismQuery()) + override val files = listOf("compat/scenarios/polymorphism/schema.graphqls") + override val resolvers = listOf(PolymorphismQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .dictionary(Novel::class.java) .dictionary("Writer", WriterEntity::class.java) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ReadOnlySchema.kt similarity index 76% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ReadOnlySchema.kt index 9a6b9763..fccbb6f0 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ReadOnlySchema.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ReadOnlySchema.kt @@ -1,15 +1,17 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLMutationResolver import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder object ReadOnlySchema : Scenario { override val name = "read-only-schema" - override fun parser() = SchemaParser.newParser() - .file("scenarios/read-only-schema/schema.graphqls") - .resolvers(ReadOnlyQuery(), ReadOnlyMutation()) + override val files = listOf("compat/scenarios/read-only-schema/schema.graphqls") + override val resolvers = listOf(ReadOnlyQuery(), ReadOnlyMutation()) + + override fun configure(builder: SchemaParserBuilder) = builder .dictionary("Dog", ShelterDog::class.java) .dictionary("Cat", ShelterCat::class.java) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/RecursiveInputs.kt similarity index 69% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/RecursiveInputs.kt index 0c68fe7d..5a7c220e 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/RecursiveInputs.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/RecursiveInputs.kt @@ -1,14 +1,15 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder object RecursiveInputs : Scenario { override val name = "recursive-inputs" - override fun parser() = SchemaParser.newParser() - .file("scenarios/recursive-inputs/schema.graphqls") - .resolvers(RecursiveInputsQuery()) + override val files = listOf("compat/scenarios/recursive-inputs/schema.graphqls") + override val resolvers = listOf(RecursiveInputsQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .dictionary(RangeInput::class, LimitUnit::class) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ScalarArgs.kt similarity index 92% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ScalarArgs.kt index c6fe7a7d..54e8b569 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarArgs.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ScalarArgs.kt @@ -1,4 +1,4 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import com.fasterxml.jackson.annotation.JsonIdentityInfo import com.fasterxml.jackson.annotation.JsonTypeInfo @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.ObjectIdGenerators import graphql.GraphQLContext import graphql.execution.CoercedVariables import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.language.StringValue import graphql.language.Value import graphql.schema.Coercing @@ -17,10 +17,11 @@ import java.util.Optional object ScalarArgs : Scenario { override val name = "scalar-args" - override fun parser() = SchemaParser.newParser() - .file("scenarios/scalar-args/schema.graphqls") + override val files = listOf("compat/scenarios/scalar-args/schema.graphqls") + override val resolvers = listOf(ScalarArgsQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .scalars(tagScalar, tokenScalar, typedTokenScalar, wrappedTokenScalar, idTokenScalar) - .resolvers(ScalarArgsQuery()) } class Tag private constructor(val value: String) { diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ScalarDirectives.kt similarity index 82% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ScalarDirectives.kt index abd40c93..a6a30f38 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/ScalarDirectives.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/ScalarDirectives.kt @@ -1,8 +1,8 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.Scalars import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.schema.GraphQLScalarType import graphql.schema.idl.SchemaDirectiveWiring import graphql.schema.idl.SchemaDirectiveWiringEnvironment @@ -10,9 +10,10 @@ import graphql.schema.idl.SchemaDirectiveWiringEnvironment object ScalarDirectives : Scenario { override val name = "scalar-directives" - override fun parser() = SchemaParser.newParser() - .file("scenarios/scalar-directives/schema.graphqls") - .resolvers(ScalarDirectivesQuery()) + override val files = listOf("compat/scenarios/scalar-directives/schema.graphqls") + override val resolvers = listOf(ScalarDirectivesQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .scalars( string("Date"), GraphQLScalarType.newScalar(string("DateTime")).description("An RFC-3339 date-time") diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Scenario.kt similarity index 61% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Scenario.kt index 89b59d55..fda85626 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Scenario.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Scenario.kt @@ -1,7 +1,8 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.ExecutionInput import graphql.GraphQL +import graphql.kickstart.tools.GraphQLResolver import graphql.kickstart.tools.SchemaParser import graphql.kickstart.tools.SchemaParserBuilder import graphql.schema.GraphQLSchema @@ -11,7 +12,11 @@ sealed interface Scenario { val operations: String get() = name - fun parser(): SchemaParserBuilder + val files: List + + val resolvers: List> + + fun configure(builder: SchemaParserBuilder): SchemaParserBuilder = builder fun schema(parser: SchemaParser): GraphQLSchema = parser.makeExecutableSchema() @@ -22,4 +27,7 @@ sealed interface Scenario { fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = builder } +fun Scenario.parser(resolvers: List> = this.resolvers): SchemaParserBuilder = + configure(SchemaParser.newParser().files(*files.toTypedArray()).resolvers(resolvers)) + val SCENARIOS: List = Scenario::class.sealedSubclasses.mapNotNull { it.objectInstance }.sortedBy { it.name } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Sourceless.kt similarity index 74% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Sourceless.kt index f14c4ec2..a0f19132 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/Sourceless.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/Sourceless.kt @@ -1,20 +1,21 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.ExecutionInput import graphql.GraphQLContext import graphql.execution.DataFetcherResult import graphql.kickstart.tools.GraphQLQueryResolver import graphql.kickstart.tools.GraphQLResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.kickstart.tools.SchemaParserOptions import graphql.schema.DataFetchingEnvironment object Sourceless : Scenario { override val name = "sourceless" - override fun parser() = SchemaParser.newParser() - .file("scenarios/sourceless/schema.graphqls") - .resolvers(SourcelessQuery(), SourcelessFolderResolver(), SourcelessImageResolver()) + override val files = listOf("compat/scenarios/sourceless/schema.graphqls") + override val resolvers = listOf(SourcelessQuery(), SourcelessFolderResolver(), SourcelessImageResolver()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().contextClass(AppContext::class).build()) override fun input(builder: ExecutionInput.Builder): ExecutionInput.Builder = @@ -24,26 +25,25 @@ object Sourceless : Scenario { object SourcelessShadowed : Scenario { override val name = "sourceless-shadowed" - override fun parser() = SchemaParser.newParser() - .file("scenarios/sourceless-shadowed/schema.graphqls") - .resolvers(SourcelessQuery(), SourcelessFolderResolver(), ShadowedImageResolver()) + override val files = listOf("compat/scenarios/sourceless-shadowed/schema.graphqls") + override val resolvers = listOf(SourcelessQuery(), SourcelessFolderResolver(), ShadowedImageResolver()) } object SourcelessUnimplemented : Scenario { override val name = "sourceless-unimplemented" - override fun parser() = SchemaParser.newParser() - .file("scenarios/sourceless-unimplemented/schema.graphqls") - .resolvers(SourcelessQuery(), SourcelessFolderResolver(), HelperImageResolver()) + override val files = listOf("compat/scenarios/sourceless-unimplemented/schema.graphqls") + override val resolvers = listOf(SourcelessQuery(), SourcelessFolderResolver(), HelperImageResolver()) + + override fun configure(builder: SchemaParserBuilder) = builder .options(SchemaParserOptions.newOptions().allowUnimplementedResolvers(true).build()) } object SourcelessMisbound : Scenario { override val name = "sourceless-misbound" - override fun parser() = SchemaParser.newParser() - .file("scenarios/sourceless-misbound/schema.graphqls") - .resolvers(SourcelessQuery(), SourcelessFolderResolver(), MisboundImageResolver()) + override val files = listOf("compat/scenarios/sourceless-misbound/schema.graphqls") + override val resolvers = listOf(SourcelessQuery(), SourcelessFolderResolver(), MisboundImageResolver()) } class SourcelessFolder(val supportedFileTypes: List) diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensions.kt similarity index 78% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensions.kt index a7f10476..06a7b74c 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensions.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensions.kt @@ -1,14 +1,15 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder object TypeExtensions : Scenario { override val name = "type-extensions" - override fun parser() = SchemaParser.newParser() - .file("scenarios/type-extensions/schema.graphqls") - .resolvers(TypeExtensionsQuery()) + override val files = listOf("compat/scenarios/type-extensions/schema.graphqls") + override val resolvers = listOf(TypeExtensionsQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .dictionary(Article::class.java, Video::class.java) } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsInputOrder.kt similarity index 74% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsInputOrder.kt index 05dcfda3..1892dfdb 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsInputOrder.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsInputOrder.kt @@ -1,16 +1,14 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser import graphql.schema.GraphQLInputObjectType import graphql.schema.GraphQLSchema object TypeExtensionsInputOrder : Scenario { override val name = "type-extensions-input-order" - override fun parser() = SchemaParser.newParser() - .file("scenarios/type-extensions-input-order/schema.graphqls") - .resolvers(TypeExtensionsInputOrderQuery()) + override val files = listOf("compat/scenarios/type-extensions-input-order/schema.graphqls") + override val resolvers = listOf(TypeExtensionsInputOrderQuery()) override fun inspect(schema: GraphQLSchema) = "Filter fields: ${(schema.getType("Filter") as GraphQLInputObjectType).fieldDefinitions.map { it.name }}" } diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsRepeatedFields.kt similarity index 88% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsRepeatedFields.kt index 6144b6e9..a33df7f4 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsRepeatedFields.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsRepeatedFields.kt @@ -1,7 +1,6 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser import graphql.schema.GraphQLInputObjectType import graphql.schema.GraphQLObjectType import graphql.schema.GraphQLSchema @@ -9,9 +8,8 @@ import graphql.schema.GraphQLSchema object TypeExtensionsRepeatedFields : Scenario { override val name = "type-extensions-repeated-fields" - override fun parser() = SchemaParser.newParser() - .file("scenarios/type-extensions-repeated-fields/schema.graphqls") - .resolvers(TypeExtensionsRepeatedFieldsQuery()) + override val files = listOf("compat/scenarios/type-extensions-repeated-fields/schema.graphqls") + override val resolvers = listOf(TypeExtensionsRepeatedFieldsQuery()) override fun inspect(schema: GraphQLSchema): String { val objects = listOf("TypeAndExtension", "TwoExtensions", "OneDefinition").map { diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsSealed.kt similarity index 72% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsSealed.kt index e5544f32..6ebc9b52 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/TypeExtensionsSealed.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/TypeExtensionsSealed.kt @@ -1,14 +1,12 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser object TypeExtensionsSealed : Scenario { override val name = "type-extensions-sealed" - override fun parser() = SchemaParser.newParser() - .file("scenarios/type-extensions-sealed/schema.graphqls") - .resolvers(TypeExtensionsSealedQuery()) + override val files = listOf("compat/scenarios/type-extensions-sealed/schema.graphqls") + override val resolvers = listOf(TypeExtensionsSealedQuery()) } sealed class Pet { diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/UnmappedInputs.kt similarity index 76% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/UnmappedInputs.kt index 10dba5eb..e58236f9 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/UnmappedInputs.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/UnmappedInputs.kt @@ -1,16 +1,14 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import com.fasterxml.jackson.annotation.JsonIgnoreProperties import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser import java.util.Optional object UnmappedInputs : Scenario { override val name = "unmapped-inputs" - override fun parser() = SchemaParser.newParser() - .file("scenarios/unmapped-inputs/schema.graphqls") - .resolvers(UnmappedInputsQuery()) + override val files = listOf("compat/scenarios/unmapped-inputs/schema.graphqls") + override val resolvers = listOf(UnmappedInputsQuery()) } class IgnoredInput { diff --git a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/WiringShapes.kt similarity index 89% rename from .claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt rename to src/test/kotlin/graphql/kickstart/tools/compat/scenarios/WiringShapes.kt index 840c74a7..849b15d6 100644 --- a/.claude/skills/verify-tools/probe/src/main/kotlin/scenarios/WiringShapes.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/WiringShapes.kt @@ -1,7 +1,7 @@ -package scenarios +package graphql.kickstart.tools.compat.scenarios import graphql.kickstart.tools.GraphQLQueryResolver -import graphql.kickstart.tools.SchemaParser +import graphql.kickstart.tools.SchemaParserBuilder import graphql.schema.* import graphql.schema.idl.SchemaDirectiveWiring import graphql.schema.idl.SchemaDirectiveWiringEnvironment @@ -9,9 +9,10 @@ import graphql.schema.idl.SchemaDirectiveWiringEnvironment object WiringShapes : Scenario { override val name = "wiring-shapes" - override fun parser() = SchemaParser.newParser() - .file("scenarios/wiring-shapes/schema.graphqls") - .resolvers(WiringShapesQuery()) + override val files = listOf("compat/scenarios/wiring-shapes/schema.graphqls") + override val resolvers = listOf(WiringShapesQuery()) + + override fun configure(builder: SchemaParserBuilder) = builder .directive("inspect", InspectWiring()) .directive("required", RequiredWiring()) .directive("described", DescribedWiring()) diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/01-query.graphql b/src/test/resources/compat/scenarios/async/01-query.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/async/01-query.graphql rename to src/test/resources/compat/scenarios/async/01-query.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/02-subscription.graphql b/src/test/resources/compat/scenarios/async/02-subscription.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/async/02-subscription.graphql rename to src/test/resources/compat/scenarios/async/02-subscription.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/async/schema.graphqls b/src/test/resources/compat/scenarios/async/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/async/schema.graphqls rename to src/test/resources/compat/scenarios/async/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore-missing-resolver/extension.graphqls b/src/test/resources/compat/scenarios/bookstore-missing-resolver/extension.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore-missing-resolver/extension.graphqls rename to src/test/resources/compat/scenarios/bookstore-missing-resolver/extension.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/01-books.graphql b/src/test/resources/compat/scenarios/bookstore/01-books.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/01-books.graphql rename to src/test/resources/compat/scenarios/bookstore/01-books.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.graphql b/src/test/resources/compat/scenarios/bookstore/02-book-by-id.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.graphql rename to src/test/resources/compat/scenarios/bookstore/02-book-by-id.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.variables.json b/src/test/resources/compat/scenarios/bookstore/02-book-by-id.variables.json similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/02-book-by-id.variables.json rename to src/test/resources/compat/scenarios/bookstore/02-book-by-id.variables.json diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/schema.graphqls b/src/test/resources/compat/scenarios/bookstore/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/bookstore/schema.graphqls rename to src/test/resources/compat/scenarios/bookstore/schema.graphqls diff --git a/src/test/resources/compat/scenarios/context-and-environment-invalid/schema.graphqls b/src/test/resources/compat/scenarios/context-and-environment-invalid/schema.graphqls new file mode 100644 index 00000000..89a7d1a7 --- /dev/null +++ b/src/test/resources/compat/scenarios/context-and-environment-invalid/schema.graphqls @@ -0,0 +1,3 @@ +type Query { + greeting(name: String!): String! +} diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/01-query.graphql b/src/test/resources/compat/scenarios/context-and-environment/01-query.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/01-query.graphql rename to src/test/resources/compat/scenarios/context-and-environment/01-query.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/schema.graphqls b/src/test/resources/compat/scenarios/context-and-environment/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-and-environment/schema.graphqls rename to src/test/resources/compat/scenarios/context-and-environment/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/01-without-argument.graphql b/src/test/resources/compat/scenarios/context-misbound/01-without-argument.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/01-without-argument.graphql rename to src/test/resources/compat/scenarios/context-misbound/01-without-argument.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/02-with-argument.graphql b/src/test/resources/compat/scenarios/context-misbound/02-with-argument.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/02-with-argument.graphql rename to src/test/resources/compat/scenarios/context-misbound/02-with-argument.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/03-context-and-correct.graphql b/src/test/resources/compat/scenarios/context-misbound/03-context-and-correct.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/03-context-and-correct.graphql rename to src/test/resources/compat/scenarios/context-misbound/03-context-and-correct.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/04-type-resolver.graphql b/src/test/resources/compat/scenarios/context-misbound/04-type-resolver.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/04-type-resolver.graphql rename to src/test/resources/compat/scenarios/context-misbound/04-type-resolver.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/schema.graphqls b/src/test/resources/compat/scenarios/context-misbound/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/context-misbound/schema.graphqls rename to src/test/resources/compat/scenarios/context-misbound/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift-undeclared/schema.graphqls b/src/test/resources/compat/scenarios/directive-drift-undeclared/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift-undeclared/schema.graphqls rename to src/test/resources/compat/scenarios/directive-drift-undeclared/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift/schema.graphqls b/src/test/resources/compat/scenarios/directive-drift/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directive-drift/schema.graphqls rename to src/test/resources/compat/scenarios/directive-drift/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/01-query.graphql b/src/test/resources/compat/scenarios/directives-invalid/01-query.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/01-query.graphql rename to src/test/resources/compat/scenarios/directives-invalid/01-query.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/schema.graphqls b/src/test/resources/compat/scenarios/directives-invalid/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives-invalid/schema.graphqls rename to src/test/resources/compat/scenarios/directives-invalid/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/01-uppercase.graphql b/src/test/resources/compat/scenarios/directives/01-uppercase.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/01-uppercase.graphql rename to src/test/resources/compat/scenarios/directives/01-uppercase.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/02-deprecated.graphql b/src/test/resources/compat/scenarios/directives/02-deprecated.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/02-deprecated.graphql rename to src/test/resources/compat/scenarios/directives/02-deprecated.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/03-connection.graphql b/src/test/resources/compat/scenarios/directives/03-connection.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/03-connection.graphql rename to src/test/resources/compat/scenarios/directives/03-connection.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/schema.graphqls b/src/test/resources/compat/scenarios/directives/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/directives/schema.graphqls rename to src/test/resources/compat/scenarios/directives/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/01-plain.graphql b/src/test/resources/compat/scenarios/generic-input-resolver/01-plain.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/01-plain.graphql rename to src/test/resources/compat/scenarios/generic-input-resolver/01-plain.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/02-generic.graphql b/src/test/resources/compat/scenarios/generic-input-resolver/02-generic.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/02-generic.graphql rename to src/test/resources/compat/scenarios/generic-input-resolver/02-generic.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/schema.graphqls b/src/test/resources/compat/scenarios/generic-input-resolver/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/generic-input-resolver/schema.graphqls rename to src/test/resources/compat/scenarios/generic-input-resolver/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/01-search.graphql b/src/test/resources/compat/scenarios/inputs/01-search.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/01-search.graphql rename to src/test/resources/compat/scenarios/inputs/01-search.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/02-nickname.graphql b/src/test/resources/compat/scenarios/inputs/02-nickname.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/02-nickname.graphql rename to src/test/resources/compat/scenarios/inputs/02-nickname.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.graphql b/src/test/resources/compat/scenarios/inputs/03-add-book.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.graphql rename to src/test/resources/compat/scenarios/inputs/03-add-book.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.variables.json b/src/test/resources/compat/scenarios/inputs/03-add-book.variables.json similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/03-add-book.variables.json rename to src/test/resources/compat/scenarios/inputs/03-add-book.variables.json diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/04-invalid-enum.graphql b/src/test/resources/compat/scenarios/inputs/04-invalid-enum.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/04-invalid-enum.graphql rename to src/test/resources/compat/scenarios/inputs/04-invalid-enum.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/schema.graphqls b/src/test/resources/compat/scenarios/inputs/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/inputs/schema.graphqls rename to src/test/resources/compat/scenarios/inputs/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/01-query.graphql b/src/test/resources/compat/scenarios/jdk-proxy/01-query.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/01-query.graphql rename to src/test/resources/compat/scenarios/jdk-proxy/01-query.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/schema.graphqls b/src/test/resources/compat/scenarios/jdk-proxy/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/jdk-proxy/schema.graphqls rename to src/test/resources/compat/scenarios/jdk-proxy/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/01-results.graphql b/src/test/resources/compat/scenarios/nested-unions/01-results.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/01-results.graphql rename to src/test/resources/compat/scenarios/nested-unions/01-results.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/schema.graphqls b/src/test/resources/compat/scenarios/nested-unions/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-unions/schema.graphqls rename to src/test/resources/compat/scenarios/nested-unions/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/01-dates.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/01-dates.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/01-dates.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/01-dates.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/02-tried-dates.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/02-tried-dates.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/02-tried-dates.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/02-tried-dates.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/03-plain-future-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/03-plain-future-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/03-plain-future-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/03-plain-future-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/04-batched-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/04-batched-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/04-batched-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/04-batched-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/05-boxed-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/05-boxed-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/05-boxed-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/05-boxed-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/06-later-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/06-later-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/06-later-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/06-later-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-exact/07-suspend-plain-future-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/schema.graphqls b/src/test/resources/compat/scenarios/nested-wrappers-exact/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-exact/schema.graphqls rename to src/test/resources/compat/scenarios/nested-wrappers-exact/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/01-nullable-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-suspend/01-nullable-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/01-nullable-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-suspend/01-nullable-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/02-non-null-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers-suspend/02-non-null-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/02-non-null-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-suspend/02-non-null-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql b/src/test/resources/compat/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql rename to src/test/resources/compat/scenarios/nested-wrappers-suspend/03-type-variable-strings.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/schema.graphqls b/src/test/resources/compat/scenarios/nested-wrappers-suspend/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers-suspend/schema.graphqls rename to src/test/resources/compat/scenarios/nested-wrappers-suspend/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/01-payload.graphql b/src/test/resources/compat/scenarios/nested-wrappers/01-payload.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/01-payload.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/01-payload.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/02-payloads.graphql b/src/test/resources/compat/scenarios/nested-wrappers/02-payloads.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/02-payloads.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/02-payloads.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/03-payload-strings.graphql b/src/test/resources/compat/scenarios/nested-wrappers/03-payload-strings.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/03-payload-strings.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/03-payload-strings.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/04-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers/04-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/04-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/04-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/05-item-names.graphql b/src/test/resources/compat/scenarios/nested-wrappers/05-item-names.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/05-item-names.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/05-item-names.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/06-future-of-future.graphql b/src/test/resources/compat/scenarios/nested-wrappers/06-future-of-future.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/06-future-of-future.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/06-future-of-future.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/07-future-of-tries.graphql b/src/test/resources/compat/scenarios/nested-wrappers/07-future-of-tries.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/07-future-of-tries.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/07-future-of-tries.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/08-tries-of-futures.graphql b/src/test/resources/compat/scenarios/nested-wrappers/08-tries-of-futures.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/08-tries-of-futures.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/08-tries-of-futures.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/09-loaded-items.graphql b/src/test/resources/compat/scenarios/nested-wrappers/09-loaded-items.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/09-loaded-items.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/09-loaded-items.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/10-failed-try-in-list.graphql b/src/test/resources/compat/scenarios/nested-wrappers/10-failed-try-in-list.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/10-failed-try-in-list.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/10-failed-try-in-list.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/11-failed-future-in-list.graphql b/src/test/resources/compat/scenarios/nested-wrappers/11-failed-future-in-list.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/11-failed-future-in-list.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/11-failed-future-in-list.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/12-controls.graphql b/src/test/resources/compat/scenarios/nested-wrappers/12-controls.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/12-controls.graphql rename to src/test/resources/compat/scenarios/nested-wrappers/12-controls.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/schema.graphqls b/src/test/resources/compat/scenarios/nested-wrappers/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/nested-wrappers/schema.graphqls rename to src/test/resources/compat/scenarios/nested-wrappers/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/01-optional-result-list.graphql b/src/test/resources/compat/scenarios/optional-results-list/01-optional-result-list.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/01-optional-result-list.graphql rename to src/test/resources/compat/scenarios/optional-results-list/01-optional-result-list.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/schema.graphqls b/src/test/resources/compat/scenarios/optional-results-list/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-list/schema.graphqls rename to src/test/resources/compat/scenarios/optional-results-list/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/01-optional-result.graphql b/src/test/resources/compat/scenarios/optional-results-mixed/01-optional-result.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/01-optional-result.graphql rename to src/test/resources/compat/scenarios/optional-results-mixed/01-optional-result.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/02-result-of-optional.graphql b/src/test/resources/compat/scenarios/optional-results-mixed/02-result-of-optional.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/02-result-of-optional.graphql rename to src/test/resources/compat/scenarios/optional-results-mixed/02-result-of-optional.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/schema.graphqls b/src/test/resources/compat/scenarios/optional-results-mixed/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-mixed/schema.graphqls rename to src/test/resources/compat/scenarios/optional-results-mixed/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/01-optional-result-of-result.graphql b/src/test/resources/compat/scenarios/optional-results-nested/01-optional-result-of-result.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/01-optional-result-of-result.graphql rename to src/test/resources/compat/scenarios/optional-results-nested/01-optional-result-of-result.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/schema.graphqls b/src/test/resources/compat/scenarios/optional-results-nested/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results-nested/schema.graphqls rename to src/test/resources/compat/scenarios/optional-results-nested/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/01-optional-result.graphql b/src/test/resources/compat/scenarios/optional-results/01-optional-result.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/01-optional-result.graphql rename to src/test/resources/compat/scenarios/optional-results/01-optional-result.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/02-optional-result-name.graphql b/src/test/resources/compat/scenarios/optional-results/02-optional-result-name.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/02-optional-result-name.graphql rename to src/test/resources/compat/scenarios/optional-results/02-optional-result-name.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/03-empty-optional-result.graphql b/src/test/resources/compat/scenarios/optional-results/03-empty-optional-result.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/03-empty-optional-result.graphql rename to src/test/resources/compat/scenarios/optional-results/03-empty-optional-result.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/schema.graphqls b/src/test/resources/compat/scenarios/optional-results/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/optional-results/schema.graphqls rename to src/test/resources/compat/scenarios/optional-results/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/01-fields.graphql b/src/test/resources/compat/scenarios/options/01-fields.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/01-fields.graphql rename to src/test/resources/compat/scenarios/options/01-fields.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/02-schema-introspection.graphql b/src/test/resources/compat/scenarios/options/02-schema-introspection.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/02-schema-introspection.graphql rename to src/test/resources/compat/scenarios/options/02-schema-introspection.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/03-type-introspection.graphql b/src/test/resources/compat/scenarios/options/03-type-introspection.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/03-type-introspection.graphql rename to src/test/resources/compat/scenarios/options/03-type-introspection.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/options/schema.graphqls b/src/test/resources/compat/scenarios/options/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/options/schema.graphqls rename to src/test/resources/compat/scenarios/options/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/01-node.graphql b/src/test/resources/compat/scenarios/polymorphism/01-node.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/01-node.graphql rename to src/test/resources/compat/scenarios/polymorphism/01-node.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/02-union.graphql b/src/test/resources/compat/scenarios/polymorphism/02-union.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/02-union.graphql rename to src/test/resources/compat/scenarios/polymorphism/02-union.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/schema.graphqls b/src/test/resources/compat/scenarios/polymorphism/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/polymorphism/schema.graphqls rename to src/test/resources/compat/scenarios/polymorphism/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/01-interface.graphql b/src/test/resources/compat/scenarios/read-only-schema/01-interface.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/01-interface.graphql rename to src/test/resources/compat/scenarios/read-only-schema/01-interface.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/02-union.graphql b/src/test/resources/compat/scenarios/read-only-schema/02-union.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/02-union.graphql rename to src/test/resources/compat/scenarios/read-only-schema/02-union.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/03-no-mutation.graphql b/src/test/resources/compat/scenarios/read-only-schema/03-no-mutation.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/03-no-mutation.graphql rename to src/test/resources/compat/scenarios/read-only-schema/03-no-mutation.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/schema.graphqls b/src/test/resources/compat/scenarios/read-only-schema/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/read-only-schema/schema.graphqls rename to src/test/resources/compat/scenarios/read-only-schema/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.graphql b/src/test/resources/compat/scenarios/recursive-inputs/01-describe.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.graphql rename to src/test/resources/compat/scenarios/recursive-inputs/01-describe.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.variables.json b/src/test/resources/compat/scenarios/recursive-inputs/01-describe.variables.json similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/01-describe.variables.json rename to src/test/resources/compat/scenarios/recursive-inputs/01-describe.variables.json diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/02-introspect.graphql b/src/test/resources/compat/scenarios/recursive-inputs/02-introspect.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/02-introspect.graphql rename to src/test/resources/compat/scenarios/recursive-inputs/02-introspect.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/schema.graphqls b/src/test/resources/compat/scenarios/recursive-inputs/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/recursive-inputs/schema.graphqls rename to src/test/resources/compat/scenarios/recursive-inputs/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/01-custom-scalar.graphql b/src/test/resources/compat/scenarios/scalar-args/01-custom-scalar.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/01-custom-scalar.graphql rename to src/test/resources/compat/scenarios/scalar-args/01-custom-scalar.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/02-id.graphql b/src/test/resources/compat/scenarios/scalar-args/02-id.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/02-id.graphql rename to src/test/resources/compat/scenarios/scalar-args/02-id.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/03-nested-sets.graphql b/src/test/resources/compat/scenarios/scalar-args/03-nested-sets.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/03-nested-sets.graphql rename to src/test/resources/compat/scenarios/scalar-args/03-nested-sets.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/04-nested-lists.graphql b/src/test/resources/compat/scenarios/scalar-args/04-nested-lists.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/04-nested-lists.graphql rename to src/test/resources/compat/scenarios/scalar-args/04-nested-lists.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/05-empty-kotlin-scalar.graphql b/src/test/resources/compat/scenarios/scalar-args/05-empty-kotlin-scalar.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/05-empty-kotlin-scalar.graphql rename to src/test/resources/compat/scenarios/scalar-args/05-empty-kotlin-scalar.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql b/src/test/resources/compat/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql rename to src/test/resources/compat/scenarios/scalar-args/06-marked-empty-kotlin-scalars.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql b/src/test/resources/compat/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql rename to src/test/resources/compat/scenarios/scalar-args/07-optional-marked-empty-kotlin-scalars.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/schema.graphqls b/src/test/resources/compat/scenarios/scalar-args/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-args/schema.graphqls rename to src/test/resources/compat/scenarios/scalar-args/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/01-introspect-scalars.graphql b/src/test/resources/compat/scenarios/scalar-directives/01-introspect-scalars.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/01-introspect-scalars.graphql rename to src/test/resources/compat/scenarios/scalar-directives/01-introspect-scalars.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/02-use-scalars.graphql b/src/test/resources/compat/scenarios/scalar-directives/02-use-scalars.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/02-use-scalars.graphql rename to src/test/resources/compat/scenarios/scalar-directives/02-use-scalars.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/schema.graphqls b/src/test/resources/compat/scenarios/scalar-directives/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/scalar-directives/schema.graphqls rename to src/test/resources/compat/scenarios/scalar-directives/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/01-thumbnail.graphql b/src/test/resources/compat/scenarios/sourceless-misbound/01-thumbnail.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/01-thumbnail.graphql rename to src/test/resources/compat/scenarios/sourceless-misbound/01-thumbnail.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/schema.graphqls b/src/test/resources/compat/scenarios/sourceless-misbound/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-misbound/schema.graphqls rename to src/test/resources/compat/scenarios/sourceless-misbound/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/01-shadowed.graphql b/src/test/resources/compat/scenarios/sourceless-shadowed/01-shadowed.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/01-shadowed.graphql rename to src/test/resources/compat/scenarios/sourceless-shadowed/01-shadowed.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/schema.graphqls b/src/test/resources/compat/scenarios/sourceless-shadowed/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-shadowed/schema.graphqls rename to src/test/resources/compat/scenarios/sourceless-shadowed/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/01-helper.graphql b/src/test/resources/compat/scenarios/sourceless-unimplemented/01-helper.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/01-helper.graphql rename to src/test/resources/compat/scenarios/sourceless-unimplemented/01-helper.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/schema.graphqls b/src/test/resources/compat/scenarios/sourceless-unimplemented/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless-unimplemented/schema.graphqls rename to src/test/resources/compat/scenarios/sourceless-unimplemented/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/01-local-context.graphql b/src/test/resources/compat/scenarios/sourceless/01-local-context.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/01-local-context.graphql rename to src/test/resources/compat/scenarios/sourceless/01-local-context.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/02-contexts.graphql b/src/test/resources/compat/scenarios/sourceless/02-contexts.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/02-contexts.graphql rename to src/test/resources/compat/scenarios/sourceless/02-contexts.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/schema.graphqls b/src/test/resources/compat/scenarios/sourceless/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/sourceless/schema.graphqls rename to src/test/resources/compat/scenarios/sourceless/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/01-count.graphql b/src/test/resources/compat/scenarios/type-extensions-input-order/01-count.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/01-count.graphql rename to src/test/resources/compat/scenarios/type-extensions-input-order/01-count.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/schema.graphqls b/src/test/resources/compat/scenarios/type-extensions-input-order/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-input-order/schema.graphqls rename to src/test/resources/compat/scenarios/type-extensions-input-order/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql b/src/test/resources/compat/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql rename to src/test/resources/compat/scenarios/type-extensions-repeated-fields/01-kept-declarations.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/02-introspection.graphql b/src/test/resources/compat/scenarios/type-extensions-repeated-fields/02-introspection.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/02-introspection.graphql rename to src/test/resources/compat/scenarios/type-extensions-repeated-fields/02-introspection.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/schema.graphqls b/src/test/resources/compat/scenarios/type-extensions-repeated-fields/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-repeated-fields/schema.graphqls rename to src/test/resources/compat/scenarios/type-extensions-repeated-fields/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/01-pets-and-animals.graphql b/src/test/resources/compat/scenarios/type-extensions-sealed/01-pets-and-animals.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/01-pets-and-animals.graphql rename to src/test/resources/compat/scenarios/type-extensions-sealed/01-pets-and-animals.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/schema.graphqls b/src/test/resources/compat/scenarios/type-extensions-sealed/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions-sealed/schema.graphqls rename to src/test/resources/compat/scenarios/type-extensions-sealed/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/01-node.graphql b/src/test/resources/compat/scenarios/type-extensions/01-node.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/01-node.graphql rename to src/test/resources/compat/scenarios/type-extensions/01-node.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/02-search-and-enums.graphql b/src/test/resources/compat/scenarios/type-extensions/02-search-and-enums.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/02-search-and-enums.graphql rename to src/test/resources/compat/scenarios/type-extensions/02-search-and-enums.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/03-introspection.graphql b/src/test/resources/compat/scenarios/type-extensions/03-introspection.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/03-introspection.graphql rename to src/test/resources/compat/scenarios/type-extensions/03-introspection.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls b/src/test/resources/compat/scenarios/type-extensions/schema.graphqls similarity index 86% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls rename to src/test/resources/compat/scenarios/type-extensions/schema.graphqls index b0488c03..4773779c 100644 --- a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/type-extensions/schema.graphqls +++ b/src/test/resources/compat/scenarios/type-extensions/schema.graphqls @@ -16,8 +16,6 @@ interface Node @tag(name: "base") { } extend interface Node @tag(name: "extension") { - "The extension id" - id: ID! name: String } @@ -28,7 +26,7 @@ type Article implements Node @owner(team: "content") @tag(name: "base") { title: String } -extend type Article @owner(team: "growth") @tag(name: "extension") +extend type Article @tag(name: "extension") type Video { id: ID! @@ -41,7 +39,7 @@ extend type Video implements Node union SearchResult @tag(name: "base") = Article -extend union SearchResult @tag(name: "extension") = Video | Article +extend union SearchResult @tag(name: "extension") = Video enum Color @tag(name: "base") { "The first red" @@ -50,7 +48,6 @@ enum Color @tag(name: "base") { } extend enum Color @tag(name: "extension") { - RED GREEN } diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/01-ignored.graphql b/src/test/resources/compat/scenarios/unmapped-inputs/01-ignored.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/01-ignored.graphql rename to src/test/resources/compat/scenarios/unmapped-inputs/01-ignored.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/02-typo.graphql b/src/test/resources/compat/scenarios/unmapped-inputs/02-typo.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/02-typo.graphql rename to src/test/resources/compat/scenarios/unmapped-inputs/02-typo.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/schema.graphqls b/src/test/resources/compat/scenarios/unmapped-inputs/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/unmapped-inputs/schema.graphqls rename to src/test/resources/compat/scenarios/unmapped-inputs/schema.graphqls diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/01-trees.graphql b/src/test/resources/compat/scenarios/wiring-shapes/01-trees.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/01-trees.graphql rename to src/test/resources/compat/scenarios/wiring-shapes/01-trees.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/02-person.graphql b/src/test/resources/compat/scenarios/wiring-shapes/02-person.graphql similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/02-person.graphql rename to src/test/resources/compat/scenarios/wiring-shapes/02-person.graphql diff --git a/.claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/schema.graphqls b/src/test/resources/compat/scenarios/wiring-shapes/schema.graphqls similarity index 100% rename from .claude/skills/verify-tools/probe/src/main/resources/scenarios/wiring-shapes/schema.graphqls rename to src/test/resources/compat/scenarios/wiring-shapes/schema.graphqls From a8665e1e3a818a4df89cff9a4f06a4b724c7f305 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:34:06 -0500 Subject: [PATCH 19/64] Fail the build when a schema that built on the last release throws CompatTest builds every scenario, the scenario with its resolvers behind JDK proxies, and invalid SDL variants of it from the grammar: extensions of another kind, undeclared and misplaced directives, wrong argument values, and repeats. It fails when a case that built on the release in src/test/resources/compat throws now, unless accepted.txt lists it. When the pom's major is above the release's, a case may break only if the release logged a WARN for it. -Dcompat.capture records the results for the pom's version. --- .../kickstart/tools/compat/CompatTest.kt | 133 ++ .../kickstart/tools/compat/Variants.kt | 117 ++ src/test/resources/compat/15.0.0/accepted.txt | 0 src/test/resources/compat/15.0.0/cases.tsv | 1431 +++++++++++++++++ 4 files changed, 1681 insertions(+) create mode 100644 src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt create mode 100644 src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt create mode 100644 src/test/resources/compat/15.0.0/accepted.txt create mode 100644 src/test/resources/compat/15.0.0/cases.tsv diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt new file mode 100644 index 00000000..8db74386 --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -0,0 +1,133 @@ +package graphql.kickstart.tools.compat + +import ch.qos.logback.classic.Level +import ch.qos.logback.classic.Logger +import ch.qos.logback.classic.spi.ILoggingEvent +import ch.qos.logback.core.read.ListAppender +import graphql.kickstart.tools.compat.scenarios.SCENARIOS +import graphql.kickstart.tools.compat.scenarios.Scenario +import org.junit.Assert.fail +import org.junit.Test +import org.slf4j.LoggerFactory +import java.io.File + +/** + * Builds every scenario and its invalid variants, and fails when a case that built on the last release throws now. + * `-Dcompat.capture` records this checkout's results as the capture for its pom version instead. + */ +class CompatTest { + @Test + fun `cases that built on the last release still build`() { + val outcomes = runAll() + val version = pomVersion() + if (System.getProperty("compat.capture") != null) { + val dir = File(CAPTURES, version.toString()).apply { mkdirs() } + write(File(dir, "cases.tsv"), outcomes) + File(dir, "accepted.txt").takeUnless { it.exists() }?.writeText("") + return + } + + val (release, dir) = CAPTURES.listFiles().orEmpty().mapNotNull { file -> parseVersion(file.name)?.let { it to file } } + .filter { it.first <= version }.maxByOrNull { it.first } + ?: return fail("No capture in $CAPTURES at or below $version. Capture the last release as AGENTS.md describes under Releases.") + val released = read(File(dir, "cases.tsv")) + val acceptedFile = File(dir, "accepted.txt") + val accepted = acceptedFile.readLines().filter { it.isNotBlank() }.map { Regex(it.substringBefore('\t')) } + val major = version.major > release.major + + fun repeatsSeedBreak(key: CaseKey) = + key != key.seed && released[key.seed]?.built == true && outcomes[key.seed]?.error == outcomes.getValue(key).error + fun warnedOnRelease(key: CaseKey) = + (released.getValue(key).warnings - if (key == key.seed) emptySet() else released[key.seed]?.warnings.orEmpty().toSet()).isNotEmpty() + + val broke = released.keys.filter { released.getValue(it).built && outcomes[it]?.built == false } + .filterNot(::repeatsSeedBreak) + .filterNot { key -> accepted.any { it.containsMatchIn(key.toString()) } } + .filterNot { major && warnedOnRelease(it) } + if (broke.isEmpty()) return + + val target = "${release.major + 1}.0.0" + val cases = broke.take(SHOWN).joinToString("\n") { " $it\n ${outcomes.getValue(it).error}" } + + if (broke.size > SHOWN) "\n and ${broke.size - SHOWN} more" else "" + val byOperator = broke.groupingBy { it.operator }.eachCount().toSortedMap() + fail( + if (major) { + """ + |${broke.size} cases built on $release with no WARN of their own and throw now $byOperator. + |A major may reject only input that the last minor warned about. Log a WARN that names the type and the item in a + |${release.major}.x release first. A deliberate break that the release notes list goes into $acceptedFile as a + |regex for the case, a tab, and the issue. + |$cases + """.trimMargin() + } else { + """ + |${broke.size} cases built on $release and throw now $byOperator. + |Invalid input that built on the last release keeps building until the next major (AGENTS.md, Compatibility). + |Instead of throwing, log a WARN that names the type and the item, open a GitHub issue with $target in its title, + |and leave `// TODO in $target (#N)`. A deliberate break that the release notes list goes into + |$acceptedFile as a regex for the case, a tab, and the issue. + |$cases + """.trimMargin() + } + ) + } +} + +class Outcome(val error: String?, val warnings: List) { + val built get() = error == null +} + +private val CAPTURES = File("src/test/resources/compat") +private const val SHOWN = 50 +private fun runAll(): Map { + // the tests run in the library's module, which neither reads logback's nor exports the scenarios to kotlin-reflect + val module = CompatTest::class.java.module + listOf("ch.qos.logback.classic", "ch.qos.logback.core").forEach { ModuleLayer.boot().findModule(it).ifPresent(module::addReads) } + ModuleLayer.boot().findModule("kotlin.reflect").ifPresent { module.addExports(Scenario::class.java.packageName, it) } + val logger = LoggerFactory.getLogger("graphql.kickstart.tools") as Logger + val appender = ListAppender().apply { start() } + logger.addAppender(appender) + logger.isAdditive = false + try { + return SCENARIOS.flatMap(::variants).associate { variant -> + appender.list.clear() + val error = try { + variant.build() + null + } catch (e: Throwable) { + "${e.javaClass.simpleName}: ${normalize(e.message.orEmpty().lineSequence().first())}" + } + val warnings = appender.list.filter { it.level.isGreaterOrEqual(Level.WARN) }.map { normalize(it.formattedMessage) }.sorted() + variant.key to Outcome(error, warnings) + } + } finally { + logger.isAdditive = true + logger.detachAppender(appender) + } +} + +private fun normalize(message: String) = message + .replace(Regex("\\s+"), " ") + .replace(Regex("jdk\\.proxy\\d+\\.\\\$Proxy\\d+"), "jdk.proxyN.\\\$ProxyN") + .replace(Regex("\\\$\\\$SpringCGLIB\\\$\\\$\\d+"), "\\\$\\\$SpringCGLIB\\\$\\\$N") + .replace(Regex("@[0-9a-f]{5,}"), "@HASH") + +private fun write(file: File, outcomes: Map) = file.writeText( + outcomes.entries.joinToString("") { (key, outcome) -> + (listOf(key.scenario, key.operator, key.snippet, outcome.error ?: "BUILT") + outcome.warnings).joinToString("\t") + "\n" + } +) + +private fun read(file: File): Map = file.readLines().filter { it.isNotEmpty() }.associate { line -> + val cells = line.split('\t') + CaseKey(cells[0], cells[1], cells[2]) to Outcome(cells[3].takeUnless { it == "BUILT" }, cells.drop(4)) +} + +private fun pomVersion(): KotlinVersion { + val pom = File("pom.xml").readText() + val version = Regex("graphql-java-tools\\s*([^<]+)").find(pom)!!.groupValues[1] + return parseVersion(version.substringBefore('-'))!! +} + +private fun parseVersion(text: String): KotlinVersion? = + Regex("(\\d+)\\.(\\d+)\\.(\\d+)").matchEntire(text)?.destructured?.let { (major, minor, patch) -> KotlinVersion(major.toInt(), minor.toInt(), patch.toInt()) } diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt new file mode 100644 index 00000000..8f9c795f --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt @@ -0,0 +1,117 @@ +package graphql.kickstart.tools.compat + +import graphql.kickstart.tools.GraphQLResolver +import graphql.kickstart.tools.compat.scenarios.Scenario +import graphql.kickstart.tools.compat.scenarios.parser +import graphql.language.AstPrinter +import graphql.language.DirectiveDefinition +import graphql.language.EnumTypeDefinition +import graphql.language.InputObjectTypeDefinition +import graphql.language.InterfaceTypeDefinition +import graphql.language.ListType +import graphql.language.NonNullType +import graphql.language.ObjectTypeDefinition +import graphql.language.ScalarTypeDefinition +import graphql.language.Type +import graphql.language.TypeDefinition +import graphql.language.TypeName +import graphql.language.UnionTypeDefinition +import graphql.parser.Parser +import org.springframework.aop.framework.ProxyFactory + +data class CaseKey(val scenario: String, val operator: String, val snippet: String) { + val seed get() = CaseKey(scenario, "seed", "") + + override fun toString() = listOf(scenario, operator, snippet).filter { it.isNotEmpty() }.joinToString(" | ") +} + +class Variant(val key: CaseKey, val build: () -> Unit) + +/** + * The scenario as it is, plus one invalid SDL snippet per grammar rule it can break, plus every resolver behind a JDK proxy. + * The rules come from the SDL grammar, not from known bugs, so a new rejection of any of them shows up. + */ +fun variants(scenario: Scenario): List { + fun variant(operator: String, snippet: String = "", resolvers: () -> List> = { scenario.resolvers }) = + Variant(CaseKey(scenario.name, operator, snippet)) { + val builder = scenario.parser(resolvers()) + if (snippet.isNotEmpty()) builder.schemaString(snippet) + scenario.schema(builder.build()) + } + + return listOf(variant("seed"), variant("proxy") { scenario.resolvers.map { ProxyFactory(it).proxy as GraphQLResolver<*> } }) + + snippets(scenario).map { (operator, snippet) -> variant(operator, snippet) } +} + +private val KINDS: Map, String> = mapOf( + ObjectTypeDefinition::class.java to "type", + InterfaceTypeDefinition::class.java to "interface", + InputObjectTypeDefinition::class.java to "input", + EnumTypeDefinition::class.java to "enum", + UnionTypeDefinition::class.java to "union", + ScalarTypeDefinition::class.java to "scalar" +) + +private val LOCATIONS = mapOf("type" to "OBJECT", "interface" to "INTERFACE", "input" to "INPUT_OBJECT", "enum" to "ENUM", "union" to "UNION", "scalar" to "SCALAR") + +private val SPECIFIED_BY = Parser().parseDocument("directive @specifiedBy(url: String!) on SCALAR").definitions.single() as DirectiveDefinition + +private fun snippets(scenario: Scenario): Set> { + val sdl = scenario.files.joinToString("\n") { Scenario::class.java.classLoader.getResource(it)!!.readText() } + val definitions = Parser().parseDocument(sdl).definitions + val types = definitions.filterIsInstance>().filter { it.javaClass in KINDS } + val directives = definitions.filterIsInstance() + SPECIFIED_BY + val objectNames = types.filterIsInstance().map { it.name } - setOf("Query", "Mutation", "Subscription") + val snippets = LinkedHashSet>() + + for (type in types) { + val kind = KINDS.getValue(type.javaClass) + for (other in KINDS.values - kind) { + when (other) { + "enum" -> "extend enum ${type.name} { COMPAT_Z }" + "union" -> objectNames.firstOrNull { it != type.name }?.let { "extend union ${type.name} = $it" } + "scalar" -> "extend scalar ${type.name} @specifiedBy(url: \"https://example.com\")" + else -> "extend $other ${type.name} { compatZ: String }" + }?.let { snippets += "kind" to it } + } + snippets += "undeclared" to "extend $kind ${type.name} @compatUndeclared" + firstMember(type)?.let { snippets += "repeat" to "extend $kind ${type.name} $it" } + for (directive in directives) { + if (LOCATIONS.getValue(kind) !in directive.directiveLocations.map { it.name }) { + snippets += "location" to "extend $kind ${type.name} @${directive.name}" + continue + } + for (argument in directive.inputValueDefinitions) { + for (literal in wrongLiterals(argument.type)) { + snippets += "argval" to "extend $kind ${type.name} @${directive.name}(${argument.name}: $literal)" + } + } + if (!directive.isRepeatable && directive.inputValueDefinitions.none { it.type is NonNullType && it.defaultValue == null }) { + snippets += "repeat-directive" to "extend $kind ${type.name} @${directive.name} @${directive.name}" + } + } + } + return snippets +} + +private fun firstMember(type: TypeDefinition<*>): String? = when (type) { + is EnumTypeDefinition -> type.enumValueDefinitions.firstOrNull()?.let { "{ ${it.name} }" } + is UnionTypeDefinition -> type.memberTypes.firstOrNull()?.let { "= ${(it as TypeName).name}" } + is ObjectTypeDefinition -> type.fieldDefinitions.firstOrNull()?.let { "{ ${AstPrinter.printAst(it).oneLine()} }" } + is InterfaceTypeDefinition -> type.fieldDefinitions.firstOrNull()?.let { "{ ${AstPrinter.printAst(it).oneLine()} }" } + is InputObjectTypeDefinition -> type.inputValueDefinitions.firstOrNull()?.let { "{ ${AstPrinter.printAst(it).oneLine()} }" } + else -> null +} + +private fun String.oneLine() = replace(Regex("\\s+"), " ").trim() + +private fun wrongLiterals(type: Type<*>): List { + val inner = if (type is NonNullType) type.type else type + val literals = when (if (inner is ListType) "list" else (inner as TypeName).name) { + "String", "ID" -> listOf("5", "NOPE") + "Int", "Float", "Boolean" -> listOf("\"x\"") + "list" -> listOf("{ a: 1 }") + else -> listOf("5", "\"x\"") + } + return if (type is NonNullType) literals + "null" else literals +} diff --git a/src/test/resources/compat/15.0.0/accepted.txt b/src/test/resources/compat/15.0.0/accepted.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/compat/15.0.0/cases.tsv b/src/test/resources/compat/15.0.0/cases.tsv new file mode 100644 index 00000000..30ed641e --- /dev/null +++ b/src/test/resources/compat/15.0.0/cases.tsv @@ -0,0 +1,1431 @@ +async seed BUILT +async proxy FieldResolverError: Field 'Query.future' resolves to graphql.kickstart.tools.compat.scenarios.AsyncQuery.future, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AsyncQuery, so every query of the field will fail. +async kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +async kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +async kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +async kind extend union Query = Shipment BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +async kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +async undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +async repeat extend type Query { future: String! } SchemaError: Type 'Query' declares field 'future' more than once at line 1, column 21. +async location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +async kind extend interface Shipment { compatZ: String } BUILT Type 'Shipment' is defined as an object type, but extended as an interface. The extension is ignored. +async kind extend input Shipment { compatZ: String } BUILT Type 'Shipment' is defined as an object type, but extended as an input object type. The extension is ignored. +async kind extend enum Shipment { COMPAT_Z } BUILT Type 'Shipment' is defined as an object type, but extended as an enum. The extension is ignored. +async kind extend scalar Shipment @specifiedBy(url: "https://example.com") BUILT Type 'Shipment' is defined as an object type, but extended as a scalar. The extension is ignored. +async undeclared extend type Shipment @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +async repeat extend type Shipment { id: ID! } SchemaError: Type 'Shipment' declares field 'id' more than once at line 1, column 24. +async location extend type Shipment @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. +async kind extend interface Subscription { compatZ: String } BUILT Type 'Subscription' is defined as an object type, but extended as an interface. The extension is ignored. +async kind extend input Subscription { compatZ: String } BUILT Type 'Subscription' is defined as an object type, but extended as an input object type. The extension is ignored. +async kind extend enum Subscription { COMPAT_Z } BUILT Type 'Subscription' is defined as an object type, but extended as an enum. The extension is ignored. +async kind extend union Subscription = Shipment BUILT Type 'Subscription' is defined as an object type, but extended as a union. The extension is ignored. +async kind extend scalar Subscription @specifiedBy(url: "https://example.com") BUILT Type 'Subscription' is defined as an object type, but extended as a scalar. The extension is ignored. +async undeclared extend type Subscription @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +async repeat extend type Subscription { ticks(count: Int!): Int! } SchemaError: Type 'Subscription' declares field 'ticks' more than once at line 1, column 28. +async location extend type Subscription @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 26 is applied to OBJECT, but it's declared on SCALAR. +bookstore seed BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore proxy FieldResolverError: Field 'Query.books' resolves to graphql.kickstart.tools.compat.scenarios.BookstoreQuery.books, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.BookstoreQuery, so every query of the field will fail. +bookstore kind extend type Date { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +bookstore kind extend interface Date { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +bookstore kind extend input Date { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +bookstore kind extend enum Date { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +bookstore kind extend union Date = Book BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. +bookstore undeclared extend scalar Date @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore argval extend scalar Date @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore argval extend scalar Date @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore argval extend scalar Date @specifiedBy(url: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore kind extend interface Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore kind extend input Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore kind extend enum Query { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore kind extend union Query = Book BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +bookstore kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore repeat extend type Query { books: [Book!]! } SchemaError: Type 'Query' declares field 'books' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore kind extend interface Book { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore kind extend input Book { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore kind extend enum Book { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore kind extend union Book = Author BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as a union. The extension is ignored. +bookstore kind extend scalar Book @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore undeclared extend type Book @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore repeat extend type Book { id: ID! } SchemaError: Type 'Book' declares field 'id' more than once at line 1, column 20. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Book @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore kind extend interface Author { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore kind extend input Author { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore kind extend enum Author { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore kind extend union Author = Book BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as a union. The extension is ignored. +bookstore kind extend scalar Author @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore undeclared extend type Author @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore repeat extend type Author { id: ID! } SchemaError: Type 'Author' declares field 'id' more than once at line 1, column 22. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Author @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore kind extend interface Review { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore kind extend input Review { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore kind extend enum Review { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore kind extend union Review = Book BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as a union. The extension is ignored. +bookstore kind extend scalar Review @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore undeclared extend type Review @compatUndeclared BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore repeat extend type Review { stars: Int! } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Review @specifiedBy BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore-missing-resolver seed FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver proxy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver kind extend type Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +bookstore-missing-resolver kind extend interface Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Date { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Date = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. +bookstore-missing-resolver undeclared extend scalar Date @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: 5) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: NOPE) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: null) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver kind extend interface Query { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Query { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Query { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Query = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Query @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver repeat extend type Query { books: [Book!]! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver location extend type Query @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver kind extend interface Book { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Book { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Book { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Book = Author FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Book @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Book @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver repeat extend type Book { id: ID! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver location extend type Book @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver kind extend interface Author { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Author { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Author { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Author = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Author @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Author @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver repeat extend type Author { id: ID! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver location extend type Author @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver kind extend interface Review { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Review { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Review { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Review = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Review @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Review @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver repeat extend type Review { stars: Int! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver location extend type Review @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +context-and-environment seed BUILT +context-and-environment proxy FieldResolverError: Field 'Query.greeting' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.greeting, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. +context-and-environment kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +context-and-environment kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +context-and-environment kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +context-and-environment kind extend union Query = User BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +context-and-environment kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +context-and-environment undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +context-and-environment repeat extend type Query { greeting(name: String!): String! } SchemaError: Type 'Query' declares field 'greeting' more than once at line 1, column 21. +context-and-environment location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +context-and-environment kind extend interface User { compatZ: String } BUILT Type 'User' is defined as an object type, but extended as an interface. The extension is ignored. +context-and-environment kind extend input User { compatZ: String } BUILT Type 'User' is defined as an object type, but extended as an input object type. The extension is ignored. +context-and-environment kind extend enum User { COMPAT_Z } BUILT Type 'User' is defined as an object type, but extended as an enum. The extension is ignored. +context-and-environment kind extend scalar User @specifiedBy(url: "https://example.com") BUILT Type 'User' is defined as an object type, but extended as a scalar. The extension is ignored. +context-and-environment undeclared extend type User @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +context-and-environment repeat extend type User { name: String! } SchemaError: Type 'User' declares field 'name' more than once at line 1, column 20. +context-and-environment location extend type User @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +context-and-environment-invalid seed FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: +context-and-environment-invalid proxy FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: +context-and-environment-invalid kind extend interface Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +context-and-environment-invalid kind extend input Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +context-and-environment-invalid kind extend enum Query { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +context-and-environment-invalid kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +context-and-environment-invalid undeclared extend type Query @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: +context-and-environment-invalid repeat extend type Query { greeting(name: String!): String! } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: +context-and-environment-invalid location extend type Query @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: +context-misbound seed FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound proxy FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound kind extend interface Query { compatZ: String } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +context-misbound kind extend input Query { compatZ: String } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +context-misbound kind extend enum Query { COMPAT_Z } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +context-misbound kind extend union Query = User FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +context-misbound kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +context-misbound undeclared extend type Query @compatUndeclared FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound repeat extend type Query { users(first: Int): [User!]! } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound location extend type Query @specifiedBy FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound kind extend interface User { compatZ: String } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'User' is defined as an object type, but extended as an interface. The extension is ignored. +context-misbound kind extend input User { compatZ: String } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'User' is defined as an object type, but extended as an input object type. The extension is ignored. +context-misbound kind extend enum User { COMPAT_Z } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'User' is defined as an object type, but extended as an enum. The extension is ignored. +context-misbound kind extend scalar User @specifiedBy(url: "https://example.com") FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'User' is defined as an object type, but extended as a scalar. The extension is ignored. +context-misbound undeclared extend type User @compatUndeclared FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound repeat extend type User { name: String! } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +context-misbound location extend type User @specifiedBy FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. +directive-drift seed SchemaError: Found an unexpected directive argument tag#nam . +directive-drift proxy FieldResolverError: Field 'Query.plain' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.plain, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. +directive-drift kind extend type Kind { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Kind { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as an interface. The extension is ignored. +directive-drift kind extend input Kind { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as an input object type. The extension is ignored. +directive-drift kind extend union Kind = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Kind @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend enum Kind @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend enum Kind { PLAIN } SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Kind @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend enum Kind @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Kind @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Kind @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Kind @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Kind @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Kind @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend interface Query { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +directive-drift kind extend input Query { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Query { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +directive-drift kind extend union Query = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend type Query @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend type Query { plain: String @tag(name: "plain", level: 2) @once(reason: "supplied") @fieldOnly @argDoc(note: "x") } SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Query @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend type Query @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Query @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Query @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Query @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Query @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Query @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Animal { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. +directive-drift kind extend input Animal { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Animal { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. +directive-drift kind extend union Animal = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Animal @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend interface Animal @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend interface Animal { name: String @once @once } SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend interface Animal @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend interface Animal @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend interface Animal @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend interface Animal @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend interface Animal @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend interface Animal @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend interface Animal @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend interface Dog { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. +directive-drift kind extend input Dog { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Dog { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. +directive-drift kind extend scalar Dog @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend type Dog @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend type Dog { name: String } SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend type Dog @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend type Dog @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Dog @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Dog @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Dog @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Dog @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend type Dog @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Pet { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Pet { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. +directive-drift kind extend input Pet { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Pet { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an enum. The extension is ignored. +directive-drift kind extend scalar Pet @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend union Pet @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend union Pet = Dog SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend union Pet @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend union Pet @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend union Pet @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend union Pet @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend union Pet @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend union Pet @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend union Pet @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Color { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Color { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as an interface. The extension is ignored. +directive-drift kind extend input Color { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored. +directive-drift kind extend union Color = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Color @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend enum Color @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend enum Color { RED } SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend enum Color @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend enum Color @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Color @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Color @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Color @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Color @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend enum Color @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Meta { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Meta { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as an interface. The extension is ignored. +directive-drift kind extend enum Meta { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as an enum. The extension is ignored. +directive-drift kind extend union Meta = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Meta @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend input Meta @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat extend input Meta { owner: String @once(reason: "x") @once } SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend input Meta @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend input Meta @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend input Meta @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend input Meta @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend input Meta @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend input Meta @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend input Meta @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Date { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Date { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +directive-drift kind extend input Date { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Date { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +directive-drift kind extend union Date = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. +directive-drift undeclared extend scalar Date @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend scalar Date @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Date @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Date @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Date @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Date @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @specifiedBy(url: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @specifiedBy(url: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Date @specifiedBy(url: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Money { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Money { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. +directive-drift kind extend input Money { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Money { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. +directive-drift kind extend union Money = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as a union. The extension is ignored. +directive-drift undeclared extend scalar Money @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift repeat-directive extend scalar Money @once @once SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Money @link SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Money @argDoc SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Money @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . +directive-drift location extend scalar Money @needs SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @specifiedBy(url: 5) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @specifiedBy(url: NOPE) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift argval extend scalar Money @specifiedBy(url: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift-undeclared seed SchemaError: Found applied directive undeclared without corresponding directive definition. +directive-drift-undeclared proxy FieldResolverError: Field 'Query.a' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField.a, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField, so every query of the field will fail. +directive-drift-undeclared kind extend interface Query { compatZ: String } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +directive-drift-undeclared kind extend input Query { compatZ: String } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +directive-drift-undeclared kind extend enum Query { COMPAT_Z } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +directive-drift-undeclared kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +directive-drift-undeclared undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +directive-drift-undeclared repeat extend type Query { a: String @undeclared(s: "x") } SchemaError: Type 'Query' declares field 'a' more than once at line 1, column 21. +directive-drift-undeclared location extend type Query @specifiedBy SchemaError: Found applied directive undeclared without corresponding directive definition. +directives seed BUILT +directives proxy FieldResolverError: Field 'Query.motto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesQuery.motto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesQuery, so every query of the field will fail. +directives kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +directives kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +directives kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +directives kind extend union Query = Member BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +directives kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +directives undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +directives repeat extend type Query { motto: String! @uppercase } SchemaError: Type 'Query' declares field 'motto' more than once at line 1, column 21. +directives location extend type Query @uppercase SchemaError: Directive @uppercase at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directives location extend type Query @connection SchemaError: Directive @connection at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directives location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +directives kind extend interface Member { compatZ: String } BUILT Type 'Member' is defined as an object type, but extended as an interface. The extension is ignored. +directives kind extend input Member { compatZ: String } BUILT Type 'Member' is defined as an object type, but extended as an input object type. The extension is ignored. +directives kind extend enum Member { COMPAT_Z } BUILT Type 'Member' is defined as an object type, but extended as an enum. The extension is ignored. +directives kind extend scalar Member @specifiedBy(url: "https://example.com") BUILT Type 'Member' is defined as an object type, but extended as a scalar. The extension is ignored. +directives undeclared extend type Member @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +directives repeat extend type Member { id: ID! } SchemaError: Type 'Member' declares field 'id' more than once at line 1, column 22. +directives location extend type Member @uppercase SchemaError: Directive @uppercase at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directives location extend type Member @connection SchemaError: Directive @connection at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directives location extend type Member @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +directives-invalid seed SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid proxy FieldResolverError: Field 'Query.motto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery.motto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery, so every query of the field will fail. +directives-invalid kind extend interface Query { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +directives-invalid kind extend input Query { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +directives-invalid kind extend enum Query { COMPAT_Z } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +directives-invalid kind extend union Query = Member SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +directives-invalid kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +directives-invalid undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +directives-invalid repeat extend type Query { motto: String! @uppercase } SchemaError: Type 'Query' declares field 'motto' more than once at line 1, column 21. +directives-invalid repeat-directive extend type Query @uppercase @uppercase SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid location extend type Query @auth SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid location extend type Query @cached SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid location extend type Query @specifiedBy SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid kind extend interface Member { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as an interface. The extension is ignored. +directives-invalid kind extend input Member { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as an input object type. The extension is ignored. +directives-invalid kind extend enum Member { COMPAT_Z } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as an enum. The extension is ignored. +directives-invalid kind extend scalar Member @specifiedBy(url: "https://example.com") SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as a scalar. The extension is ignored. +directives-invalid undeclared extend type Member @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +directives-invalid repeat extend type Member { id: ID! } SchemaError: Type 'Member' declares field 'id' more than once at line 1, column 22. +directives-invalid repeat-directive extend type Member @uppercase @uppercase SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid location extend type Member @auth SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid location extend type Member @cached SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid location extend type Member @specifiedBy SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +generic-input-resolver seed BUILT +generic-input-resolver proxy FieldResolverError: Field 'Query.generic' resolves to graphql.kickstart.tools.compat.scenarios.InputResolver.generic, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputResolver, so every query of the field will fail. +generic-input-resolver kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +generic-input-resolver kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +generic-input-resolver kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +generic-input-resolver kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +generic-input-resolver undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +generic-input-resolver repeat extend type Query { generic(input: GreetingInput!): String! } SchemaError: Type 'Query' declares field 'generic' more than once at line 1, column 21. +generic-input-resolver location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +generic-input-resolver kind extend type GreetingInput { compatZ: String } BUILT Type 'GreetingInput' is defined as an input object type, but extended as an object type. The extension is ignored. +generic-input-resolver kind extend interface GreetingInput { compatZ: String } BUILT Type 'GreetingInput' is defined as an input object type, but extended as an interface. The extension is ignored. +generic-input-resolver kind extend enum GreetingInput { COMPAT_Z } BUILT Type 'GreetingInput' is defined as an input object type, but extended as an enum. The extension is ignored. +generic-input-resolver kind extend scalar GreetingInput @specifiedBy(url: "https://example.com") BUILT Type 'GreetingInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +generic-input-resolver undeclared extend input GreetingInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +generic-input-resolver repeat extend input GreetingInput { name: String! } SchemaError: Type 'GreetingInput' declares field 'name' more than once at line 1, column 30. +generic-input-resolver location extend input GreetingInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 28 is applied to INPUT_OBJECT, but it's declared on SCALAR. +inputs seed BUILT +inputs proxy FieldResolverError: Field 'Query.search' resolves to graphql.kickstart.tools.compat.scenarios.InputsQuery.search, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputsQuery, so every query of the field will fail. +inputs kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +inputs kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +inputs kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +inputs kind extend union Query = SavedBook BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +inputs kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +inputs undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +inputs repeat extend type Query { search(term: String!, limit: Int = 10, genres: [Genre!]): String! } SchemaError: Type 'Query' declares field 'search' more than once at line 1, column 21. +inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +inputs kind extend interface Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an interface. The extension is ignored. +inputs kind extend input Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an input object type. The extension is ignored. +inputs kind extend enum Mutation { COMPAT_Z } BUILT Type 'Mutation' is defined as an object type, but extended as an enum. The extension is ignored. +inputs kind extend union Mutation = SavedBook BUILT Type 'Mutation' is defined as an object type, but extended as a union. The extension is ignored. +inputs kind extend scalar Mutation @specifiedBy(url: "https://example.com") BUILT Type 'Mutation' is defined as an object type, but extended as a scalar. The extension is ignored. +inputs undeclared extend type Mutation @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +inputs repeat extend type Mutation { addBook(input: BookInput!): SavedBook! } SchemaError: Type 'Mutation' declares field 'addBook' more than once at line 1, column 24. +inputs location extend type Mutation @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. +inputs kind extend type Genre { compatZ: String } BUILT Type 'Genre' is defined as an enum, but extended as an object type. The extension is ignored. +inputs kind extend interface Genre { compatZ: String } BUILT Type 'Genre' is defined as an enum, but extended as an interface. The extension is ignored. +inputs kind extend input Genre { compatZ: String } BUILT Type 'Genre' is defined as an enum, but extended as an input object type. The extension is ignored. +inputs kind extend union Genre = SavedBook BUILT Type 'Genre' is defined as an enum, but extended as a union. The extension is ignored. +inputs kind extend scalar Genre @specifiedBy(url: "https://example.com") BUILT Type 'Genre' is defined as an enum, but extended as a scalar. The extension is ignored. +inputs undeclared extend enum Genre @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +inputs repeat extend enum Genre { FICTION } SchemaError: Type 'Genre' declares value 'FICTION' more than once at line 1, column 21. +inputs location extend enum Genre @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. +inputs kind extend type BookInput { compatZ: String } BUILT Type 'BookInput' is defined as an input object type, but extended as an object type. The extension is ignored. +inputs kind extend interface BookInput { compatZ: String } BUILT Type 'BookInput' is defined as an input object type, but extended as an interface. The extension is ignored. +inputs kind extend enum BookInput { COMPAT_Z } BUILT Type 'BookInput' is defined as an input object type, but extended as an enum. The extension is ignored. +inputs kind extend union BookInput = SavedBook BUILT Type 'BookInput' is defined as an input object type, but extended as a union. The extension is ignored. +inputs kind extend scalar BookInput @specifiedBy(url: "https://example.com") BUILT Type 'BookInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +inputs undeclared extend input BookInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +inputs repeat extend input BookInput { title: String! } SchemaError: Type 'BookInput' declares field 'title' more than once at line 1, column 26. +inputs location extend input BookInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. +inputs kind extend type DetailsInput { compatZ: String } BUILT Type 'DetailsInput' is defined as an input object type, but extended as an object type. The extension is ignored. +inputs kind extend interface DetailsInput { compatZ: String } BUILT Type 'DetailsInput' is defined as an input object type, but extended as an interface. The extension is ignored. +inputs kind extend enum DetailsInput { COMPAT_Z } BUILT Type 'DetailsInput' is defined as an input object type, but extended as an enum. The extension is ignored. +inputs kind extend union DetailsInput = SavedBook BUILT Type 'DetailsInput' is defined as an input object type, but extended as a union. The extension is ignored. +inputs kind extend scalar DetailsInput @specifiedBy(url: "https://example.com") BUILT Type 'DetailsInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +inputs undeclared extend input DetailsInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +inputs repeat extend input DetailsInput { pages: Int! } SchemaError: Type 'DetailsInput' declares field 'pages' more than once at line 1, column 29. +inputs location extend input DetailsInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to INPUT_OBJECT, but it's declared on SCALAR. +inputs kind extend interface SavedBook { compatZ: String } BUILT Type 'SavedBook' is defined as an object type, but extended as an interface. The extension is ignored. +inputs kind extend input SavedBook { compatZ: String } BUILT Type 'SavedBook' is defined as an object type, but extended as an input object type. The extension is ignored. +inputs kind extend enum SavedBook { COMPAT_Z } BUILT Type 'SavedBook' is defined as an object type, but extended as an enum. The extension is ignored. +inputs kind extend scalar SavedBook @specifiedBy(url: "https://example.com") BUILT Type 'SavedBook' is defined as an object type, but extended as a scalar. The extension is ignored. +inputs undeclared extend type SavedBook @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +inputs repeat extend type SavedBook { title: String! } SchemaError: Type 'SavedBook' declares field 'title' more than once at line 1, column 25. +inputs location extend type SavedBook @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to OBJECT, but it's declared on SCALAR. +jdk-proxy seed FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +jdk-proxy proxy FieldResolverError: No method or field found as defined in schema compat/scenarios/jdk-proxy/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +jdk-proxy kind extend interface Query { compatZ: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +jdk-proxy kind extend input Query { compatZ: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +jdk-proxy kind extend enum Query { COMPAT_Z } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +jdk-proxy kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +jdk-proxy undeclared extend type Query @compatUndeclared FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +jdk-proxy repeat extend type Query { test: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +jdk-proxy location extend type Query @specifiedBy FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +jdk-proxy-cglib seed AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib proxy AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib kind extend interface Query { compatZ: String } AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib kind extend input Query { compatZ: String } AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib kind extend enum Query { COMPAT_Z } AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib kind extend scalar Query @specifiedBy(url: "https://example.com") AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib undeclared extend type Query @compatUndeclared AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib repeat extend type Query { test: String } AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-cglib location extend type Query @specifiedBy AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class +jdk-proxy-plain seed BUILT +jdk-proxy-plain proxy FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +jdk-proxy-plain kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +jdk-proxy-plain kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +jdk-proxy-plain kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +jdk-proxy-plain kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +jdk-proxy-plain undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +jdk-proxy-plain repeat extend type Query { test: String } SchemaError: Type 'Query' declares field 'test' more than once at line 1, column 21. +jdk-proxy-plain location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-unions seed BUILT +nested-unions proxy FieldResolverError: Field 'Query.results' resolves to graphql.kickstart.tools.compat.scenarios.NestedUnionsQuery.results, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedUnionsQuery, so every query of the field will fail. +nested-unions kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +nested-unions kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-unions kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +nested-unions kind extend union Query = Book BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +nested-unions kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-unions undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-unions repeat extend type Query { results: [Result!]! } SchemaError: Type 'Query' declares field 'results' more than once at line 1, column 21. +nested-unions location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-unions kind extend type Result { compatZ: String } BUILT Type 'Result' is defined as a union, but extended as an object type. The extension is ignored. +nested-unions kind extend interface Result { compatZ: String } BUILT Type 'Result' is defined as a union, but extended as an interface. The extension is ignored. +nested-unions kind extend input Result { compatZ: String } BUILT Type 'Result' is defined as a union, but extended as an input object type. The extension is ignored. +nested-unions kind extend enum Result { COMPAT_Z } BUILT Type 'Result' is defined as a union, but extended as an enum. The extension is ignored. +nested-unions kind extend scalar Result @specifiedBy(url: "https://example.com") BUILT Type 'Result' is defined as a union, but extended as a scalar. The extension is ignored. +nested-unions undeclared extend union Result @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-unions repeat extend union Result = Book SchemaError: Type 'Result' declares member 'Book' more than once at line 1, column 23. +nested-unions location extend union Result @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to UNION, but it's declared on SCALAR. +nested-unions kind extend type Media { compatZ: String } BUILT Type 'Media' is defined as a union, but extended as an object type. The extension is ignored. +nested-unions kind extend interface Media { compatZ: String } BUILT Type 'Media' is defined as a union, but extended as an interface. The extension is ignored. +nested-unions kind extend input Media { compatZ: String } BUILT Type 'Media' is defined as a union, but extended as an input object type. The extension is ignored. +nested-unions kind extend enum Media { COMPAT_Z } BUILT Type 'Media' is defined as a union, but extended as an enum. The extension is ignored. +nested-unions kind extend scalar Media @specifiedBy(url: "https://example.com") BUILT Type 'Media' is defined as a union, but extended as a scalar. The extension is ignored. +nested-unions undeclared extend union Media @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-unions repeat extend union Media = Movie SchemaError: Type 'Media' declares member 'Movie' more than once at line 1, column 22. +nested-unions location extend union Media @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to UNION, but it's declared on SCALAR. +nested-unions kind extend interface Book { compatZ: String } BUILT Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. +nested-unions kind extend input Book { compatZ: String } BUILT Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-unions kind extend enum Book { COMPAT_Z } BUILT Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. +nested-unions kind extend union Book = Movie BUILT Type 'Book' is defined as an object type, but extended as a union. The extension is ignored. +nested-unions kind extend scalar Book @specifiedBy(url: "https://example.com") BUILT Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-unions undeclared extend type Book @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-unions repeat extend type Book { title: String! } SchemaError: Type 'Book' declares field 'title' more than once at line 1, column 20. +nested-unions location extend type Book @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-unions kind extend interface Movie { compatZ: String } BUILT Type 'Movie' is defined as an object type, but extended as an interface. The extension is ignored. +nested-unions kind extend input Movie { compatZ: String } BUILT Type 'Movie' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-unions kind extend enum Movie { COMPAT_Z } BUILT Type 'Movie' is defined as an object type, but extended as an enum. The extension is ignored. +nested-unions kind extend union Movie = Book BUILT Type 'Movie' is defined as an object type, but extended as a union. The extension is ignored. +nested-unions kind extend scalar Movie @specifiedBy(url: "https://example.com") BUILT Type 'Movie' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-unions undeclared extend type Movie @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-unions repeat extend type Movie { title: String! } SchemaError: Type 'Movie' declares field 'title' more than once at line 1, column 21. +nested-unions location extend type Movie @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers seed BUILT +nested-wrappers proxy FieldResolverError: Field 'Query.payload' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payload, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. +nested-wrappers kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers kind extend union Query = Payload BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers repeat extend type Query { payload: Payload! } SchemaError: Type 'Query' declares field 'payload' more than once at line 1, column 21. +nested-wrappers location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers kind extend union Payload = Item BUILT Type 'Payload' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers repeat extend type Payload { data: String! } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. +nested-wrappers location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers kind extend union Item = Payload BUILT Type 'Item' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. +nested-wrappers location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-exact seed BUILT +nested-wrappers-exact proxy FieldResolverError: Field 'Query.dates' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.dates, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. +nested-wrappers-exact kind extend type DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an object type. The extension is ignored. +nested-wrappers-exact kind extend interface DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an interface. The extension is ignored. +nested-wrappers-exact kind extend input DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an input object type. The extension is ignored. +nested-wrappers-exact kind extend enum DateTime { COMPAT_Z } BUILT Type 'DateTime' is defined as a scalar, but extended as an enum. The extension is ignored. +nested-wrappers-exact kind extend union DateTime = Item BUILT Type 'DateTime' is defined as a scalar, but extended as a union. The extension is ignored. +nested-wrappers-exact undeclared extend scalar DateTime @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: null) InvalidSchemaException: invalid schema: +nested-wrappers-exact kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-exact kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-exact kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-exact kind extend union Query = Item BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers-exact kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-exact undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-exact repeat extend type Query { dates: [DateTime] } SchemaError: Type 'Query' declares field 'dates' more than once at line 1, column 21. +nested-wrappers-exact location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-exact kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-exact kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-exact kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-exact kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-exact undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-exact repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. +nested-wrappers-exact location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-suspend seed BUILT +nested-wrappers-suspend proxy FieldResolverError: Field 'Query.nullableItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery.nullableItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery, so every query of the field will fail. +nested-wrappers-suspend kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-suspend kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-suspend kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-suspend kind extend union Query = Item BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers-suspend kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-suspend undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-suspend repeat extend type Query { nullableItems: [Item] } SchemaError: Type 'Query' declares field 'nullableItems' more than once at line 1, column 21. +nested-wrappers-suspend location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-suspend kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-suspend kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-suspend kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-suspend kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-suspend undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-suspend repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. +nested-wrappers-suspend location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-unboxer seed BUILT +nested-wrappers-unboxer proxy FieldResolverError: Field 'Query.payload' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payload, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. +nested-wrappers-unboxer kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-unboxer kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-unboxer kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-unboxer kind extend union Query = Payload BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers-unboxer kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-unboxer undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-unboxer repeat extend type Query { payload: Payload! } SchemaError: Type 'Query' declares field 'payload' more than once at line 1, column 21. +nested-wrappers-unboxer location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-unboxer kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-unboxer kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-unboxer kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-unboxer kind extend union Payload = Item BUILT Type 'Payload' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers-unboxer kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-unboxer undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-unboxer repeat extend type Payload { data: String! } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. +nested-wrappers-unboxer location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-unboxer kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. +nested-wrappers-unboxer kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. +nested-wrappers-unboxer kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. +nested-wrappers-unboxer kind extend union Item = Payload BUILT Type 'Item' is defined as an object type, but extended as a union. The extension is ignored. +nested-wrappers-unboxer kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. +nested-wrappers-unboxer undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +nested-wrappers-unboxer repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. +nested-wrappers-unboxer location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +optional-results seed BUILT +optional-results proxy FieldResolverError: Field 'Query.optionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery.optionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery, so every query of the field will fail. +optional-results kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results kind extend union Query = Payload BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +optional-results kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +optional-results repeat extend type Query { optionalResult: Payload } SchemaError: Type 'Query' declares field 'optionalResult' more than once at line 1, column 21. +optional-results location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +optional-results kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +optional-results repeat extend type Payload { data: String } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. +optional-results location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +optional-results-list seed BUILT +optional-results-list proxy FieldResolverError: Field 'Query.optionalResultList' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsListQuery.optionalResultList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsListQuery, so every query of the field will fail. +optional-results-list kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results-list kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results-list kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results-list kind extend union Query = Payload BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +optional-results-list kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results-list undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +optional-results-list repeat extend type Query { optionalResultList: [Payload] } SchemaError: Type 'Query' declares field 'optionalResultList' more than once at line 1, column 21. +optional-results-list location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +optional-results-list kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results-list kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results-list kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results-list kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results-list undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +optional-results-list repeat extend type Payload { data: String } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. +optional-results-list location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +optional-results-mixed seed BUILT +optional-results-mixed proxy FieldResolverError: Field 'Query.optionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery.optionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery, so every query of the field will fail. +optional-results-mixed kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results-mixed kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results-mixed kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results-mixed kind extend union Query = Payload BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +optional-results-mixed kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results-mixed undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +optional-results-mixed repeat extend type Query { optionalResult: Payload } SchemaError: Type 'Query' declares field 'optionalResult' more than once at line 1, column 21. +optional-results-mixed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +optional-results-mixed kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results-mixed kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results-mixed kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results-mixed kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results-mixed undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +optional-results-mixed repeat extend type Payload { data: String } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. +optional-results-mixed location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +optional-results-nested seed SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested proxy SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested kind extend interface Query { compatZ: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results-nested kind extend input Query { compatZ: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results-nested kind extend enum Query { COMPAT_Z } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results-nested kind extend union Query = Payload SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +optional-results-nested kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results-nested undeclared extend type Query @compatUndeclared SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested repeat extend type Query { optionalResultOfResult: Payload } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested location extend type Query @specifiedBy SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested kind extend interface Payload { compatZ: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. +optional-results-nested kind extend input Payload { compatZ: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. +optional-results-nested kind extend enum Payload { COMPAT_Z } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. +optional-results-nested kind extend scalar Payload @specifiedBy(url: "https://example.com") SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. +optional-results-nested undeclared extend type Payload @compatUndeclared SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested repeat extend type Payload { data: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +optional-results-nested location extend type Payload @specifiedBy SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself +options seed BUILT +options proxy FieldResolverError: Field 'Query.name' resolves to graphql.kickstart.tools.compat.scenarios.OptionsQuery.name, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionsQuery, so every query of the field will fail. +options kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +options kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +options kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +options kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +options undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +options repeat extend type Query { name: String! } SchemaError: Type 'Query' declares field 'name' more than once at line 1, column 21. +options location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +polymorphism seed BUILT +polymorphism proxy FieldResolverError: Field 'Query.node' resolves to graphql.kickstart.tools.compat.scenarios.PolymorphismQuery.node, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.PolymorphismQuery, so every query of the field will fail. +polymorphism kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +polymorphism kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +polymorphism kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +polymorphism kind extend union Query = Novel BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +polymorphism kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +polymorphism undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +polymorphism repeat extend type Query { node(id: ID!): Node } SchemaError: Type 'Query' declares field 'node' more than once at line 1, column 21. +polymorphism location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +polymorphism kind extend type Node { compatZ: String } BUILT Type 'Node' is defined as an interface, but extended as an object type. The extension is ignored. +polymorphism kind extend input Node { compatZ: String } BUILT Type 'Node' is defined as an interface, but extended as an input object type. The extension is ignored. +polymorphism kind extend enum Node { COMPAT_Z } BUILT Type 'Node' is defined as an interface, but extended as an enum. The extension is ignored. +polymorphism kind extend union Node = Novel BUILT Type 'Node' is defined as an interface, but extended as a union. The extension is ignored. +polymorphism kind extend scalar Node @specifiedBy(url: "https://example.com") BUILT Type 'Node' is defined as an interface, but extended as a scalar. The extension is ignored. +polymorphism undeclared extend interface Node @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +polymorphism repeat extend interface Node { id: ID! } SchemaError: Type 'Node' declares field 'id' more than once at line 1, column 25. +polymorphism location extend interface Node @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to INTERFACE, but it's declared on SCALAR. +polymorphism kind extend interface Novel { compatZ: String } BUILT Type 'Novel' is defined as an object type, but extended as an interface. The extension is ignored. +polymorphism kind extend input Novel { compatZ: String } BUILT Type 'Novel' is defined as an object type, but extended as an input object type. The extension is ignored. +polymorphism kind extend enum Novel { COMPAT_Z } BUILT Type 'Novel' is defined as an object type, but extended as an enum. The extension is ignored. +polymorphism kind extend union Novel = Writer BUILT Type 'Novel' is defined as an object type, but extended as a union. The extension is ignored. +polymorphism kind extend scalar Novel @specifiedBy(url: "https://example.com") BUILT Type 'Novel' is defined as an object type, but extended as a scalar. The extension is ignored. +polymorphism undeclared extend type Novel @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +polymorphism repeat extend type Novel { id: ID! } SchemaError: Type 'Novel' declares field 'id' more than once at line 1, column 21. +polymorphism location extend type Novel @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +polymorphism kind extend interface Writer { compatZ: String } BUILT Type 'Writer' is defined as an object type, but extended as an interface. The extension is ignored. +polymorphism kind extend input Writer { compatZ: String } BUILT Type 'Writer' is defined as an object type, but extended as an input object type. The extension is ignored. +polymorphism kind extend enum Writer { COMPAT_Z } BUILT Type 'Writer' is defined as an object type, but extended as an enum. The extension is ignored. +polymorphism kind extend union Writer = Novel BUILT Type 'Writer' is defined as an object type, but extended as a union. The extension is ignored. +polymorphism kind extend scalar Writer @specifiedBy(url: "https://example.com") BUILT Type 'Writer' is defined as an object type, but extended as a scalar. The extension is ignored. +polymorphism undeclared extend type Writer @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +polymorphism repeat extend type Writer { id: ID! } SchemaError: Type 'Writer' declares field 'id' more than once at line 1, column 22. +polymorphism location extend type Writer @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +polymorphism kind extend type SearchResult { compatZ: String } BUILT Type 'SearchResult' is defined as a union, but extended as an object type. The extension is ignored. +polymorphism kind extend interface SearchResult { compatZ: String } BUILT Type 'SearchResult' is defined as a union, but extended as an interface. The extension is ignored. +polymorphism kind extend input SearchResult { compatZ: String } BUILT Type 'SearchResult' is defined as a union, but extended as an input object type. The extension is ignored. +polymorphism kind extend enum SearchResult { COMPAT_Z } BUILT Type 'SearchResult' is defined as a union, but extended as an enum. The extension is ignored. +polymorphism kind extend scalar SearchResult @specifiedBy(url: "https://example.com") BUILT Type 'SearchResult' is defined as a union, but extended as a scalar. The extension is ignored. +polymorphism undeclared extend union SearchResult @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +polymorphism repeat extend union SearchResult = Novel SchemaError: Type 'SearchResult' declares member 'Novel' more than once at line 1, column 29. +polymorphism location extend union SearchResult @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to UNION, but it's declared on SCALAR. +read-only-schema seed BUILT +read-only-schema proxy FieldResolverError: Field 'Query.animal' resolves to graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery.animal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery, so every query of the field will fail. +read-only-schema kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +read-only-schema kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +read-only-schema kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +read-only-schema kind extend union Query = Dog BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +read-only-schema kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +read-only-schema undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +read-only-schema repeat extend type Query { animal(name: String!): Animal } SchemaError: Type 'Query' declares field 'animal' more than once at line 1, column 21. +read-only-schema location extend type Query @tag SchemaError: Directive @tag at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +read-only-schema location extend type Query @contact SchemaError: Directive @contact at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA. +read-only-schema location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema kind extend interface Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an interface. The extension is ignored. +read-only-schema kind extend input Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an input object type. The extension is ignored. +read-only-schema kind extend enum Mutation { COMPAT_Z } BUILT Type 'Mutation' is defined as an object type, but extended as an enum. The extension is ignored. +read-only-schema kind extend union Mutation = Dog BUILT Type 'Mutation' is defined as an object type, but extended as a union. The extension is ignored. +read-only-schema kind extend scalar Mutation @specifiedBy(url: "https://example.com") BUILT Type 'Mutation' is defined as an object type, but extended as a scalar. The extension is ignored. +read-only-schema undeclared extend type Mutation @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +read-only-schema repeat extend type Mutation { adopt(name: String!): Animal! } SchemaError: Type 'Mutation' declares field 'adopt' more than once at line 1, column 24. +read-only-schema location extend type Mutation @tag SchemaError: Directive @tag at line 1, column 22 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +read-only-schema location extend type Mutation @contact SchemaError: Directive @contact at line 1, column 22 is applied to OBJECT, but it's declared on SCHEMA. +read-only-schema location extend type Mutation @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema kind extend type Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. +read-only-schema kind extend input Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. +read-only-schema kind extend enum Animal { COMPAT_Z } BUILT Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. +read-only-schema kind extend union Animal = Dog BUILT Type 'Animal' is defined as an interface, but extended as a union. The extension is ignored. +read-only-schema kind extend scalar Animal @specifiedBy(url: "https://example.com") BUILT Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. +read-only-schema undeclared extend interface Animal @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +read-only-schema repeat extend interface Animal { name: String! @tag(name: "public") } SchemaError: Type 'Animal' declares field 'name' more than once at line 1, column 27. +read-only-schema location extend interface Animal @tag SchemaError: Directive @tag at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. +read-only-schema location extend interface Animal @contact SchemaError: Directive @contact at line 1, column 25 is applied to INTERFACE, but it's declared on SCHEMA. +read-only-schema location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. +read-only-schema kind extend interface Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. +read-only-schema kind extend input Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. +read-only-schema kind extend enum Dog { COMPAT_Z } BUILT Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. +read-only-schema kind extend union Dog = Cat BUILT Type 'Dog' is defined as an object type, but extended as a union. The extension is ignored. +read-only-schema kind extend scalar Dog @specifiedBy(url: "https://example.com") BUILT Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. +read-only-schema undeclared extend type Dog @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +read-only-schema repeat extend type Dog { name: String! @tag(name: "public") } SchemaError: Type 'Dog' declares field 'name' more than once at line 1, column 19. +read-only-schema location extend type Dog @tag SchemaError: Directive @tag at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +read-only-schema location extend type Dog @contact SchemaError: Directive @contact at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. +read-only-schema location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema kind extend interface Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an interface. The extension is ignored. +read-only-schema kind extend input Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an input object type. The extension is ignored. +read-only-schema kind extend enum Cat { COMPAT_Z } BUILT Type 'Cat' is defined as an object type, but extended as an enum. The extension is ignored. +read-only-schema kind extend union Cat = Dog BUILT Type 'Cat' is defined as an object type, but extended as a union. The extension is ignored. +read-only-schema kind extend scalar Cat @specifiedBy(url: "https://example.com") BUILT Type 'Cat' is defined as an object type, but extended as a scalar. The extension is ignored. +read-only-schema undeclared extend type Cat @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +read-only-schema repeat extend type Cat { name: String! @tag(name: "public") } SchemaError: Type 'Cat' declares field 'name' more than once at line 1, column 19. +read-only-schema location extend type Cat @tag SchemaError: Directive @tag at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +read-only-schema location extend type Cat @contact SchemaError: Directive @contact at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. +read-only-schema location extend type Cat @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema kind extend type Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. +read-only-schema kind extend interface Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. +read-only-schema kind extend input Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. +read-only-schema kind extend enum Pet { COMPAT_Z } BUILT Type 'Pet' is defined as a union, but extended as an enum. The extension is ignored. +read-only-schema kind extend scalar Pet @specifiedBy(url: "https://example.com") BUILT Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. +read-only-schema undeclared extend union Pet @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +read-only-schema repeat extend union Pet = Dog SchemaError: Type 'Pet' declares member 'Dog' more than once at line 1, column 20. +read-only-schema location extend union Pet @tag SchemaError: Directive @tag at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. +read-only-schema location extend union Pet @contact SchemaError: Directive @contact at line 1, column 18 is applied to UNION, but it's declared on SCHEMA. +read-only-schema location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. +recursive-inputs seed BUILT +recursive-inputs proxy FieldResolverError: Field 'Query.describe' resolves to graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery.describe, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery, so every query of the field will fail. +recursive-inputs kind extend type LimitUnit { compatZ: String } BUILT Type 'LimitUnit' is defined as an enum, but extended as an object type. The extension is ignored. +recursive-inputs kind extend interface LimitUnit { compatZ: String } BUILT Type 'LimitUnit' is defined as an enum, but extended as an interface. The extension is ignored. +recursive-inputs kind extend input LimitUnit { compatZ: String } BUILT Type 'LimitUnit' is defined as an enum, but extended as an input object type. The extension is ignored. +recursive-inputs kind extend scalar LimitUnit @specifiedBy(url: "https://example.com") BUILT Type 'LimitUnit' is defined as an enum, but extended as a scalar. The extension is ignored. +recursive-inputs undeclared extend enum LimitUnit @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +recursive-inputs repeat extend enum LimitUnit { ITEMS } SchemaError: Type 'LimitUnit' declares value 'ITEMS' more than once at line 1, column 25. +recursive-inputs location extend enum LimitUnit @limit SchemaError: Directive @limit at line 1, column 23 is applied to ENUM, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. +recursive-inputs location extend enum LimitUnit @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to ENUM, but it's declared on SCALAR. +recursive-inputs kind extend type RangeInput { compatZ: String } BUILT Type 'RangeInput' is defined as an input object type, but extended as an object type. The extension is ignored. +recursive-inputs kind extend interface RangeInput { compatZ: String } BUILT Type 'RangeInput' is defined as an input object type, but extended as an interface. The extension is ignored. +recursive-inputs kind extend enum RangeInput { COMPAT_Z } BUILT Type 'RangeInput' is defined as an input object type, but extended as an enum. The extension is ignored. +recursive-inputs kind extend scalar RangeInput @specifiedBy(url: "https://example.com") BUILT Type 'RangeInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +recursive-inputs undeclared extend input RangeInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +recursive-inputs repeat extend input RangeInput { min: Int! } SchemaError: Type 'RangeInput' declares field 'min' more than once at line 1, column 27. +recursive-inputs location extend input RangeInput @limit SchemaError: Directive @limit at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. +recursive-inputs location extend input RangeInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +recursive-inputs kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +recursive-inputs kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +recursive-inputs kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +recursive-inputs kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +recursive-inputs undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +recursive-inputs repeat extend type Query { describe(filter: TreeFilter!): String! @limit(range: {min : 0, max : 5}, labels: ["a", "b"]) } SchemaError: Type 'Query' declares field 'describe' more than once at line 1, column 21. +recursive-inputs location extend type Query @limit SchemaError: Directive @limit at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. +recursive-inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +recursive-inputs kind extend type TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an object type. The extension is ignored. +recursive-inputs kind extend interface TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an interface. The extension is ignored. +recursive-inputs kind extend enum TreeFilter { COMPAT_Z } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an enum. The extension is ignored. +recursive-inputs kind extend scalar TreeFilter @specifiedBy(url: "https://example.com") BUILT Type 'TreeFilter' is defined as an input object type, but extended as a scalar. The extension is ignored. +recursive-inputs undeclared extend input TreeFilter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +recursive-inputs repeat extend input TreeFilter { name: String } SchemaError: Type 'TreeFilter' declares field 'name' more than once at line 1, column 27. +recursive-inputs location extend input TreeFilter @limit SchemaError: Directive @limit at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. +recursive-inputs location extend input TreeFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +recursive-inputs kind extend type ChildFilter { compatZ: String } BUILT Type 'ChildFilter' is defined as an input object type, but extended as an object type. The extension is ignored. +recursive-inputs kind extend interface ChildFilter { compatZ: String } BUILT Type 'ChildFilter' is defined as an input object type, but extended as an interface. The extension is ignored. +recursive-inputs kind extend enum ChildFilter { COMPAT_Z } BUILT Type 'ChildFilter' is defined as an input object type, but extended as an enum. The extension is ignored. +recursive-inputs kind extend scalar ChildFilter @specifiedBy(url: "https://example.com") BUILT Type 'ChildFilter' is defined as an input object type, but extended as a scalar. The extension is ignored. +recursive-inputs undeclared extend input ChildFilter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +recursive-inputs repeat extend input ChildFilter { parent: TreeFilter } SchemaError: Type 'ChildFilter' declares field 'parent' more than once at line 1, column 28. +recursive-inputs location extend input ChildFilter @limit SchemaError: Directive @limit at line 1, column 26 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. +recursive-inputs location extend input ChildFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 26 is applied to INPUT_OBJECT, but it's declared on SCALAR. +scalar-args seed BUILT +scalar-args proxy FieldResolverError: Field 'Query.tag' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.tag, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. +scalar-args kind extend type Tag { compatZ: String } BUILT Type 'Tag' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-args kind extend interface Tag { compatZ: String } BUILT Type 'Tag' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-args kind extend input Tag { compatZ: String } BUILT Type 'Tag' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-args kind extend enum Tag { COMPAT_Z } BUILT Type 'Tag' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-args undeclared extend scalar Tag @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args argval extend scalar Tag @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar Tag @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar Tag @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args kind extend type Token { compatZ: String } BUILT Type 'Token' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-args kind extend interface Token { compatZ: String } BUILT Type 'Token' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-args kind extend input Token { compatZ: String } BUILT Type 'Token' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-args kind extend enum Token { COMPAT_Z } BUILT Type 'Token' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-args undeclared extend scalar Token @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args argval extend scalar Token @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar Token @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar Token @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args kind extend type TypedToken { compatZ: String } BUILT Type 'TypedToken' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-args kind extend interface TypedToken { compatZ: String } BUILT Type 'TypedToken' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-args kind extend input TypedToken { compatZ: String } BUILT Type 'TypedToken' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-args kind extend enum TypedToken { COMPAT_Z } BUILT Type 'TypedToken' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-args undeclared extend scalar TypedToken @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args argval extend scalar TypedToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar TypedToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar TypedToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args kind extend type WrappedToken { compatZ: String } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-args kind extend interface WrappedToken { compatZ: String } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-args kind extend input WrappedToken { compatZ: String } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-args kind extend enum WrappedToken { COMPAT_Z } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-args undeclared extend scalar WrappedToken @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args argval extend scalar WrappedToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar WrappedToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar WrappedToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args kind extend type IdToken { compatZ: String } BUILT Type 'IdToken' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-args kind extend interface IdToken { compatZ: String } BUILT Type 'IdToken' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-args kind extend input IdToken { compatZ: String } BUILT Type 'IdToken' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-args kind extend enum IdToken { COMPAT_Z } BUILT Type 'IdToken' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-args undeclared extend scalar IdToken @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args argval extend scalar IdToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar IdToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar IdToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +scalar-args kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +scalar-args kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +scalar-args kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +scalar-args undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args repeat extend type Query { tag(tag: Tag!): String! } SchemaError: Type 'Query' declares field 'tag' more than once at line 1, column 21. +scalar-args location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +scalar-args kind extend type TokenInput { compatZ: String } BUILT Type 'TokenInput' is defined as an input object type, but extended as an object type. The extension is ignored. +scalar-args kind extend interface TokenInput { compatZ: String } BUILT Type 'TokenInput' is defined as an input object type, but extended as an interface. The extension is ignored. +scalar-args kind extend enum TokenInput { COMPAT_Z } BUILT Type 'TokenInput' is defined as an input object type, but extended as an enum. The extension is ignored. +scalar-args kind extend scalar TokenInput @specifiedBy(url: "https://example.com") BUILT Type 'TokenInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +scalar-args undeclared extend input TokenInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args repeat extend input TokenInput { token: Token } SchemaError: Type 'TokenInput' declares field 'token' more than once at line 1, column 27. +scalar-args location extend input TokenInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +scalar-args kind extend type MarkedTokensInput { compatZ: String } BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as an object type. The extension is ignored. +scalar-args kind extend interface MarkedTokensInput { compatZ: String } BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as an interface. The extension is ignored. +scalar-args kind extend enum MarkedTokensInput { COMPAT_Z } BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as an enum. The extension is ignored. +scalar-args kind extend scalar MarkedTokensInput @specifiedBy(url: "https://example.com") BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +scalar-args undeclared extend input MarkedTokensInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-args repeat extend input MarkedTokensInput { typed: TypedToken } SchemaError: Type 'MarkedTokensInput' declares field 'typed' more than once at line 1, column 34. +scalar-args location extend input MarkedTokensInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 32 is applied to INPUT_OBJECT, but it's declared on SCALAR. +scalar-directives seed SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives proxy FieldResolverError: Field 'Query.today' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.today, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. +scalar-directives kind extend type Date { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-directives kind extend interface Date { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-directives kind extend input Date { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum Date { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-directives undeclared extend scalar Date @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-directives argval extend scalar Date @since(date: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @since(date: "x") SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives repeat-directive extend scalar Date @since @since SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @unit(name: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @unit(name: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @unit(name: null) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @specifiedBy(url: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @specifiedBy(url: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Date @specifiedBy(url: null) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives kind extend type DateTime { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-directives kind extend interface DateTime { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-directives kind extend input DateTime { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum DateTime { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-directives undeclared extend scalar DateTime @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-directives argval extend scalar DateTime @since(date: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @since(date: "x") SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives repeat-directive extend scalar DateTime @since @since SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @unit(name: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @unit(name: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @unit(name: null) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @specifiedBy(url: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @specifiedBy(url: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @specifiedBy(url: null) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives kind extend type Money { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-directives kind extend interface Money { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-directives kind extend input Money { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum Money { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-directives undeclared extend scalar Money @compatUndeclared SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @since(date: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @since(date: "x") SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives repeat-directive extend scalar Money @since @since SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @unit(name: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @unit(name: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @unit(name: null) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @specifiedBy(url: 5) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @specifiedBy(url: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar Money @specifiedBy(url: null) SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives kind extend interface Query { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +scalar-directives kind extend input Query { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum Query { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +scalar-directives kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +scalar-directives undeclared extend type Query @compatUndeclared SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives repeat extend type Query { today: Date @since(date: "2021-01-01") } SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives location extend type Query @since SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives location extend type Query @unit SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives location extend type Query @specifiedBy SchemaError: Found applied directive currency without corresponding directive definition. +sourceless seed BUILT +sourceless proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. +sourceless kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless kind extend union Query = Folder BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +sourceless kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +sourceless repeat extend type Query { folder: Folder! } SchemaError: Type 'Query' declares field 'folder' more than once at line 1, column 21. +sourceless location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless kind extend interface Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless kind extend input Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless kind extend enum Folder { COMPAT_Z } BUILT Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless kind extend union Folder = Image BUILT Type 'Folder' is defined as an object type, but extended as a union. The extension is ignored. +sourceless kind extend scalar Folder @specifiedBy(url: "https://example.com") BUILT Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless undeclared extend type Folder @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +sourceless repeat extend type Folder { supportedFileTypes: [String!]! } SchemaError: Type 'Folder' declares field 'supportedFileTypes' more than once at line 1, column 22. +sourceless location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +sourceless kind extend interface Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless kind extend input Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless kind extend enum Image { COMPAT_Z } BUILT Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless kind extend union Image = Folder BUILT Type 'Image' is defined as an object type, but extended as a union. The extension is ignored. +sourceless kind extend scalar Image @specifiedBy(url: "https://example.com") BUILT Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless undeclared extend type Image @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +sourceless repeat extend type Image { name: String! } SchemaError: Type 'Image' declares field 'name' more than once at line 1, column 21. +sourceless location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless-misbound seed FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound proxy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound kind extend interface Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-misbound kind extend input Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-misbound kind extend enum Query { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-misbound kind extend union Query = Folder FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-misbound kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-misbound undeclared extend type Query @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound repeat extend type Query { folder: Folder! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound location extend type Query @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound kind extend interface Folder { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-misbound kind extend input Folder { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-misbound kind extend enum Folder { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-misbound kind extend union Folder = Image FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-misbound kind extend scalar Folder @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-misbound undeclared extend type Folder @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound repeat extend type Folder { images: [Image!]! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound location extend type Folder @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound kind extend interface Image { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-misbound kind extend input Image { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-misbound kind extend enum Image { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-misbound kind extend union Image = Folder FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-misbound kind extend scalar Image @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-misbound undeclared extend type Image @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound repeat extend type Image { name: String! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-misbound location extend type Image @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless-shadowed seed BUILT +sourceless-shadowed proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. +sourceless-shadowed kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-shadowed kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-shadowed kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-shadowed kind extend union Query = Folder BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-shadowed kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-shadowed undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +sourceless-shadowed repeat extend type Query { folder: Folder! } SchemaError: Type 'Query' declares field 'folder' more than once at line 1, column 21. +sourceless-shadowed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless-shadowed kind extend interface Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-shadowed kind extend input Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-shadowed kind extend enum Folder { COMPAT_Z } BUILT Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-shadowed kind extend union Folder = Image BUILT Type 'Folder' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-shadowed kind extend scalar Folder @specifiedBy(url: "https://example.com") BUILT Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-shadowed undeclared extend type Folder @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +sourceless-shadowed repeat extend type Folder { images: [Image!]! } SchemaError: Type 'Folder' declares field 'images' more than once at line 1, column 22. +sourceless-shadowed location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +sourceless-shadowed kind extend interface Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-shadowed kind extend input Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-shadowed kind extend enum Image { COMPAT_Z } BUILT Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-shadowed kind extend union Image = Folder BUILT Type 'Image' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-shadowed kind extend scalar Image @specifiedBy(url: "https://example.com") BUILT Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-shadowed undeclared extend type Image @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +sourceless-shadowed repeat extend type Image { name: String! } SchemaError: Type 'Image' declares field 'name' more than once at line 1, column 21. +sourceless-shadowed location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless-unimplemented seed BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented kind extend interface Query { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-unimplemented kind extend input Query { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-unimplemented kind extend enum Query { COMPAT_Z } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-unimplemented kind extend union Query = Folder BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-unimplemented kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-unimplemented undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented repeat extend type Query { folder: Folder! } SchemaError: Type 'Query' declares field 'folder' more than once at line 1, column 21. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented kind extend interface Folder { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-unimplemented kind extend input Folder { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-unimplemented kind extend enum Folder { COMPAT_Z } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-unimplemented kind extend union Folder = Image BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-unimplemented kind extend scalar Folder @specifiedBy(url: "https://example.com") BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-unimplemented undeclared extend type Folder @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented repeat extend type Folder { images: [Image!]! } SchemaError: Type 'Folder' declares field 'images' more than once at line 1, column 22. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented kind extend interface Image { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-unimplemented kind extend input Image { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-unimplemented kind extend enum Image { COMPAT_Z } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-unimplemented kind extend union Image = Folder BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-unimplemented kind extend scalar Image @specifiedBy(url: "https://example.com") BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-unimplemented undeclared extend type Image @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented repeat extend type Image { name: String! } SchemaError: Type 'Image' declares field 'name' more than once at line 1, column 21. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +type-extensions seed BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions proxy FieldResolverError: Field 'Query.node' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.node, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend interface Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions kind extend input Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions kind extend enum Query { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions kind extend union Query = Article BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend type Query { node(id: ID!): Node } SchemaError: Type 'Query' declares field 'node' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @owner(team: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @owner(team: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @owner(team: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend type Node { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as an object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend input Node { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as an input object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend enum Node { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as an enum. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend union Node = Article BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Node @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions undeclared extend interface Node @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend interface Node { "The base id" id: ID! } SchemaError: Type 'Node' declares field 'id' more than once at line 1, column 25. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend interface Node @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend interface Node @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend interface Node @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend interface Node @owner SchemaError: Directive @owner at line 1, column 23 is applied to INTERFACE, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend interface Node @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to INTERFACE, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend interface Article { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as an interface. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend input Article { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as an input object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend enum Article { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as an enum. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend union Article = Video BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Article @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions undeclared extend type Article @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend type Article { id: ID! } SchemaError: Type 'Article' declares field 'id' more than once at line 1, column 23. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @owner(team: 5) SchemaError: Directive @owner at line 1, column 21 isn't repeatable but is applied more than once. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @owner(team: NOPE) SchemaError: Directive @owner at line 1, column 21 isn't repeatable but is applied more than once. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @owner(team: null) SchemaError: Directive @owner at line 1, column 21 isn't repeatable but is applied more than once. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Article @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend interface Video { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions kind extend input Video { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions kind extend enum Video { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions kind extend union Video = Article BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Video @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions undeclared extend type Video @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend type Video { id: ID! } SchemaError: Type 'Video' declares field 'id' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @owner(team: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @owner(team: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @owner(team: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Video @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend type SearchResult { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an object type. The extension is ignored. +type-extensions kind extend interface SearchResult { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an interface. The extension is ignored. +type-extensions kind extend input SearchResult { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an input object type. The extension is ignored. +type-extensions kind extend enum SearchResult { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an enum. The extension is ignored. +type-extensions kind extend scalar SearchResult @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as a scalar. The extension is ignored. +type-extensions undeclared extend union SearchResult @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend union SearchResult = Article SchemaError: Type 'SearchResult' declares member 'Article' more than once at line 1, column 29. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend union SearchResult @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend union SearchResult @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend union SearchResult @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend union SearchResult @owner SchemaError: Directive @owner at line 1, column 27 is applied to UNION, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend union SearchResult @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to UNION, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend type Color { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as an object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend interface Color { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as an interface. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend input Color { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend union Color = Article BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Color @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions undeclared extend enum Color @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend enum Color { RED } SchemaError: Type 'Color' declares value 'RED' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend enum Color @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend enum Color @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend enum Color @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend enum Color @owner SchemaError: Directive @owner at line 1, column 19 is applied to ENUM, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend enum Color @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend type Filter { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as an object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend interface Filter { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as an interface. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend enum Filter { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as an enum. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend union Filter = Article BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Filter @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions undeclared extend input Filter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend input Filter { term: String } SchemaError: Type 'Filter' declares field 'term' more than once at line 1, column 23. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend input Filter @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend input Filter @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend input Filter @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend input Filter @owner SchemaError: Directive @owner at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend input Filter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend interface Note { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions kind extend input Note { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions kind extend enum Note { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions kind extend union Note = Article BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions kind extend scalar Note @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions undeclared extend type Note @compatUndeclared BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions repeat extend type Note { text: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Note @tag(name: 5) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Note @tag(name: NOPE) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Note @tag(name: null) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Note @owner(team: 5) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Note @owner(team: NOPE) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Note @owner(team: null) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Note @specifiedBy BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-input-order seed BUILT +type-extensions-input-order proxy FieldResolverError: Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsInputOrderQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsInputOrderQuery, so every query of the field will fail. +type-extensions-input-order kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-input-order kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-input-order kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-input-order kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-input-order undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-input-order repeat extend type Query { count(filter: Filter): Int! } SchemaError: Type 'Query' declares field 'count' more than once at line 1, column 21. +type-extensions-input-order location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-input-order kind extend type Filter { compatZ: String } BUILT Type 'Filter' is defined as an input object type, but extended as an object type. The extension is ignored. +type-extensions-input-order kind extend interface Filter { compatZ: String } BUILT Type 'Filter' is defined as an input object type, but extended as an interface. The extension is ignored. +type-extensions-input-order kind extend enum Filter { COMPAT_Z } BUILT Type 'Filter' is defined as an input object type, but extended as an enum. The extension is ignored. +type-extensions-input-order kind extend scalar Filter @specifiedBy(url: "https://example.com") BUILT Type 'Filter' is defined as an input object type, but extended as a scalar. The extension is ignored. +type-extensions-input-order undeclared extend input Filter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-input-order repeat extend input Filter { term: String } SchemaError: Type 'Filter' declares field 'term' more than once at line 1, column 23. +type-extensions-input-order location extend input Filter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on SCALAR. +type-extensions-repeated-fields seed SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields proxy FieldResolverError: Field 'Query.typeAndExtension' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery.typeAndExtension, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery, so every query of the field will fail. +type-extensions-repeated-fields kind extend interface Query { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend input Query { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-repeated-fields kind extend enum Query { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union Query = TypeAndExtension SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend type Query @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend type Query { typeAndExtension: TypeAndExtension } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend type Query @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields kind extend interface TypeAndExtension { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TypeAndExtension' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend input TypeAndExtension { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TypeAndExtension' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-repeated-fields kind extend enum TypeAndExtension { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TypeAndExtension' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union TypeAndExtension = TwoExtensions SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TypeAndExtension' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar TypeAndExtension @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TypeAndExtension' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend type TypeAndExtension @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend type TypeAndExtension { "From the type" name: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend type TypeAndExtension @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields kind extend interface TwoExtensions { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TwoExtensions' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend input TwoExtensions { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TwoExtensions' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-repeated-fields kind extend enum TwoExtensions { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TwoExtensions' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union TwoExtensions = TypeAndExtension SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TwoExtensions' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar TwoExtensions @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'TwoExtensions' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend type TwoExtensions @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend type TwoExtensions { id: ID } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend type TwoExtensions @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields kind extend interface OneDefinition { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'OneDefinition' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend input OneDefinition { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'OneDefinition' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-repeated-fields kind extend enum OneDefinition { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'OneDefinition' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union OneDefinition = TypeAndExtension SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'OneDefinition' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar OneDefinition @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'OneDefinition' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend type OneDefinition @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend type OneDefinition { "The first" name: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend type OneDefinition @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields kind extend type InputTypeAndExtension { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTypeAndExtension' is defined as an input object type, but extended as an object type. The extension is ignored. +type-extensions-repeated-fields kind extend interface InputTypeAndExtension { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTypeAndExtension' is defined as an input object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend enum InputTypeAndExtension { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTypeAndExtension' is defined as an input object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union InputTypeAndExtension = TypeAndExtension SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTypeAndExtension' is defined as an input object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar InputTypeAndExtension @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTypeAndExtension' is defined as an input object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend input InputTypeAndExtension @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend input InputTypeAndExtension { "From the type" id: ID } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend input InputTypeAndExtension @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields kind extend type InputTwoExtensions { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTwoExtensions' is defined as an input object type, but extended as an object type. The extension is ignored. +type-extensions-repeated-fields kind extend interface InputTwoExtensions { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTwoExtensions' is defined as an input object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend enum InputTwoExtensions { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTwoExtensions' is defined as an input object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union InputTwoExtensions = TypeAndExtension SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTwoExtensions' is defined as an input object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar InputTwoExtensions @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputTwoExtensions' is defined as an input object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend input InputTwoExtensions @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend input InputTwoExtensions { term: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend input InputTwoExtensions @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields kind extend type InputOneDefinition { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputOneDefinition' is defined as an input object type, but extended as an object type. The extension is ignored. +type-extensions-repeated-fields kind extend interface InputOneDefinition { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputOneDefinition' is defined as an input object type, but extended as an interface. The extension is ignored. +type-extensions-repeated-fields kind extend enum InputOneDefinition { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputOneDefinition' is defined as an input object type, but extended as an enum. The extension is ignored. +type-extensions-repeated-fields kind extend union InputOneDefinition = TypeAndExtension SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputOneDefinition' is defined as an input object type, but extended as a union. The extension is ignored. +type-extensions-repeated-fields kind extend scalar InputOneDefinition @specifiedBy(url: "https://example.com") SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'InputOneDefinition' is defined as an input object type, but extended as a scalar. The extension is ignored. +type-extensions-repeated-fields undeclared extend input InputOneDefinition @compatUndeclared SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields repeat extend input InputOneDefinition { "The first" id: ID } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-repeated-fields location extend input InputOneDefinition @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. +type-extensions-sealed seed BUILT +type-extensions-sealed proxy FieldResolverError: Field 'Query.pets' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery.pets, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery, so every query of the field will fail. +type-extensions-sealed kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-sealed kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend union Query = Dog BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-sealed kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend type Query { pets: [Pet!]! } SchemaError: Type 'Query' declares field 'pets' more than once at line 1, column 21. +type-extensions-sealed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed kind extend type Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. +type-extensions-sealed kind extend interface Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. +type-extensions-sealed kind extend input Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Pet { COMPAT_Z } BUILT Type 'Pet' is defined as a union, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend scalar Pet @specifiedBy(url: "https://example.com") BUILT Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend union Pet @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend union Pet = Dog SchemaError: Type 'Pet' declares member 'Dog' more than once at line 1, column 20. +type-extensions-sealed location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. +type-extensions-sealed kind extend interface Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-sealed kind extend input Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Dog { COMPAT_Z } BUILT Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend union Dog = Cat BUILT Type 'Dog' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-sealed kind extend scalar Dog @specifiedBy(url: "https://example.com") BUILT Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend type Dog @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend type Dog { name: String } SchemaError: Type 'Dog' declares field 'name' more than once at line 1, column 19. +type-extensions-sealed location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed kind extend interface Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-sealed kind extend input Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Cat { COMPAT_Z } BUILT Type 'Cat' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend union Cat = Dog BUILT Type 'Cat' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-sealed kind extend scalar Cat @specifiedBy(url: "https://example.com") BUILT Type 'Cat' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend type Cat @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend type Cat { lives: Int } SchemaError: Type 'Cat' declares field 'lives' more than once at line 1, column 19. +type-extensions-sealed location extend type Cat @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed kind extend type Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. +type-extensions-sealed kind extend input Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Animal { COMPAT_Z } BUILT Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend union Animal = Dog BUILT Type 'Animal' is defined as an interface, but extended as a union. The extension is ignored. +type-extensions-sealed kind extend scalar Animal @specifiedBy(url: "https://example.com") BUILT Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend interface Animal @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend interface Animal { name: String } SchemaError: Type 'Animal' declares field 'name' more than once at line 1, column 27. +type-extensions-sealed location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. +type-extensions-sealed kind extend interface Cow { compatZ: String } BUILT Type 'Cow' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-sealed kind extend input Cow { compatZ: String } BUILT Type 'Cow' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Cow { COMPAT_Z } BUILT Type 'Cow' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend union Cow = Dog BUILT Type 'Cow' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-sealed kind extend scalar Cow @specifiedBy(url: "https://example.com") BUILT Type 'Cow' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend type Cow @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend type Cow { name: String } SchemaError: Type 'Cow' declares field 'name' more than once at line 1, column 19. +type-extensions-sealed location extend type Cow @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed kind extend interface Horse { compatZ: String } BUILT Type 'Horse' is defined as an object type, but extended as an interface. The extension is ignored. +type-extensions-sealed kind extend input Horse { compatZ: String } BUILT Type 'Horse' is defined as an object type, but extended as an input object type. The extension is ignored. +type-extensions-sealed kind extend enum Horse { COMPAT_Z } BUILT Type 'Horse' is defined as an object type, but extended as an enum. The extension is ignored. +type-extensions-sealed kind extend union Horse = Dog BUILT Type 'Horse' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions-sealed kind extend scalar Horse @specifiedBy(url: "https://example.com") BUILT Type 'Horse' is defined as an object type, but extended as a scalar. The extension is ignored. +type-extensions-sealed undeclared extend type Horse @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +type-extensions-sealed repeat extend type Horse { name: String } SchemaError: Type 'Horse' declares field 'name' more than once at line 1, column 21. +type-extensions-sealed location extend type Horse @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +unmapped-inputs seed BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. +unmapped-inputs proxy FieldResolverError: Field 'Query.ignored' resolves to graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery.ignored, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery, so every query of the field will fail. +unmapped-inputs kind extend interface Query { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +unmapped-inputs kind extend input Query { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +unmapped-inputs kind extend enum Query { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +unmapped-inputs kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +unmapped-inputs undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +unmapped-inputs repeat extend type Query { ignored(input: IgnoredInput!): String } SchemaError: Type 'Query' declares field 'ignored' more than once at line 1, column 21. +unmapped-inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +unmapped-inputs kind extend type IgnoredInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as an object type. The extension is ignored. +unmapped-inputs kind extend interface IgnoredInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as an interface. The extension is ignored. +unmapped-inputs kind extend enum IgnoredInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as an enum. The extension is ignored. +unmapped-inputs kind extend scalar IgnoredInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +unmapped-inputs undeclared extend input IgnoredInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +unmapped-inputs repeat extend input IgnoredInput { inner: InnerInput } SchemaError: Type 'IgnoredInput' declares field 'inner' more than once at line 1, column 29. +unmapped-inputs location extend input IgnoredInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs kind extend type InnerInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as an object type. The extension is ignored. +unmapped-inputs kind extend interface InnerInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as an interface. The extension is ignored. +unmapped-inputs kind extend enum InnerInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as an enum. The extension is ignored. +unmapped-inputs kind extend scalar InnerInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +unmapped-inputs undeclared extend input InnerInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +unmapped-inputs repeat extend input InnerInput { name: String } SchemaError: Type 'InnerInput' declares field 'name' more than once at line 1, column 27. +unmapped-inputs location extend input InnerInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs kind extend type TypoInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as an object type. The extension is ignored. +unmapped-inputs kind extend interface TypoInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as an interface. The extension is ignored. +unmapped-inputs kind extend enum TypoInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as an enum. The extension is ignored. +unmapped-inputs kind extend scalar TypoInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +unmapped-inputs undeclared extend input TypoInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +unmapped-inputs repeat extend input TypoInput { item: ItemInput } SchemaError: Type 'TypoInput' declares field 'item' more than once at line 1, column 26. +unmapped-inputs location extend input TypoInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs kind extend type ItemInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as an object type. The extension is ignored. +unmapped-inputs kind extend interface ItemInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as an interface. The extension is ignored. +unmapped-inputs kind extend enum ItemInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as an enum. The extension is ignored. +unmapped-inputs kind extend scalar ItemInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as a scalar. The extension is ignored. +unmapped-inputs undeclared extend input ItemInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +unmapped-inputs repeat extend input ItemInput { name: String } SchemaError: Type 'ItemInput' declares field 'name' more than once at line 1, column 26. +unmapped-inputs location extend input ItemInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. +wiring-shapes seed BUILT +wiring-shapes proxy FieldResolverError: Field 'Query.trees' resolves to graphql.kickstart.tools.compat.scenarios.WiringShapesQuery.trees, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.WiringShapesQuery, so every query of the field will fail. +wiring-shapes kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +wiring-shapes kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +wiring-shapes kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +wiring-shapes kind extend union Query = Person BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +wiring-shapes kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +wiring-shapes undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +wiring-shapes repeat extend type Query { trees(filter: TreeFilter): Int } SchemaError: Type 'Query' declares field 'trees' more than once at line 1, column 21. +wiring-shapes location extend type Query @inspect SchemaError: Directive @inspect at line 1, column 19 is applied to OBJECT, but it's declared on INPUT_FIELD_DEFINITION. +wiring-shapes location extend type Query @required SchemaError: Directive @required at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +wiring-shapes repeat-directive extend type Query @described @described SchemaError: Directive @described at line 1, column 30 isn't repeatable but is applied more than once. +wiring-shapes location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +wiring-shapes kind extend type TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an object type. The extension is ignored. +wiring-shapes kind extend interface TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an interface. The extension is ignored. +wiring-shapes kind extend enum TreeFilter { COMPAT_Z } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an enum. The extension is ignored. +wiring-shapes kind extend union TreeFilter = Person BUILT Type 'TreeFilter' is defined as an input object type, but extended as a union. The extension is ignored. +wiring-shapes kind extend scalar TreeFilter @specifiedBy(url: "https://example.com") BUILT Type 'TreeFilter' is defined as an input object type, but extended as a scalar. The extension is ignored. +wiring-shapes undeclared extend input TreeFilter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +wiring-shapes repeat extend input TreeFilter { name: String } SchemaError: Type 'TreeFilter' declares field 'name' more than once at line 1, column 27. +wiring-shapes location extend input TreeFilter @inspect SchemaError: Directive @inspect at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on INPUT_FIELD_DEFINITION. +wiring-shapes location extend input TreeFilter @required SchemaError: Directive @required at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION. +wiring-shapes repeat-directive extend input TreeFilter @described @described SchemaError: Directive @described at line 1, column 25 isn't repeatable but is applied more than once. +wiring-shapes location extend input TreeFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +wiring-shapes kind extend type Named { compatZ: String } BUILT Type 'Named' is defined as an interface, but extended as an object type. The extension is ignored. +wiring-shapes kind extend input Named { compatZ: String } BUILT Type 'Named' is defined as an interface, but extended as an input object type. The extension is ignored. +wiring-shapes kind extend enum Named { COMPAT_Z } BUILT Type 'Named' is defined as an interface, but extended as an enum. The extension is ignored. +wiring-shapes kind extend union Named = Person BUILT Type 'Named' is defined as an interface, but extended as a union. The extension is ignored. +wiring-shapes kind extend scalar Named @specifiedBy(url: "https://example.com") BUILT Type 'Named' is defined as an interface, but extended as a scalar. The extension is ignored. +wiring-shapes undeclared extend interface Named @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +wiring-shapes repeat extend interface Named { name: String } SchemaError: Type 'Named' declares field 'name' more than once at line 1, column 26. +wiring-shapes location extend interface Named @inspect SchemaError: Directive @inspect at line 1, column 24 is applied to INTERFACE, but it's declared on INPUT_FIELD_DEFINITION. +wiring-shapes location extend interface Named @required SchemaError: Directive @required at line 1, column 24 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. +wiring-shapes repeat-directive extend interface Named @described @described SchemaError: Directive @described at line 1, column 24 isn't repeatable but is applied more than once. +wiring-shapes location extend interface Named @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INTERFACE, but it's declared on SCALAR. +wiring-shapes kind extend interface Person { compatZ: String } BUILT Type 'Person' is defined as an object type, but extended as an interface. The extension is ignored. +wiring-shapes kind extend input Person { compatZ: String } BUILT Type 'Person' is defined as an object type, but extended as an input object type. The extension is ignored. +wiring-shapes kind extend enum Person { COMPAT_Z } BUILT Type 'Person' is defined as an object type, but extended as an enum. The extension is ignored. +wiring-shapes kind extend scalar Person @specifiedBy(url: "https://example.com") BUILT Type 'Person' is defined as an object type, but extended as a scalar. The extension is ignored. +wiring-shapes undeclared extend type Person @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +wiring-shapes repeat extend type Person { name: String } SchemaError: Type 'Person' declares field 'name' more than once at line 1, column 22. +wiring-shapes location extend type Person @inspect SchemaError: Directive @inspect at line 1, column 20 is applied to OBJECT, but it's declared on INPUT_FIELD_DEFINITION. +wiring-shapes location extend type Person @required SchemaError: Directive @required at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +wiring-shapes repeat-directive extend type Person @described @described SchemaError: Directive @described at line 1, column 20 isn't repeatable but is applied more than once. +wiring-shapes location extend type Person @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +wiring-shapes kind extend type Someone { compatZ: String } BUILT Type 'Someone' is defined as a union, but extended as an object type. The extension is ignored. +wiring-shapes kind extend interface Someone { compatZ: String } BUILT Type 'Someone' is defined as a union, but extended as an interface. The extension is ignored. +wiring-shapes kind extend input Someone { compatZ: String } BUILT Type 'Someone' is defined as a union, but extended as an input object type. The extension is ignored. +wiring-shapes kind extend enum Someone { COMPAT_Z } BUILT Type 'Someone' is defined as a union, but extended as an enum. The extension is ignored. +wiring-shapes kind extend scalar Someone @specifiedBy(url: "https://example.com") BUILT Type 'Someone' is defined as a union, but extended as a scalar. The extension is ignored. +wiring-shapes undeclared extend union Someone @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +wiring-shapes repeat extend union Someone = Person SchemaError: Type 'Someone' declares member 'Person' more than once at line 1, column 24. +wiring-shapes location extend union Someone @inspect SchemaError: Directive @inspect at line 1, column 22 is applied to UNION, but it's declared on INPUT_FIELD_DEFINITION. +wiring-shapes location extend union Someone @required SchemaError: Directive @required at line 1, column 22 is applied to UNION, but it's declared on FIELD_DEFINITION. +wiring-shapes repeat-directive extend union Someone @described @described SchemaError: Directive @described at line 1, column 22 isn't repeatable but is applied more than once. +wiring-shapes location extend union Someone @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to UNION, but it's declared on SCALAR. +wiring-shapes kind extend type State { compatZ: String } BUILT Type 'State' is defined as an enum, but extended as an object type. The extension is ignored. +wiring-shapes kind extend interface State { compatZ: String } BUILT Type 'State' is defined as an enum, but extended as an interface. The extension is ignored. +wiring-shapes kind extend input State { compatZ: String } BUILT Type 'State' is defined as an enum, but extended as an input object type. The extension is ignored. +wiring-shapes kind extend union State = Person BUILT Type 'State' is defined as an enum, but extended as a union. The extension is ignored. +wiring-shapes kind extend scalar State @specifiedBy(url: "https://example.com") BUILT Type 'State' is defined as an enum, but extended as a scalar. The extension is ignored. +wiring-shapes undeclared extend enum State @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +wiring-shapes repeat extend enum State { ALIVE } SchemaError: Type 'State' declares value 'ALIVE' more than once at line 1, column 21. +wiring-shapes location extend enum State @inspect SchemaError: Directive @inspect at line 1, column 19 is applied to ENUM, but it's declared on INPUT_FIELD_DEFINITION. +wiring-shapes location extend enum State @required SchemaError: Directive @required at line 1, column 19 is applied to ENUM, but it's declared on FIELD_DEFINITION. +wiring-shapes repeat-directive extend enum State @described @described SchemaError: Directive @described at line 1, column 19 isn't repeatable but is applied more than once. +wiring-shapes location extend enum State @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. From 865e2b3e06340ab72912cb1b5aa19a0dd59a9391 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:39:38 -0500 Subject: [PATCH 20/64] Protect only the variants of a scenario that built on the release An invalid extension can hide the error of a scenario that never built, so such a variant built on 14.2.0 by accident. --- .../kotlin/graphql/kickstart/tools/compat/CompatTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt index 8db74386..debd6b05 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -35,12 +35,12 @@ class CompatTest { val accepted = acceptedFile.readLines().filter { it.isNotBlank() }.map { Regex(it.substringBefore('\t')) } val major = version.major > release.major - fun repeatsSeedBreak(key: CaseKey) = - key != key.seed && released[key.seed]?.built == true && outcomes[key.seed]?.error == outcomes.getValue(key).error + fun repeatsSeedBreak(key: CaseKey) = key != key.seed && outcomes[key.seed]?.error == outcomes.getValue(key).error fun warnedOnRelease(key: CaseKey) = - (released.getValue(key).warnings - if (key == key.seed) emptySet() else released[key.seed]?.warnings.orEmpty().toSet()).isNotEmpty() + (released.getValue(key).warnings - if (key == key.seed) emptySet() else released.getValue(key.seed).warnings.toSet()).isNotEmpty() - val broke = released.keys.filter { released.getValue(it).built && outcomes[it]?.built == false } + // a variant of a seed that threw on the release can build only by hiding the seed's own error + val broke = released.keys.filter { released[it.seed]?.built == true && released.getValue(it).built && outcomes[it]?.built == false } .filterNot(::repeatsSeedBreak) .filterNot { key -> accepted.any { it.containsMatchIn(key.toString()) } } .filterNot { major && warnedOnRelease(it) } From 2d33e9621d461725f72d3a00ff616e6a14b2c71b Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:39:58 -0500 Subject: [PATCH 21/64] Add the release capture step and enforce the compatibility rule --- AGENTS.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 4714eb7a..3fb4a472 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,6 +49,11 @@ Bugfixes and small features stop at this skill. Follow the [Releasing a version](https://github.com/graphql-java-kickstart/graphql-java-tools/wiki/Releasing-a-version) wiki page. `github-build.sh` and `.github/workflows/release.yml` do the version bump, tag and publish. +After the release is published, record what it builds, so `CompatTest` checks later changes against it. Check out the +release tag in a worktree, run `mvn -B -ntp clean test -Dtest=CompatTest -Dcompat.capture`, and open a PR with the +`src/test/resources/compat//` it writes: `cases.tsv` and an empty `accepted.txt`. A later break that the release +notes list goes into that `accepted.txt` as a regex for the case, a tab, and the issue. + ## Rules that need judgment No check can enforce these, so each one names the mistake it prevents. @@ -110,4 +115,4 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | A build you trust starts from an empty `target/`, so no class from an earlier build ships | `clean` in `probe.sh install`, docs only for your own `mvn` runs | | Agent worktrees and local settings stay out of commits | `.gitignore` | | Agent rules live in one committed file | This file. `CLAUDE.md` imports it | -| Invalid input that used to build logs a WARN until the next major | docs only | +| Invalid input that used to build logs a WARN until the next major | `CompatTest`, against the last release's results in `src/test/resources/compat` | From 4c7f2dbe012ae4370db4948d3dae4eddb5414618 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:42:07 -0500 Subject: [PATCH 22/64] Name the seed rule and drop comments the code says --- .../graphql/kickstart/tools/compat/CompatTest.kt | 16 ++++++---------- .../graphql/kickstart/tools/compat/Variants.kt | 4 ---- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt index debd6b05..bc0e5927 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -11,10 +11,6 @@ import org.junit.Test import org.slf4j.LoggerFactory import java.io.File -/** - * Builds every scenario and its invalid variants, and fails when a case that built on the last release throws now. - * `-Dcompat.capture` records this checkout's results as the capture for its pom version instead. - */ class CompatTest { @Test fun `cases that built on the last release still build`() { @@ -35,12 +31,12 @@ class CompatTest { val accepted = acceptedFile.readLines().filter { it.isNotBlank() }.map { Regex(it.substringBefore('\t')) } val major = version.major > release.major + fun builtWithItsSeedOnRelease(key: CaseKey) = released[key.seed]?.built == true && released.getValue(key).built fun repeatsSeedBreak(key: CaseKey) = key != key.seed && outcomes[key.seed]?.error == outcomes.getValue(key).error fun warnedOnRelease(key: CaseKey) = (released.getValue(key).warnings - if (key == key.seed) emptySet() else released.getValue(key.seed).warnings.toSet()).isNotEmpty() - // a variant of a seed that threw on the release can build only by hiding the seed's own error - val broke = released.keys.filter { released[it.seed]?.built == true && released.getValue(it).built && outcomes[it]?.built == false } + val broke = released.keys.filter { builtWithItsSeedOnRelease(it) && outcomes[it]?.built == false } .filterNot(::repeatsSeedBreak) .filterNot { key -> accepted.any { it.containsMatchIn(key.toString()) } } .filterNot { major && warnedOnRelease(it) } @@ -50,13 +46,13 @@ class CompatTest { val cases = broke.take(SHOWN).joinToString("\n") { " $it\n ${outcomes.getValue(it).error}" } + if (broke.size > SHOWN) "\n and ${broke.size - SHOWN} more" else "" val byOperator = broke.groupingBy { it.operator }.eachCount().toSortedMap() + val deliberate = "A deliberate break that the release notes list goes into $acceptedFile as a regex for the case, a tab, and the issue." fail( if (major) { """ |${broke.size} cases built on $release with no WARN of their own and throw now $byOperator. |A major may reject only input that the last minor warned about. Log a WARN that names the type and the item in a - |${release.major}.x release first. A deliberate break that the release notes list goes into $acceptedFile as a - |regex for the case, a tab, and the issue. + |${release.major}.x release first. $deliberate |$cases """.trimMargin() } else { @@ -64,8 +60,7 @@ class CompatTest { |${broke.size} cases built on $release and throw now $byOperator. |Invalid input that built on the last release keeps building until the next major (AGENTS.md, Compatibility). |Instead of throwing, log a WARN that names the type and the item, open a GitHub issue with $target in its title, - |and leave `// TODO in $target (#N)`. A deliberate break that the release notes list goes into - |$acceptedFile as a regex for the case, a tab, and the issue. + |and leave `// TODO in $target (#N)`. $deliberate |$cases """.trimMargin() } @@ -79,6 +74,7 @@ class Outcome(val error: String?, val warnings: List) { private val CAPTURES = File("src/test/resources/compat") private const val SHOWN = 50 + private fun runAll(): Map { // the tests run in the library's module, which neither reads logback's nor exports the scenarios to kotlin-reflect val module = CompatTest::class.java.module diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt index 8f9c795f..06ca1d27 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt @@ -27,10 +27,6 @@ data class CaseKey(val scenario: String, val operator: String, val snippet: Stri class Variant(val key: CaseKey, val build: () -> Unit) -/** - * The scenario as it is, plus one invalid SDL snippet per grammar rule it can break, plus every resolver behind a JDK proxy. - * The rules come from the SDL grammar, not from known bugs, so a new rejection of any of them shows up. - */ fun variants(scenario: Scenario): List { fun variant(operator: String, snippet: String = "", resolvers: () -> List> = { scenario.resolvers }) = Variant(CaseKey(scenario.name, operator, snippet)) { From b43e8c7a614659e7f9a5e4aac971293650ca378f Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:52:07 -0500 Subject: [PATCH 23/64] Match the probe scenarios and their pages to what 15.0.0 rejects directive-drift and scalar-directives teach behavior that still builds, so they drop the applications 15.0.0 rejects and the 15.0.0 capture is retaken for them. directives-invalid, context-misbound and jdk-proxy exist to show input 15.0.0 now rejects, so their pages say they exit 2 and quote the error. --- .../skills/verify-tools/features/README.md | 6 +- .../features/context-and-environment.md | 20 +- .../features/directives-and-relay.md | 51 +- .../skills/verify-tools/features/proxies.md | 30 +- .../tools/compat/scenarios/DirectiveDrift.kt | 2 - src/test/resources/compat/15.0.0/cases.tsv | 509 +++++++++--------- .../scenarios/directive-drift/schema.graphqls | 20 +- .../scalar-directives/schema.graphqls | 2 +- 8 files changed, 315 insertions(+), 325 deletions(-) diff --git a/.claude/skills/verify-tools/features/README.md b/.claude/skills/verify-tools/features/README.md index c16a73d1..1c280f77 100644 --- a/.claude/skills/verify-tools/features/README.md +++ b/.claude/skills/verify-tools/features/README.md @@ -32,12 +32,12 @@ that waste or invalidate a run, and how the result looked before the fix). - [Schema parser options](./schema-options.md): `missingResolverDataFetcherProvider` (`options`). - [Type extensions](./type-extensions.md): fields, interfaces, members, values and directives of every kind of extension, - the repeat and kind-mismatch warnings, repeated object and input fields, and sealed subclasses found through + the repeat errors and the kind-mismatch warning, repeated object and input fields, and sealed subclasses found through extensions (`type-extensions`, `type-extensions-repeated-fields`, `type-extensions-sealed`). -- [Proxied resolvers](./proxies.md): Spring JDK dynamic and CGLIB proxies, and the warning for fields a JDK proxy can't +- [Proxied resolvers](./proxies.md): Spring JDK dynamic and CGLIB proxies, and the build error for fields a JDK proxy can't call (`jdk-proxy`, `jdk-proxy-cglib`, `jdk-proxy-plain`). - [Context and environment parameters](./context-and-environment.md): `contextClass`, `GraphQLContext` and - `DataFetchingEnvironment` after the schema arguments, in any order, the misbound-argument warning, and resolver methods + `DataFetchingEnvironment` after the schema arguments, in any order, the misbound-argument error, and resolver methods without the source parameter (`context-and-environment`, `context-and-environment-invalid`, `context-misbound`, `sourceless`, `sourceless-shadowed`, `sourceless-unimplemented`, `sourceless-misbound`). diff --git a/.claude/skills/verify-tools/features/context-and-environment.md b/.claude/skills/verify-tools/features/context-and-environment.md index 24d43d6e..41266e4f 100644 --- a/.claude/skills/verify-tools/features/context-and-environment.md +++ b/.claude/skills/verify-tools/features/context-and-environment.md @@ -11,7 +11,7 @@ Any other trailing parameter type fails the build with "No method found". - `ctx-env-type-resolver` passes `graphql.GraphQLContext` and the environment to a `GraphQLResolver` method. - `ctx-env-single` keeps a single environment or a single context parameter working. - `ctx-env-invalid` rejects a trailing `String` parameter at build time. -- `ctx-env-misbound` warns at build when a schema argument lands on an environment or context parameter. +- `ctx-env-misbound` fails the build when a schema argument would land on an environment or context parameter. - `sourceless` binds a field resolver method that leaves out the source and takes only arguments, the environment or the context, when no method with the source and no property matches. @@ -25,13 +25,11 @@ Any other trailing parameter type fails the build with "No method found". `build-error.txt` starts with `graphql.kickstart.tools.resolver.FieldResolverError: No method found ... (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class scenarios.AppContext])`. -- **Misbound.** `run context-misbound`. Exit `0`. `probe.log` has 3 `SchemaClassScanner` WARNs, for `Query.users`, - `Query.contextArgument` and `User.thumbnail`, none for `Query.greeting`. The first reads `Field 'Query.users' has no - parameter for its argument 'first: Int' in scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment - parameter gets the argument instead.` All four operations have `errors=1`. `01` fails with `Parameter specified as - non-null is null`, `02` and `04` with ``Cannot construct instance of `graphql.schema.DataFetchingEnvironment` ``, and - `03-context-and-correct.json` has `data = {"contextArgument": null, "greeting": "greeting: hi ada"}` with one error, for - `/contextArgument`. Before #890 the same run has the same four errors and an empty `probe.log`. +- **Misbound.** `run context-misbound`. Exit `2`, no operations run, and `probe.log` is empty. `build-error.txt` starts + with `graphql.kickstart.tools.resolver.FieldResolverError: Field 'Query.users' has no parameter for its argument + 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment + parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment + parameter.` The build stops at that first field, so `Query.contextArgument` and `User.thumbnail` aren't named. - **Without the source.** - `run sourceless`: exit `0`, `errors=0` for both operations. In `01-local-context.json` each image has `imageBlob = "blob for [png, jpg]"` (`imageBlob(env)` reads the `localContext` that `images` returned), @@ -50,6 +48,12 @@ Any other trailing parameter type fails the build with "No method found". ## Gotchas +- Before #911 (commit 296ac4bf) `context-misbound` builds with exit `0` and all four operations have `errors=1`. `01` + fails with `Parameter specified as non-null is null`, `02` and `04` with + ``Cannot construct instance of `graphql.schema.DataFetchingEnvironment` ``, and `03-context-and-correct.json` has + `data = {"contextArgument": null, "greeting": "greeting: hi ada"}` with one error, for `/contextArgument`. From #890 on, + `probe.log` has 3 `SchemaClassScanner` WARNs, for `Query.users`, `Query.contextArgument` and `User.thumbnail`, none for + `Query.greeting`. Before it, `probe.log` is empty. - Before #888 only one trailing parameter was allowed, so `context-and-environment` fails to build on older versions with the same "No method found" error. - Before #904 `sourceless` fails the build (exit `2`) with `No method or field found ... imageBlob` and six listed diff --git a/.claude/skills/verify-tools/features/directives-and-relay.md b/.claude/skills/verify-tools/features/directives-and-relay.md index f7a92751..4e969c04 100644 --- a/.claude/skills/verify-tools/features/directives-and-relay.md +++ b/.claude/skills/verify-tools/features/directives-and-relay.md @@ -5,8 +5,8 @@ can wrap the data fetcher of every field that carries the directive. `@deprecate field marked `@connection(for: "Member")` gets its `MemberConnection`, `MemberConnectionEdge` and `PageInfo` types generated, so the SDL never declares them, and a resolver returning `graphql.relay.Connection` fills them. A wiring also runs on interfaces, unions, enums and input objects, including ones that refer to themselves or each other. -The build checks every applied directive against its definition. It logs a WARN with the source line for an invalid -application, and fails for a directive with no definition unless `allowUndeclaredDirectives(true)` is set. +The build checks every applied directive against its definition. It fails for an invalid application, listing each with +its source line, and for a directive with no definition unless `allowUndeclaredDirectives(true)` is set. ## Sub-features @@ -18,19 +18,19 @@ application, and fails for a directive with no definition unless `allowUndeclare - `dir-connection-paging` returns edges with cursors and `pageInfo` from `SimpleListConnection` for `first: 2`. - `dir-scalar` applies the directives of a scalar and its extension, runs `onScalar`, and reports `specifiedByURL` from the SDL `@specifiedBy` or else from the provided scalar (`scalar-directives`). -- `dir-scalar-undeclared` logs a WARN for an undeclared directive on a scalar and builds the scalar without it - (`scalar-directives`). +- `dir-scalar-undeclared` keeps an undeclared directive on a scalar in `appliedDirectives` when + `allowUndeclaredDirectives(true)` is set (`directive-drift`). - `dir-wiring-recursive` hands a wiring on a field of a self-referencing input object the built `GraphQLInputObjectType`, not a `GraphQLTypeReference` (`wiring-shapes`). - `dir-wiring-shapes` runs wirings on an interface, a union, an enum and a self-referencing object type, and lets a wiring make a self-referencing field non-null (`wiring-shapes`). -- `dir-applied-legacy` lists every applied directive, repeats and undeclared ones included, in `appliedDirectives`, and - only the declared ones in the legacy `directives`, keeping the first of a non-repeatable directive - (`directive-drift`). +- `dir-applied-legacy` lists every applied directive, undeclared ones included, in `appliedDirectives`, and only the + declared ones in the legacy `directives` (`directive-drift`). - `dir-undeclared-fails` fails the build for an applied directive with no definition unless `allowUndeclaredDirectives(true)` is set (`directive-drift-undeclared`). -- `dir-invalid-warn` logs a WARN with the source line and column for a directive applied where its definition doesn't - allow it, without a required argument, or twice when it isn't repeatable, and still builds (`directives-invalid`). +- `dir-invalid-fails` fails the build for a directive applied where its definition doesn't allow it, without a required + argument, or twice when it isn't repeatable, and lists every one with its source line and column + (`directives-invalid`). ## Expected results @@ -51,8 +51,7 @@ application, and fails for a directive with no definition unless `allowUndeclare `scalar Date @since(date : "2020-01-01") @unit(name : "day") @specifiedBy(url : "https://example.com/date")`, and `scalar DateTime @specifiedBy(url : "https://scalars.graphql.org/andimarek/date-time")`. In `01-introspect-scalars.json`, `Date` has `specifiedByURL: "https://example.com/date"` and `DateTime` has - `"https://scalars.graphql.org/andimarek/date-time"`. `probe.log` has exactly `Scalar 'Money' is built without its - directives from the schema: Found applied directive currency without corresponding directive definition.` + `"https://scalars.graphql.org/andimarek/date-time"`. `probe.log` is empty. - **Wirings on cycles.** `run wiring-shapes`. Exit `0`, `errors=0` for both operations and an empty `probe.log`. `schema.graphqls` has `"sees GraphQLInputObjectType TreeFilter"` on `TreeFilter.children`, `friend: Person! @required` and `state: State! @required` where the SDL declares both nullable, and `"described"` above `Named`, `Someone`, @@ -60,28 +59,24 @@ application, and fails for a directive with no definition unless `allowUndeclare `data.person = {"name": "ada", "friend": {"name": "ada"}, "state": "ALIVE", "someone": {"name": "ada"}}` and `data.someone = {"name": "grace"}`. - **Applied and legacy lists.** `run directive-drift`. Exit `0` and `schema build: OK`, with no operations. In - `inspect.txt`, `input field Meta.owner` has two `applied @once` (`reason` `"x"`, then `"because"`) and one `legacy @once` - with `reason = "x"`. `field Query.search` has two `applied @undeclared`, the first with arguments typed from their - literals (`i: Int`, `f: Float`, `b: Boolean`, `l: [Int]`), and no legacy one. `enum value Color.BLUE` has - `applied @deprecated` and `applied @undeclared` but only `legacy @deprecated`. -- **Drift warnings.** `probe.log` of `directive-drift` has 12 `SchemaParser` WARNs. Six are `isn't repeatable but is applied - more than once`, two are an extension of `Date` or `Query` applying `@once` again, two are `is missing its required - argument` (`@tag` and `@needs`), one is `Directive @fieldOnly at line 38, column 28 in - compat/scenarios/directive-drift/schema.graphqls is applied to ARGUMENT_DEFINITION, but it's declared on FIELD_DEFINITION.`, and - one is `Scalar 'Money' is built without its directives from the schema: Found an unexpected directive argument tag#nam .` - None names `@undeclared`, because `directive-drift` sets `allowUndeclaredDirectives(true)`. + `inspect.txt`, `field Query.search` has two `applied @undeclared`, the first with arguments typed from their literals + (`i: Int`, `f: Float`, `b: Boolean`, `l: [Int]`), then two `applied @tag`, and two `legacy @tag` but no legacy + `@undeclared`. `enum value Color.BLUE` has `applied @deprecated` and `applied @undeclared` but only + `legacy @deprecated`. `type Money` has one `applied @undeclared` with `code: String = literal "USD"` and no legacy + directive. `type Query` has `applied @tag` (`"query"`), then the extension's `@once` (`"extension"`), `@tag` and + `@undeclared`, and the same list without `@undeclared` as legacy. `probe.log` is empty. - **Undeclared.** `run directive-drift-undeclared`. Exit `2`. `summary.txt` has `schema build: FAILED graphql.kickstart.tools.SchemaError: Found applied directive undeclared without corresponding directive definition.`, and `build-error.txt` starts with the same message. -- **Invalid applications.** `run directives-invalid`. Exit `0` and `errors=0`. `01-query.json` has - `data.motto = "KEEP IT SIMPLE"`, so the misplaced `@uppercase` still wires. `probe.log` has exactly 5 `SchemaParser` - WARNs, each naming its line and column in `compat/scenarios/directives-invalid/schema.graphqls`. - `Directive @uppercase at line 12, column 20 ... is applied to FIELD_DEFINITION, but it's declared on OBJECT.` +- **Invalid applications.** `run directives-invalid`. Exit `2`, no operations run, and `probe.log` is empty. `summary.txt` + has `schema build: FAILED graphql.kickstart.tools.SchemaError:` followed by one line per invalid application, each + naming its line and column in `compat/scenarios/directives-invalid/schema.graphqls`, in this order. `Directive @deprecated at line 17, column 13 ... is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION.` + `Directive @uppercase at line 12, column 20 ... is applied to FIELD_DEFINITION, but it's declared on OBJECT.` `Directive @auth at line 13, column 20 ... is missing its required argument 'role'.` Two `Directive @cached at line ... isn't repeatable but is applied more than once`, at line 14, column 32 (the second - `@cached` on `members`) and line 9, column 15 (`extend schema`). + `@cached` on `members`) and line 9, column 15 (`extend schema`). `build-error.txt` starts with the same message. ## Gotchas @@ -96,4 +91,6 @@ application, and fails for a directive with no definition unless `allowUndeclare graphql-java versions. - Before #895 (commit 21f3796e) `wiring-shapes` has the same `schema.graphqls`, except that `TreeFilter.children` reads `"sees GraphQLTypeReference TreeFilter"`. -- Before #885 (commit 94a98a01) `directives-invalid` has an empty `probe.log` and the same `01-query.json`. +- Before #914 (commit 2114b149) `directives-invalid` builds with exit `0`, and `01-query.json` has + `data.motto = "KEEP IT SIMPLE"`, so the misplaced `@uppercase` still wires. From #885 (commit 94a98a01) on, `probe.log` + has the five messages as `SchemaParser` WARNs. Before it, `probe.log` is empty. diff --git a/.claude/skills/verify-tools/features/proxies.md b/.claude/skills/verify-tools/features/proxies.md index 529ebe69..f3a6c0f9 100644 --- a/.claude/skills/verify-tools/features/proxies.md +++ b/.claude/skills/verify-tools/features/proxies.md @@ -2,26 +2,27 @@ A resolver wrapped in a Spring AOP proxy is scanned as its target class through `Spring4AopProxyHandler`. A CGLIB proxy (`proxyTargetClass = true`) subclasses the target, so its methods work. A JDK dynamic proxy only implements the target's -interfaces, so every query of a field that resolves to the target's own method or field fails, and the build logs a -warning per field that suggests class-based proxies, plus a getter for a field. +interfaces, so it can't call a field that resolves to the target's own method or field. The build fails with a +`FieldResolverError` that names every such field and suggests class-based proxies, plus a getter for a field. ## Sub-features -- `proxy-jdk-warning` logs a WARN per field that a JDK proxy can't call, naming the type, field, member and proxy class. -- `proxy-jdk-field-getter` suggests adding a getter when the field resolves to a public field. -- `proxy-jdk-query` still fails each such field at query time. +- `proxy-jdk-fails` fails the build with one line per field that a JDK proxy can't call, naming the type, field, member + and proxy class, even for fields no operation queries. +- `proxy-jdk-field-getter` suggests adding a getter for a field that resolves to a public field. - `proxy-cglib` serves methods and getters through a CGLIB proxy with no warning, but a public field reads `0`. - `proxy-plain` serves the same resolver without a proxy and with no warning. ## Expected results -- **JDK proxy.** `run jdk-proxy`. Exit `0`. `probe.log` has three - `SchemaClassScanner` WARNs starting `Field 'Query.test'`, `Field 'Query.count'` and `Field 'Query.total'`. The - `count` one ends `Add a getter for the field and use class-based proxies, e.g. proxyTargetClass = true in Spring.`, the - other two end `Use class-based proxies instead, e.g. proxyTargetClass = true in Spring.` `01-query.json` has - `data = {"test": null, "count": null, "total": null}` and three errors, `object of type jdk.proxy2.$ProxyN is not an - instance of scenarios.ProxiedQuery` for `test` and `total`, and `Can not get final int field scenarios.ProxiedQuery.count` - for `count`. +- **JDK proxy.** `run jdk-proxy`. Exit `2`, no operations run, and `probe.log` is empty. `build-error.txt` starts with + `graphql.kickstart.tools.resolver.FieldResolverError: Field 'Query.test' resolves to + graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxy2.$ProxyN, which isn't a + graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail.`, followed by the same + line for `Field 'Query.count'` (`ProxiedQuery.count`) and `Field 'Query.total'` (`ProxiedQuery.getTotal`), and ends + `This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. + proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field + reads to the target.` - **CGLIB proxy.** `run jdk-proxy-cglib`. Exit `0`, empty `probe.log`, `01-query.json` has `data = {"test": "ok", "count": 0, "total": 2}`. - **No proxy.** `run jdk-proxy-plain`. Exit `0`, empty `probe.log`, @@ -29,7 +30,10 @@ warning per field that suggests class-based proxies, plus a getter for a field. ## Gotchas -- The warning shipped with #853. On a checkout without it, `jdk-proxy` has the same query errors and an empty `probe.log`. +- Before #913 (commit f4800425) `jdk-proxy` builds with exit `0`. `01-query.json` has + `data = {"test": null, "count": null, "total": null}` and three errors, `object of type jdk.proxy2.$ProxyN is not an + instance of scenarios.ProxiedQuery` for `test` and `total`, and `Can not get final int field scenarios.ProxiedQuery.count` + for `count`. From #853 on, `probe.log` has one `SchemaClassScanner` WARN per field. Before it, `probe.log` is empty. - The proxy number in `jdk.proxy2.$ProxyN` varies between runs. - CGLIB can't override `final` members, so the resolver and its members must be `open`. A final getter is called on the proxy itself and reads the proxy's empty field, like `count` does. diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt index 26ca21de..a70951e8 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/scenarios/DirectiveDrift.kt @@ -42,8 +42,6 @@ data class DriftMeta(val owner: String?) class DirectiveDriftQuery : GraphQLQueryResolver { fun plain() = "plain" - fun wrongPlace(arg: String?) = arg - fun missing() = "missing" fun old() = "old" fun older() = "older" fun search(filter: DriftMeta?, term: String?) = "${filter?.owner} $term" diff --git a/src/test/resources/compat/15.0.0/cases.tsv b/src/test/resources/compat/15.0.0/cases.tsv index 30ed641e..e191fc58 100644 --- a/src/test/resources/compat/15.0.0/cases.tsv +++ b/src/test/resources/compat/15.0.0/cases.tsv @@ -152,216 +152,207 @@ context-misbound kind extend scalar User @specifiedBy(url: "https://example.com" context-misbound undeclared extend type User @compatUndeclared FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. context-misbound repeat extend type User { name: String! } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. context-misbound location extend type User @specifiedBy FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. -directive-drift seed SchemaError: Found an unexpected directive argument tag#nam . +directive-drift seed BUILT directive-drift proxy FieldResolverError: Field 'Query.plain' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.plain, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. -directive-drift kind extend type Kind { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as an object type. The extension is ignored. -directive-drift kind extend interface Kind { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as an interface. The extension is ignored. -directive-drift kind extend input Kind { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as an input object type. The extension is ignored. -directive-drift kind extend union Kind = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as a union. The extension is ignored. -directive-drift kind extend scalar Kind @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Kind' is defined as an enum, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend enum Kind @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend enum Kind { PLAIN } SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Kind @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend enum Kind @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Kind @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Kind @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Kind @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Kind @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Kind @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend interface Query { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -directive-drift kind extend input Query { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -directive-drift kind extend enum Query { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -directive-drift kind extend union Query = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. -directive-drift kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend type Query @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend type Query { plain: String @tag(name: "plain", level: 2) @once(reason: "supplied") @fieldOnly @argDoc(note: "x") } SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Query @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend type Query @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Query @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Query @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Query @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Query @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Query @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend type Animal { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. -directive-drift kind extend input Animal { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. -directive-drift kind extend enum Animal { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. -directive-drift kind extend union Animal = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as a union. The extension is ignored. -directive-drift kind extend scalar Animal @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend interface Animal @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend interface Animal { name: String @once @once } SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend interface Animal @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend interface Animal @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend interface Animal @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend interface Animal @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend interface Animal @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend interface Animal @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend interface Animal @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend interface Dog { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. -directive-drift kind extend input Dog { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. -directive-drift kind extend enum Dog { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. -directive-drift kind extend scalar Dog @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend type Dog @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend type Dog { name: String } SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend type Dog @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend type Dog @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Dog @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Dog @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Dog @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Dog @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend type Dog @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend type Pet { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. -directive-drift kind extend interface Pet { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. -directive-drift kind extend input Pet { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. -directive-drift kind extend enum Pet { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as an enum. The extension is ignored. -directive-drift kind extend scalar Pet @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend union Pet @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend union Pet = Dog SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend union Pet @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend union Pet @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend union Pet @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend union Pet @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend union Pet @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend union Pet @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend union Pet @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend type Color { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as an object type. The extension is ignored. -directive-drift kind extend interface Color { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as an interface. The extension is ignored. -directive-drift kind extend input Color { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored. -directive-drift kind extend union Color = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as a union. The extension is ignored. -directive-drift kind extend scalar Color @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Color' is defined as an enum, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend enum Color @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend enum Color { RED } SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend enum Color @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend enum Color @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Color @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Color @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Color @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Color @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend enum Color @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend type Meta { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as an object type. The extension is ignored. -directive-drift kind extend interface Meta { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as an interface. The extension is ignored. -directive-drift kind extend enum Meta { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as an enum. The extension is ignored. -directive-drift kind extend union Meta = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as a union. The extension is ignored. -directive-drift kind extend scalar Meta @specifiedBy(url: "https://example.com") SchemaError: Found an unexpected directive argument tag#nam . Type 'Meta' is defined as an input object type, but extended as a scalar. The extension is ignored. -directive-drift undeclared extend input Meta @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat extend input Meta { owner: String @once(reason: "x") @once } SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend input Meta @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend input Meta @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend input Meta @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend input Meta @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend input Meta @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend input Meta @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend input Meta @specifiedBy SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend type Date { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. -directive-drift kind extend interface Date { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. -directive-drift kind extend input Date { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. -directive-drift kind extend enum Date { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. -directive-drift kind extend union Date = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. -directive-drift undeclared extend scalar Date @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend scalar Date @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Date @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Date @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Date @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Date @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @specifiedBy(url: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @specifiedBy(url: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Date @specifiedBy(url: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift kind extend type Money { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. -directive-drift kind extend interface Money { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. -directive-drift kind extend input Money { compatZ: String } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. -directive-drift kind extend enum Money { COMPAT_Z } SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. -directive-drift kind extend union Money = Dog SchemaError: Found an unexpected directive argument tag#nam . Type 'Money' is defined as a scalar, but extended as a union. The extension is ignored. -directive-drift undeclared extend scalar Money @compatUndeclared SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(name: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(name: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(name: null) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(level: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(kind: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(kind: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(meta: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @tag(meta: "x") SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @once(reason: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @once(reason: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift repeat-directive extend scalar Money @once @once SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Money @link SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Money @argDoc SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Money @fieldOnly SchemaError: Found an unexpected directive argument tag#nam . -directive-drift location extend scalar Money @needs SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @specifiedBy(url: 5) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @specifiedBy(url: NOPE) SchemaError: Found an unexpected directive argument tag#nam . -directive-drift argval extend scalar Money @specifiedBy(url: null) SchemaError: Found an unexpected directive argument tag#nam . +directive-drift kind extend type Kind { compatZ: String } BUILT Type 'Kind' is defined as an enum, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Kind { compatZ: String } BUILT Type 'Kind' is defined as an enum, but extended as an interface. The extension is ignored. +directive-drift kind extend input Kind { compatZ: String } BUILT Type 'Kind' is defined as an enum, but extended as an input object type. The extension is ignored. +directive-drift kind extend union Kind = Dog BUILT Type 'Kind' is defined as an enum, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Kind @specifiedBy(url: "https://example.com") BUILT Type 'Kind' is defined as an enum, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend enum Kind @compatUndeclared BUILT +directive-drift repeat extend enum Kind { PLAIN } SchemaError: Type 'Kind' declares value 'PLAIN' more than once at line 1, column 20. +directive-drift argval extend enum Kind @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Kind @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Kind @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Kind @tag(level: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend enum Kind @tag(kind: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend enum Kind @tag(kind: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend enum Kind @tag(meta: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend enum Kind @tag(meta: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend enum Kind @once(reason: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Kind @once(reason: NOPE) InvalidSchemaException: invalid schema: +directive-drift repeat-directive extend enum Kind @once @once SchemaError: Directive @once at line 1, column 24 isn't repeatable but is applied more than once. +directive-drift location extend enum Kind @link SchemaError: Directive @link at line 1, column 18 is applied to ENUM, but it's declared on SCHEMA. +directive-drift location extend enum Kind @argDoc SchemaError: Directive @argDoc at line 1, column 18 is applied to ENUM, but it's declared on FIELD_DEFINITION. +directive-drift location extend enum Kind @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 18 is applied to ENUM, but it's declared on FIELD_DEFINITION. +directive-drift location extend enum Kind @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to ENUM, but it's declared on SCALAR. +directive-drift kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +directive-drift kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +directive-drift kind extend union Query = Dog BUILT Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend type Query @compatUndeclared BUILT +directive-drift repeat extend type Query { plain: String @tag(name: "plain", level: 2) @once(reason: "supplied") @fieldOnly @argDoc(note: "x") } SchemaError: Type 'Query' declares field 'plain' more than once at line 1, column 21. +directive-drift argval extend type Query @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend type Query @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend type Query @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend type Query @tag(level: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend type Query @tag(kind: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend type Query @tag(kind: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend type Query @tag(meta: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend type Query @tag(meta: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend type Query @once(reason: 5) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift argval extend type Query @once(reason: NOPE) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift repeat-directive extend type Query @once @once SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift location extend type Query @link SchemaError: Directive @link at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA. +directive-drift location extend type Query @argDoc SchemaError: Directive @argDoc at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directive-drift location extend type Query @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directive-drift location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +directive-drift kind extend type Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. +directive-drift kind extend input Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Animal { COMPAT_Z } BUILT Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. +directive-drift kind extend union Animal = Dog BUILT Type 'Animal' is defined as an interface, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Animal @specifiedBy(url: "https://example.com") BUILT Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend interface Animal @compatUndeclared BUILT +directive-drift repeat extend interface Animal { name: String @once } SchemaError: Type 'Animal' declares field 'name' more than once at line 1, column 27. +directive-drift argval extend interface Animal @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend interface Animal @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend interface Animal @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend interface Animal @tag(level: "x") SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. +directive-drift argval extend interface Animal @tag(kind: 5) SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. +directive-drift argval extend interface Animal @tag(kind: "x") SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. +directive-drift argval extend interface Animal @tag(meta: 5) SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. +directive-drift argval extend interface Animal @tag(meta: "x") SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. +directive-drift argval extend interface Animal @once(reason: 5) SchemaError: Directive @once at line 1, column 25 isn't repeatable but is applied more than once. +directive-drift argval extend interface Animal @once(reason: NOPE) SchemaError: Directive @once at line 1, column 25 isn't repeatable but is applied more than once. +directive-drift repeat-directive extend interface Animal @once @once SchemaError: Directive @once at line 1, column 25 isn't repeatable but is applied more than once. +directive-drift location extend interface Animal @link SchemaError: Directive @link at line 1, column 25 is applied to INTERFACE, but it's declared on SCHEMA. +directive-drift location extend interface Animal @argDoc SchemaError: Directive @argDoc at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. +directive-drift location extend interface Animal @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. +directive-drift location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. +directive-drift kind extend interface Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. +directive-drift kind extend input Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Dog { COMPAT_Z } BUILT Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. +directive-drift kind extend scalar Dog @specifiedBy(url: "https://example.com") BUILT Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend type Dog @compatUndeclared BUILT +directive-drift repeat extend type Dog { name: String } SchemaError: Type 'Dog' declares field 'name' more than once at line 1, column 19. +directive-drift argval extend type Dog @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend type Dog @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend type Dog @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend type Dog @tag(level: "x") SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. +directive-drift argval extend type Dog @tag(kind: 5) SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. +directive-drift argval extend type Dog @tag(kind: "x") SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. +directive-drift argval extend type Dog @tag(meta: 5) SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. +directive-drift argval extend type Dog @tag(meta: "x") SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. +directive-drift argval extend type Dog @once(reason: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend type Dog @once(reason: NOPE) InvalidSchemaException: invalid schema: +directive-drift repeat-directive extend type Dog @once @once SchemaError: Directive @once at line 1, column 23 isn't repeatable but is applied more than once. +directive-drift location extend type Dog @link SchemaError: Directive @link at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. +directive-drift location extend type Dog @argDoc SchemaError: Directive @argDoc at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directive-drift location extend type Dog @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. +directive-drift location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +directive-drift kind extend type Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. +directive-drift kind extend input Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Pet { COMPAT_Z } BUILT Type 'Pet' is defined as a union, but extended as an enum. The extension is ignored. +directive-drift kind extend scalar Pet @specifiedBy(url: "https://example.com") BUILT Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend union Pet @compatUndeclared BUILT +directive-drift repeat extend union Pet = Dog SchemaError: Type 'Pet' declares member 'Dog' more than once at line 1, column 20. +directive-drift argval extend union Pet @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend union Pet @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend union Pet @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend union Pet @tag(level: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend union Pet @tag(kind: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend union Pet @tag(kind: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend union Pet @tag(meta: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend union Pet @tag(meta: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. +directive-drift argval extend union Pet @once(reason: 5) SchemaError: Directive @once at line 1, column 18 isn't repeatable but is applied more than once. +directive-drift argval extend union Pet @once(reason: NOPE) SchemaError: Directive @once at line 1, column 18 isn't repeatable but is applied more than once. +directive-drift repeat-directive extend union Pet @once @once SchemaError: Directive @once at line 1, column 18 isn't repeatable but is applied more than once. +directive-drift location extend union Pet @link SchemaError: Directive @link at line 1, column 18 is applied to UNION, but it's declared on SCHEMA. +directive-drift location extend union Pet @argDoc SchemaError: Directive @argDoc at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. +directive-drift location extend union Pet @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. +directive-drift location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. +directive-drift kind extend type Color { compatZ: String } BUILT Type 'Color' is defined as an enum, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Color { compatZ: String } BUILT Type 'Color' is defined as an enum, but extended as an interface. The extension is ignored. +directive-drift kind extend input Color { compatZ: String } BUILT Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored. +directive-drift kind extend union Color = Dog BUILT Type 'Color' is defined as an enum, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Color @specifiedBy(url: "https://example.com") BUILT Type 'Color' is defined as an enum, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend enum Color @compatUndeclared BUILT +directive-drift repeat extend enum Color { RED } SchemaError: Type 'Color' declares value 'RED' more than once at line 1, column 21. +directive-drift argval extend enum Color @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Color @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Color @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Color @tag(level: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend enum Color @tag(kind: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend enum Color @tag(kind: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend enum Color @tag(meta: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend enum Color @tag(meta: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend enum Color @once(reason: 5) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift argval extend enum Color @once(reason: NOPE) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift repeat-directive extend enum Color @once @once SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift location extend enum Color @link SchemaError: Directive @link at line 1, column 19 is applied to ENUM, but it's declared on SCHEMA. +directive-drift location extend enum Color @argDoc SchemaError: Directive @argDoc at line 1, column 19 is applied to ENUM, but it's declared on FIELD_DEFINITION. +directive-drift location extend enum Color @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 19 is applied to ENUM, but it's declared on FIELD_DEFINITION. +directive-drift location extend enum Color @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. +directive-drift kind extend type Meta { compatZ: String } BUILT Type 'Meta' is defined as an input object type, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Meta { compatZ: String } BUILT Type 'Meta' is defined as an input object type, but extended as an interface. The extension is ignored. +directive-drift kind extend enum Meta { COMPAT_Z } BUILT Type 'Meta' is defined as an input object type, but extended as an enum. The extension is ignored. +directive-drift kind extend union Meta = Dog BUILT Type 'Meta' is defined as an input object type, but extended as a union. The extension is ignored. +directive-drift kind extend scalar Meta @specifiedBy(url: "https://example.com") BUILT Type 'Meta' is defined as an input object type, but extended as a scalar. The extension is ignored. +directive-drift undeclared extend input Meta @compatUndeclared BUILT +directive-drift repeat extend input Meta { owner: String @once(reason: "x") } SchemaError: Type 'Meta' declares field 'owner' more than once at line 1, column 21. +directive-drift argval extend input Meta @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend input Meta @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend input Meta @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend input Meta @tag(level: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend input Meta @tag(kind: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend input Meta @tag(kind: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend input Meta @tag(meta: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend input Meta @tag(meta: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. +directive-drift argval extend input Meta @once(reason: 5) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift argval extend input Meta @once(reason: NOPE) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift repeat-directive extend input Meta @once @once SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. +directive-drift location extend input Meta @link SchemaError: Directive @link at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on SCHEMA. +directive-drift location extend input Meta @argDoc SchemaError: Directive @argDoc at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION. +directive-drift location extend input Meta @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION. +directive-drift location extend input Meta @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on SCALAR. +directive-drift kind extend type Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +directive-drift kind extend input Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Date { COMPAT_Z } BUILT Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +directive-drift kind extend union Date = Dog BUILT Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. +directive-drift undeclared extend scalar Date @compatUndeclared BUILT +directive-drift argval extend scalar Date @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Date @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Date @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Date @tag(level: "x") SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. +directive-drift argval extend scalar Date @tag(kind: 5) SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. +directive-drift argval extend scalar Date @tag(kind: "x") SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. +directive-drift argval extend scalar Date @tag(meta: 5) SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. +directive-drift argval extend scalar Date @tag(meta: "x") SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. +directive-drift argval extend scalar Date @once(reason: 5) SchemaError: Directive @once at line 1, column 20 isn't repeatable but is applied more than once. +directive-drift argval extend scalar Date @once(reason: NOPE) SchemaError: Directive @once at line 1, column 20 isn't repeatable but is applied more than once. +directive-drift repeat-directive extend scalar Date @once @once SchemaError: Directive @once at line 1, column 20 isn't repeatable but is applied more than once. +directive-drift location extend scalar Date @link SchemaError: Directive @link at line 1, column 20 is applied to SCALAR, but it's declared on SCHEMA. +directive-drift location extend scalar Date @argDoc SchemaError: Directive @argDoc at line 1, column 20 is applied to SCALAR, but it's declared on FIELD_DEFINITION. +directive-drift location extend scalar Date @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 20 is applied to SCALAR, but it's declared on FIELD_DEFINITION. +directive-drift argval extend scalar Date @specifiedBy(url: 5) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. +directive-drift argval extend scalar Date @specifiedBy(url: NOPE) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. +directive-drift argval extend scalar Date @specifiedBy(url: null) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. +directive-drift kind extend type Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. +directive-drift kind extend interface Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. +directive-drift kind extend input Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. +directive-drift kind extend enum Money { COMPAT_Z } BUILT Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. +directive-drift kind extend union Money = Dog BUILT Type 'Money' is defined as a scalar, but extended as a union. The extension is ignored. +directive-drift undeclared extend scalar Money @compatUndeclared BUILT +directive-drift argval extend scalar Money @tag(name: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @tag(name: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @tag(level: "x") SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. +directive-drift argval extend scalar Money @tag(kind: 5) SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. +directive-drift argval extend scalar Money @tag(kind: "x") SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. +directive-drift argval extend scalar Money @tag(meta: 5) SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. +directive-drift argval extend scalar Money @tag(meta: "x") SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. +directive-drift argval extend scalar Money @once(reason: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @once(reason: NOPE) InvalidSchemaException: invalid schema: +directive-drift repeat-directive extend scalar Money @once @once SchemaError: Directive @once at line 1, column 27 isn't repeatable but is applied more than once. +directive-drift location extend scalar Money @link SchemaError: Directive @link at line 1, column 21 is applied to SCALAR, but it's declared on SCHEMA. +directive-drift location extend scalar Money @argDoc SchemaError: Directive @argDoc at line 1, column 21 is applied to SCALAR, but it's declared on FIELD_DEFINITION. +directive-drift location extend scalar Money @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 21 is applied to SCALAR, but it's declared on FIELD_DEFINITION. +directive-drift argval extend scalar Money @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @specifiedBy(url: null) InvalidSchemaException: invalid schema: directive-drift-undeclared seed SchemaError: Found applied directive undeclared without corresponding directive definition. directive-drift-undeclared proxy FieldResolverError: Field 'Query.a' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField.a, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField, so every query of the field will fail. directive-drift-undeclared kind extend interface Query { compatZ: String } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. @@ -930,59 +921,59 @@ scalar-args kind extend scalar MarkedTokensInput @specifiedBy(url: "https://exam scalar-args undeclared extend input MarkedTokensInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. scalar-args repeat extend input MarkedTokensInput { typed: TypedToken } SchemaError: Type 'MarkedTokensInput' declares field 'typed' more than once at line 1, column 34. scalar-args location extend input MarkedTokensInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 32 is applied to INPUT_OBJECT, but it's declared on SCALAR. -scalar-directives seed SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives seed BUILT scalar-directives proxy FieldResolverError: Field 'Query.today' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.today, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. -scalar-directives kind extend type Date { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. -scalar-directives kind extend interface Date { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. -scalar-directives kind extend input Date { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. -scalar-directives kind extend enum Date { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-directives kind extend type Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-directives kind extend interface Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-directives kind extend input Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum Date { COMPAT_Z } BUILT Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-directives undeclared extend scalar Date @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-directives argval extend scalar Date @since(date: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @since(date: "x") SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives repeat-directive extend scalar Date @since @since SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @unit(name: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @unit(name: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @unit(name: null) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @specifiedBy(url: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @specifiedBy(url: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Date @specifiedBy(url: null) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives kind extend type DateTime { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an object type. The extension is ignored. -scalar-directives kind extend interface DateTime { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an interface. The extension is ignored. -scalar-directives kind extend input DateTime { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an input object type. The extension is ignored. -scalar-directives kind extend enum DateTime { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'DateTime' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-directives argval extend scalar Date @since(date: 5) SchemaError: Directive @since at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @since(date: "x") SchemaError: Directive @since at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives repeat-directive extend scalar Date @since @since SchemaError: Directive @since at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @unit(name: 5) SchemaError: Directive @unit at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @unit(name: NOPE) SchemaError: Directive @unit at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @unit(name: null) SchemaError: Directive @unit at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @specifiedBy(url: 5) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @specifiedBy(url: NOPE) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Date @specifiedBy(url: null) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. +scalar-directives kind extend type DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-directives kind extend interface DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-directives kind extend input DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum DateTime { COMPAT_Z } BUILT Type 'DateTime' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-directives undeclared extend scalar DateTime @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-directives argval extend scalar DateTime @since(date: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @since(date: "x") SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives repeat-directive extend scalar DateTime @since @since SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @unit(name: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @unit(name: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @unit(name: null) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @specifiedBy(url: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @specifiedBy(url: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar DateTime @specifiedBy(url: null) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives kind extend type Money { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. -scalar-directives kind extend interface Money { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. -scalar-directives kind extend input Money { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. -scalar-directives kind extend enum Money { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. -scalar-directives undeclared extend scalar Money @compatUndeclared SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @since(date: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @since(date: "x") SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives repeat-directive extend scalar Money @since @since SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @unit(name: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @unit(name: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @unit(name: null) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @specifiedBy(url: 5) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @specifiedBy(url: NOPE) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives argval extend scalar Money @specifiedBy(url: null) SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives kind extend interface Query { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -scalar-directives kind extend input Query { compatZ: String } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -scalar-directives kind extend enum Query { COMPAT_Z } SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -scalar-directives kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Found applied directive currency without corresponding directive definition. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. -scalar-directives undeclared extend type Query @compatUndeclared SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives repeat extend type Query { today: Date @since(date: "2021-01-01") } SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives location extend type Query @since SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives location extend type Query @unit SchemaError: Found applied directive currency without corresponding directive definition. -scalar-directives location extend type Query @specifiedBy SchemaError: Found applied directive currency without corresponding directive definition. +scalar-directives argval extend scalar DateTime @since(date: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @since(date: "x") BUILT +scalar-directives repeat-directive extend scalar DateTime @since @since SchemaError: Directive @since at line 1, column 31 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar DateTime @unit(name: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @unit(name: NOPE) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @unit(name: null) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-directives kind extend type Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. +scalar-directives kind extend interface Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. +scalar-directives kind extend input Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum Money { COMPAT_Z } BUILT Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. +scalar-directives undeclared extend scalar Money @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-directives argval extend scalar Money @since(date: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @since(date: "x") BUILT +scalar-directives repeat-directive extend scalar Money @since @since SchemaError: Directive @since at line 1, column 28 isn't repeatable but is applied more than once. +scalar-directives argval extend scalar Money @unit(name: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @unit(name: NOPE) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @unit(name: null) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @specifiedBy(url: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-directives kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +scalar-directives kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +scalar-directives kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +scalar-directives kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +scalar-directives undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. +scalar-directives repeat extend type Query { today: Date @since(date: "2021-01-01") } SchemaError: Type 'Query' declares field 'today' more than once at line 1, column 21. +scalar-directives location extend type Query @since SchemaError: Directive @since at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR | FIELD_DEFINITION. +scalar-directives location extend type Query @unit SchemaError: Directive @unit at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +scalar-directives location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. sourceless seed BUILT sourceless proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. sourceless kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. diff --git a/src/test/resources/compat/scenarios/directive-drift/schema.graphqls b/src/test/resources/compat/scenarios/directive-drift/schema.graphqls index 85f2f1e5..eb4657e9 100644 --- a/src/test/resources/compat/scenarios/directive-drift/schema.graphqls +++ b/src/test/resources/compat/scenarios/directive-drift/schema.graphqls @@ -24,24 +24,20 @@ directive @argDoc(note: String @once @tag(name: "on a directive argument")) on F directive @fieldOnly on FIELD_DEFINITION -directive @needs(value: String!) on FIELD_DEFINITION - enum Kind { PLAIN LOUD } -type Query @tag(name: "query") @once @once { +type Query @tag(name: "query") { plain: String # described by a comment @tag(name: "plain", level: 2) @once(reason: "supplied") @fieldOnly @argDoc(note: "x") - wrongPlace(arg: String @fieldOnly): String - missing: String @needs old: String @deprecated older: String @deprecated(reason: "use plain") search( filter: Meta @tag(name: "arg", kind: LOUD, meta: {owner: "me"}) - term: String @once @once + term: String @once ): String @undeclared(s: "x", i: 1, f: 1.5, b: true, n: null, l: [1, 2], e: []) @undeclared(s: "again") @tag(name: "a") @tag(name: "b") animal: Animal pet: Pet @@ -53,27 +49,27 @@ type Query @tag(name: "query") @once @once { extend type Query @once(reason: "extension") @tag(name: "extension") @undeclared interface Animal @tag(name: "animal") @once { - name: String @once @once + name: String @once } type Dog implements Animal { name: String } -union Pet @tag(name: "pet") @once @once = Dog +union Pet @tag(name: "pet") @once = Dog enum Color @once { - RED @tag(name: "red") @once @once + RED @tag(name: "red") @once GREEN @deprecated BLUE @deprecated(reason: "too blue") @undeclared(why: "blue") } input Meta @tag(name: "input") @once { - owner: String @once(reason: "x") @once + owner: String @once(reason: "x") } "A date" -scalar Date @tag(name: "date") @specifiedBy(url: "https://example.com/date") @once +scalar Date @tag(name: "date") @specifiedBy(url: "https://example.com/date") extend scalar Date @once(reason: "extension") @tag(name: "extension") -scalar Money @tag(nam: "typo") +scalar Money @undeclared(code: "USD") diff --git a/src/test/resources/compat/scenarios/scalar-directives/schema.graphqls b/src/test/resources/compat/scenarios/scalar-directives/schema.graphqls index 48bba21e..87ba3a39 100644 --- a/src/test/resources/compat/scenarios/scalar-directives/schema.graphqls +++ b/src/test/resources/compat/scenarios/scalar-directives/schema.graphqls @@ -7,7 +7,7 @@ extend scalar Date @since(date: "2020-01-01") @unit(name: "day") scalar DateTime -scalar Money @currency(code: "USD") +scalar Money type Query { today: Date @since(date: "2021-01-01") From 0ff319fbf2d6d7ddcf99d2f2fe2aecc8b13ea2e7 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:56:00 -0500 Subject: [PATCH 24/64] Close the API and jar check bypasses - Fail when no release below the pom version resolves, instead of passing with a warning. - Treat a Kotlin file facade with no public top-level declarations, and any class nested in a non-public class, as non-API. - Compare synthetic members, keeping the ones compiled callers link to: @Deprecated(level = HIDDEN) declarations and the $default bridges and DefaultConstructorMarker constructors of public declarations. - Fail when are set at a version that isn't X.0.0, so a planned break needs the next major. - Run the jar check through antrun, so its reason is Maven's last error line, and name the fix for a missing module-info.class. --- build/JarCheck.java | 2 +- build/japicmp-kotlin-public.groovy | 155 +++++++++++++++++++++-------- pom.xml | 40 +++++--- 3 files changed, 143 insertions(+), 54 deletions(-) diff --git a/build/JarCheck.java b/build/JarCheck.java index 1a489840..625c166d 100644 --- a/build/JarCheck.java +++ b/build/JarCheck.java @@ -59,7 +59,7 @@ public static void main(String[] args) throws IOException { }); if (descriptor == null) { - problems.add("The jar has no module-info.class."); + problems.add("The jar has no module-info.class. Keep src/main/kotlin/module-info.java, which maven-compiler-plugin compiles into the jar."); } else { List modulePath = new ArrayList<>(); modulePath.add(jar); diff --git a/build/japicmp-kotlin-public.groovy b/build/japicmp-kotlin-public.groovy index fabe41e2..e3f4fe14 100644 --- a/build/japicmp-kotlin-public.groovy +++ b/build/japicmp-kotlin-public.groovy @@ -1,6 +1,8 @@ import javassist.CtBehavior import javassist.CtClass +import javassist.bytecode.AccessFlag import javassist.bytecode.AnnotationsAttribute +import javassist.bytecode.InnerClassesAttribute import javassist.bytecode.annotation.ArrayMemberValue import javassist.bytecode.annotation.IntegerMemberValue import javassist.bytecode.annotation.StringMemberValue @@ -10,12 +12,17 @@ import kotlin.metadata.jvm.JvmExtensionsKt import kotlin.metadata.jvm.JvmMetadataUtil import kotlin.metadata.jvm.KotlinClassMetadata +import java.net.JarURLConnection + // Kotlin compiles internal declarations, lambdas and anonymous objects to public bytecode, and keeps their real visibility -// only in @kotlin.Metadata. Drop them, so only the public Kotlin API is compared. +// only in @kotlin.Metadata. It also marks members that compiled callers still link to as synthetic. Compare only what a +// compiled Kotlin or Java caller can link to. -class KotlinVisibility { - boolean api - Set hiddenMembers +class ClassSide { + boolean ownApi + String outerName + Set hidden = [] as Set + Set apiMembers = [] as Set } def API = [Visibility.PUBLIC, Visibility.PROTECTED] as Set @@ -31,62 +38,128 @@ def readMetadata = { CtClass ctClass -> KotlinClassMetadata.readLenient(JvmMetadataUtil.Metadata(i('k'), ints('mv'), strs('d1'), strs('d2'), str('xs'), str('pn'), i('xi'))) } -def kotlinVisibility = { CtClass ctClass -> +def outerNameOf = { CtClass ctClass -> + def inner = (InnerClassesAttribute) ctClass.classFile.getAttribute(InnerClassesAttribute.tag) + def index = inner == null ? null : (0.. (accessFlags & AccessFlag.SYNTHETIC) != 0 } + +def classSide = { CtClass ctClass -> + def side = new ClassSide(ownApi: !isSynthetic(ctClass.classFile.accessFlags), outerName: outerNameOf(ctClass)) def md = readMetadata(ctClass) - if (md == null) return null - if (md instanceof KotlinClassMetadata.SyntheticClass) return new KotlinVisibility(api: false, hiddenMembers: [] as Set) - def hidden = [] as Set - def hide = { declaration, signature -> - if (signature && (declaration == null || !(Attributes.getVisibility(declaration) in API))) hidden << signature.name + signature.descriptor + if (md == null) return side + if (md instanceof KotlinClassMetadata.SyntheticClass) { + side.ownApi = false + return side + } + def owner = 'L' + ctClass.name.replace('.', '/') + ';' + // A caller that omits a default argument links to the synthetic name$default bridge, or the synthetic constructor + // that takes a DefaultConstructorMarker. + def defaultBridge = { declaration, signature, String receiver, String marker -> + if (!declaration.valueParameters.any { Attributes.getDeclaresDefaultValue(it) }) return null + def masks = 'I' * ((declaration.valueParameters.size() + 31).intdiv(32)) + def params = signature.descriptor.substring(1, signature.descriptor.indexOf(')')) + def name = signature.name == '' ? '' : signature.name + '$default' + name + '(' + receiver + params + masks + marker + signature.descriptor.substring(signature.descriptor.indexOf(')')) + } + def add = { declaration, signature, String bridge = null -> + if (signature == null) return + def api = declaration != null && Attributes.getVisibility(declaration) in API + if (!api) { + side.hidden << signature.name + signature.descriptor + return + } + side.apiMembers << signature.name + signature.descriptor + if (bridge != null) side.apiMembers << bridge + } + def addFunctions = { functions, String receiver -> + functions.each { f -> + def signature = JvmExtensionsKt.getSignature(f) + add(f, signature, signature == null ? null : defaultBridge(f, signature, receiver, 'Ljava/lang/Object;')) + } } - def addFunctions = { functions -> functions.each { hide(it, JvmExtensionsKt.getSignature(it)) } } def addProperties = { properties -> properties.each { p -> - hide(p.getter, JvmExtensionsKt.getGetterSignature(p)) - hide(p.setter, JvmExtensionsKt.getSetterSignature(p)) + add(p.getter, JvmExtensionsKt.getGetterSignature(p)) + add(p.setter, JvmExtensionsKt.getSetterSignature(p)) } } if (md instanceof KotlinClassMetadata.Class) { def km = md.kmClass - addFunctions(km.functions) + addFunctions(km.functions, owner) addProperties(km.properties) - km.constructors.each { hide(it, JvmExtensionsKt.getSignature(it)) } - return new KotlinVisibility(api: Attributes.getVisibility(km) in API, hiddenMembers: hidden) + km.constructors.each { c -> + def signature = JvmExtensionsKt.getSignature(c) + add(c, signature, signature == null ? null : defaultBridge(c, signature, '', 'Lkotlin/jvm/internal/DefaultConstructorMarker;')) + } + side.ownApi = side.ownApi && Attributes.getVisibility(km) in API } if (md instanceof KotlinClassMetadata.FileFacade || md instanceof KotlinClassMetadata.MultiFileClassPart) { - addFunctions(md.kmPackage.functions) + addFunctions(md.kmPackage.functions, '') addProperties(md.kmPackage.properties) + // A file facade holds only top-level declarations, so with none public it has nothing to link to. + side.ownApi = side.ownApi && !side.apiMembers.isEmpty() + } + side +} + +// japicmp hands this script only the classes, so the excludes come from its options and the version from the pom.properties +// maven-jar-plugin puts in the jar under comparison. +def excludes = jApiClasses.isEmpty() ? [] : jApiClasses.first().@options.filters.excludes*.toString().unique() +if (!excludes.isEmpty()) { + def newClass = jApiClasses.find { it.newClass.present }.newClass.get() + def jar = ((JarURLConnection) newClass.classPool.find(newClass.name).openConnection()).jarFile + def pomProperties = new Properties() + pomProperties.load(jar.getInputStream(jar.entries().find { it.name.startsWith('META-INF/maven/') && it.name.endsWith('/pom.properties') })) + def version = pomProperties.getProperty('version') + if (!(version ==~ /\d+\.0\.0(-SNAPSHOT)?/)) { + throw new IllegalStateException("japicmp-maven-plugin has at version ${version}, which compares against a " + + "release of the same major:\n" + excludes.collect { " ${it}" }.join('\n') + "\nExcludes are only for breaks planned for the next major, " + + "with the version set to that major's X.0.0-SNAPSHOT. Remove them and keep the old signature as a @Deprecated overload " + + "instead. In Kotlin, @Deprecated(level = DeprecationLevel.HIDDEN) keeps it for compiled callers only.") } - new KotlinVisibility(api: true, hiddenMembers: hidden) } def info = jApiClasses.collectEntries { c -> - [c.fullyQualifiedName, [old: c.oldClass.map { kotlinVisibility(it) }.orElse(null), new: c.newClass.map { kotlinVisibility(it) }.orElse(null)]] + [c.fullyQualifiedName, [old: c.oldClass.map { classSide(it) }.orElse(null), new: c.newClass.map { classSide(it) }.orElse(null)]] } -def isApiClass = { String name -> - def sides = [info[name]?.old, info[name]?.new].findAll { it != null } - sides.isEmpty() || sides.any { it.api } +// japicmp leaves out classes that aren't public in bytecode, such as a private Kotlin class, so a class whose outer class +// is missing here is nested in one of those. +def isApiOn +isApiOn = { String name, String sideName -> + def side = info[name]?.get(sideName) + side != null && side.ownApi && (side.outerName == null || isApiOn(side.outerName, sideName)) } -def nonApiNames = info.keySet().findAll { !isApiClass(it) } -def nestedInNonApi = { String name -> nonApiNames.any { name.startsWith(it + '$') } } +def isApiClass = { String name -> ['old', 'new'].any { isApiOn(name, it) } } -def hiddenOn = { side, CtBehavior b -> side != null && (b.methodInfo.name + b.methodInfo.descriptor) in side.hiddenMembers } -def isHidden = { d, Optional oldB, Optional newB -> - d != null && oldB.map { hiddenOn(d.old, it) }.orElse(true) && newB.map { hiddenOn(d.new, it) }.orElse(true) +def memberApiOn = { ClassSide side, String signature, int accessFlags -> + !(signature in side.hidden) && (!isSynthetic(accessFlags) || signature in side.apiMembers) +} +def behaviorApiOn = { ClassSide side, CtBehavior b -> memberApiOn(side, b.methodInfo.name + b.methodInfo.descriptor, b.methodInfo.accessFlags) } +def isApiBehavior = { d, Optional oldB, Optional newB -> + oldB.map { behaviorApiOn(d.old, it) }.orElse(false) || newB.map { behaviorApiOn(d.new, it) }.orElse(false) +} +def isApiField = { f -> + f.oldFieldOptional.map { !isSynthetic(it.fieldInfo2.accessFlags) }.orElse(false) || + f.newFieldOptional.map { !isSynthetic(it.fieldInfo2.accessFlags) }.orElse(false) } // japicmp ignores the list this script returns and reads the one it passed in, so edit that one in place. -def nonApiClass = { !isApiClass(it.fullyQualifiedName) || nestedInNonApi(it.fullyQualifiedName) } +def nonApiClass = { !isApiClass(it.fullyQualifiedName) } def droppedClasses = jApiClasses.count(nonApiClass) jApiClasses.removeIf(nonApiClass) def droppedMembers = 0 jApiClasses.each { c -> def d = info[c.fullyQualifiedName] - def hiddenMethod = { isHidden(d, it.oldMethod, it.newMethod) } - def hiddenConstructor = { isHidden(d, it.oldConstructor, it.newConstructor) } - droppedMembers += c.methods.count(hiddenMethod) + c.constructors.count(hiddenConstructor) - c.methods.removeIf(hiddenMethod) - c.constructors.removeIf(hiddenConstructor) + def nonApiMethod = { !isApiBehavior(d, it.oldMethod, it.newMethod) } + def nonApiConstructor = { !isApiBehavior(d, it.oldConstructor, it.newConstructor) } + def nonApiField = { !isApiField(it) } + droppedMembers += c.methods.count(nonApiMethod) + c.constructors.count(nonApiConstructor) + c.fields.count(nonApiField) + c.methods.removeIf(nonApiMethod) + c.constructors.removeIf(nonApiConstructor) + c.fields.removeIf(nonApiField) } println "[japicmp-kotlin-public] dropped ${droppedClasses} non-API classes and ${droppedMembers} non-API members" @@ -97,7 +170,7 @@ def isDataClass = { CtClass ct -> } def problems = [] info.each { name, d -> - if (d.old?.api && d.new != null && !d.new.api && !nestedInNonApi(name)) problems << " ${name}: public in the last release, now internal or private in Kotlin" + if (isApiOn(name, 'old') && d.new != null && !d.new.ownApi) problems << " ${name}: public in the last release, now internal or private in Kotlin" } jApiClasses.each { c -> def name = c.fullyQualifiedName @@ -111,17 +184,21 @@ jApiClasses.each { c -> c.fields.each { f -> breaking(f).each { lines << " ${name}#${f.name}: ${it}" } } if (lines.isEmpty()) return problems.addAll(lines) - if (isDataClass(c.oldClass.orElse(null)) && c.methods.any { it.name == 'copy' && !breaking(it).isEmpty() }) { + if (isDataClass(c.oldClass.orElse(null)) && c.methods.any { it.name.startsWith('copy') && !breaking(it).isEmpty() }) { problems << " -> ${name} is a Kotlin data class, so a new or changed property changes its constructor and copy() for " + - "compiled callers. Keep the old copy() as a @Deprecated(level = DeprecationLevel.HIDDEN) overload that forwards to the new " + - "one, and keep the old constructor with @JvmOverloads or a secondary constructor." + "compiled callers. Keep the old copy() as a @Deprecated(level = DeprecationLevel.HIDDEN) overload with the same " + + "default arguments that forwards to the new one, and keep the old constructor with @JvmOverloads or a secondary constructor." + } else if (lines.any { it.contains('$default(') || it.contains('kotlin.jvm.internal.DefaultConstructorMarker)') }) { + problems << " -> A name\$default method or a constructor ending in DefaultConstructorMarker is what Kotlin callers link to when " + + "they leave out a default argument. Keep the default argument. If the parameters changed, keep the old signature as a " + + "@Deprecated(level = DeprecationLevel.HIDDEN) overload with the same default arguments." } } if (!problems.isEmpty()) { throw new IllegalStateException("Binary-incompatible change to the public API since the last release:\n" + problems.join('\n') + "\nCode compiled against the last release fails with NoSuchMethodError or a similar linkage error. Keep the old signature " + "as a @Deprecated overload. In Kotlin, @Deprecated(level = DeprecationLevel.HIDDEN) keeps it for compiled callers only. " + - "If the break is planned for the next major, add the text before the colon as an under " + - "of japicmp-maven-plugin in pom.xml, with a TODO comment naming that major.") + "If the break is planned for the next major, set the version in pom.xml to that major's X.0.0-SNAPSHOT and add the text " + + "before the colon as an under of japicmp-maven-plugin, with a TODO comment naming that major.") } jApiClasses diff --git a/pom.xml b/pom.xml index 7e74e660..2c008a57 100644 --- a/pom.xml +++ b/pom.xml @@ -281,28 +281,37 @@ + - org.codehaus.mojo - exec-maven-plugin - 3.6.4 + org.apache.maven.plugins + maven-antrun-plugin + 3.2.0 check-jar verify - exec + run - ${java.home}/bin/java - runtime - - ${project.basedir}/build/JarCheck.java - ${project.build.directory}/${project.build.finalName}.jar - ${java.version} - - graphql.kickstart.tools.SchemaParser - graphql.kickstart.tools.proxy.GuiceAopProxyHandler - + + + + + + + + + + + + + + + + + @@ -315,7 +324,10 @@ \d+\.\d+\.\d+ + false true + + true true true From beeafe5cae0eab819c24bc92a6607da762ae8f4e Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 14:56:18 -0500 Subject: [PATCH 25/64] State the exit code of type-extensions-sealed --- .claude/skills/verify-tools/features/type-extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/skills/verify-tools/features/type-extensions.md b/.claude/skills/verify-tools/features/type-extensions.md index f8ff2d25..c6300561 100644 --- a/.claude/skills/verify-tools/features/type-extensions.md +++ b/.claude/skills/verify-tools/features/type-extensions.md @@ -39,7 +39,7 @@ ignored with a WARN. A union, enum, interface or scalar that only has extensions - **Repeated fields.** `run type-extensions-repeated-fields`. Exit `2`, and `summary.txt` has `schema build: FAILED graphql.kickstart.tools.SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls.` -- **Sealed.** `run type-extensions-sealed`. `01-pets-and-animals.json` has +- **Sealed.** `run type-extensions-sealed`. Exit `0`. `01-pets-and-animals.json` has `pets = [{"__typename": "Dog", "name": "Rex"}, {"__typename": "Cat", "lives": 9}]` and `animals` with a `Cow` and a `Horse`, with no WARN in `probe.log`. From 02d55f45f766eef9e49ad4b192f69f4743c730e5 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:00:55 -0500 Subject: [PATCH 26/64] Mark the API break and jar rules as enforced in AGENTS.md --- AGENTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 4714eb7a..e3ece8a8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -86,7 +86,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Argument conversion goes through one entry point | docs only | | An input field's Java type comes from the mapping Jackson uses, not from guessed getters | docs only | | Every recursive walk over the type graph handles cycles, and a test covers a cycle | docs only | -| Public signatures stay binary compatible, data class `copy()` and `componentN` included | docs only | +| Public signatures stay binary compatible, data class `copy()` and `componentN` included | japicmp with `build/japicmp-kotlin-public.groovy` at `mvn verify`, excludes only at an X.0.0 version | | Remove the plumbing a change leaves unused | Compiler warnings for unused locals, docs only for the rest | | A new warning or build error names the type and the item and uses `SourceLocation.describe()` for its location | docs only | | A check keyed on a class name or an exception type has a test that fails when the dependency moves it | docs only | @@ -102,7 +102,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | The first commit of a fix tests the neighbouring shapes, not just the reported one | docs only | | The build passes on JDK 17, the lowest supported version | CI on JDK 17, 21 and 25 | | Run verify-tools before you push a schema-building change | docs only | -| The packaged jar holds `module-info.class`, its non-static `requires` resolve from the runtime dependencies, and every class targets the pom's `java.version` | docs only | +| The packaged jar holds `module-info.class`, its non-static `requires` resolve from the runtime dependencies, and every class targets the pom's `java.version` | `build/JarCheck.java` at `mvn verify` | | Compiler warnings fail the build | `-Werror` and `failOnWarning` in `pom.xml` | | Check every claim in a PR body or release note at the current head | docs only | | Keep a comment only for a non-obvious why, with no history and no issue numbers outside a TODO | docs only | From 9c15610a5d5adbc9455d4c255f699fde38ad751d Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:17:15 -0500 Subject: [PATCH 27/64] Fail the API check when its options narrow it outside an X.0.0 version An empty comparison, , , a public-only or false hid a break the same way did. The message now covers excludes left over from a major that just shipped. --- AGENTS.md | 6 ++++-- build/japicmp-kotlin-public.groovy | 34 ++++++++++++++++++++++++------ pom.xml | 2 +- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e3ece8a8..f68d6de1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,7 +47,9 @@ Bugfixes and small features stop at this skill. ## Releases Follow the [Releasing a version](https://github.com/graphql-java-kickstart/graphql-java-tools/wiki/Releasing-a-version) wiki -page. `github-build.sh` and `.github/workflows/release.yml` do the version bump, tag and publish. +page. `github-build.sh` and `.github/workflows/release.yml` do the version bump, tag and publish. After an X.0.0 release, +delete the `` under japicmp-maven-plugin in `pom.xml`. The version is X.0.1-SNAPSHOT by then and the API check +fails while they remain. ## Rules that need judgment @@ -86,7 +88,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Argument conversion goes through one entry point | docs only | | An input field's Java type comes from the mapping Jackson uses, not from guessed getters | docs only | | Every recursive walk over the type graph handles cycles, and a test covers a cycle | docs only | -| Public signatures stay binary compatible, data class `copy()` and `componentN` included | japicmp with `build/japicmp-kotlin-public.groovy` at `mvn verify`, excludes only at an X.0.0 version | +| Public signatures stay binary compatible, data class `copy()` and `componentN` included | japicmp with `build/japicmp-kotlin-public.groovy` at `mvn verify`, which allows excludes and other narrowing options only at an X.0.0 version | | Remove the plumbing a change leaves unused | Compiler warnings for unused locals, docs only for the rest | | A new warning or build error names the type and the item and uses `SourceLocation.describe()` for its location | docs only | | A check keyed on a class name or an exception type has a test that fails when the dependency moves it | docs only | diff --git a/build/japicmp-kotlin-public.groovy b/build/japicmp-kotlin-public.groovy index e3f4fe14..c73ffee8 100644 --- a/build/japicmp-kotlin-public.groovy +++ b/build/japicmp-kotlin-public.groovy @@ -6,6 +6,7 @@ import javassist.bytecode.InnerClassesAttribute import javassist.bytecode.annotation.ArrayMemberValue import javassist.bytecode.annotation.IntegerMemberValue import javassist.bytecode.annotation.StringMemberValue +import japicmp.model.AccessModifier import kotlin.metadata.Attributes import kotlin.metadata.Visibility import kotlin.metadata.jvm.JvmExtensionsKt @@ -105,20 +106,39 @@ def classSide = { CtClass ctClass -> side } -// japicmp hands this script only the classes, so the excludes come from its options and the version from the pom.properties +// japicmp passes every class of both jars, filtered only by its options, so no classes means the options filter out the +// whole jar. +if (jApiClasses.isEmpty()) { + throw new IllegalStateException("japicmp-maven-plugin compared no classes, so its or leave out the " + + "whole jar and no break can fail the build. Remove them. A break planned for the next major gets an naming " + + "that member, with the version set to that major's X.0.0-SNAPSHOT.") +} + +// japicmp hands this script only the classes, so the options come from a class and the version from the pom.properties // maven-jar-plugin puts in the jar under comparison. -def excludes = jApiClasses.isEmpty() ? [] : jApiClasses.first().@options.filters.excludes*.toString().unique() -if (!excludes.isEmpty()) { +def options = jApiClasses.first().@options +def narrowing = [ + '' : options.filters.excludes*.toString().unique(), + '' : options.filters.includes*.toString().unique(), + '': options.overrideCompatibilityChanges.collect { + "${it.compatibilityChange} binaryCompatible=${it.binaryCompatible}" + }, + '' : options.accessModifier == AccessModifier.PROTECTED ? [] : [options.accessModifier.name()], + '' : options.includeSynthetic ? [] : ['false'], +].findAll { name, values -> !values.isEmpty() } +if (!narrowing.isEmpty()) { def newClass = jApiClasses.find { it.newClass.present }.newClass.get() def jar = ((JarURLConnection) newClass.classPool.find(newClass.name).openConnection()).jarFile def pomProperties = new Properties() pomProperties.load(jar.getInputStream(jar.entries().find { it.name.startsWith('META-INF/maven/') && it.name.endsWith('/pom.properties') })) def version = pomProperties.getProperty('version') if (!(version ==~ /\d+\.0\.0(-SNAPSHOT)?/)) { - throw new IllegalStateException("japicmp-maven-plugin has at version ${version}, which compares against a " + - "release of the same major:\n" + excludes.collect { " ${it}" }.join('\n') + "\nExcludes are only for breaks planned for the next major, " + - "with the version set to that major's X.0.0-SNAPSHOT. Remove them and keep the old signature as a @Deprecated overload " + - "instead. In Kotlin, @Deprecated(level = DeprecationLevel.HIDDEN) keeps it for compiled callers only.") + def major = version.substring(0, version.indexOf('.')) + throw new IllegalStateException("japicmp-maven-plugin narrows the API check at version ${version}, which is not an X.0.0 " + + "version:\n" + narrowing.collect { name, values -> " ${name}: ${values.join(', ')}" }.join('\n') + + "\nOnly a major's X.0.0-SNAPSHOT may narrow it, for the breaks that major plans. If these belong to the ${major}.0.0 " + + "release that just shipped, delete them. Otherwise delete them and keep the old signature as a @Deprecated overload. " + + "In Kotlin, @Deprecated(level = DeprecationLevel.HIDDEN) keeps it for compiled callers only.") } } diff --git a/pom.xml b/pom.xml index dbe3c467..65cf1627 100644 --- a/pom.xml +++ b/pom.xml @@ -284,7 +284,7 @@ - + org.apache.maven.plugins maven-antrun-plugin From 67a6399f22f61b01798180c22ccb421162f19ce6 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:22:09 -0500 Subject: [PATCH 28/64] Make CompatTest hard to pass by accident An accepted.txt line is now a literal case name, or a regex only when it starts with re:, and needs a reason that names an issue or release notes. A line that matches no failing case fails, and so does an empty capture, an empty scenario list, or a case that built on the release and isn't generated any more. In major mode a release WARN excuses a break only when it names the case's type and item, or the position of the directive the case applies. Errors keep their full message, so an InvalidSchemaException lists its reasons. The 15.0.0 capture is retaken for the longer error text; its cases, WARNs and built count are unchanged. --- .../kickstart/tools/compat/CompatTest.kt | 118 ++- .../kickstart/tools/compat/Variants.kt | 61 +- src/test/resources/compat/15.0.0/cases.tsv | 746 +++++++++--------- 3 files changed, 499 insertions(+), 426 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt index bc0e5927..4611de5e 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -14,7 +14,13 @@ import java.io.File class CompatTest { @Test fun `cases that built on the last release still build`() { - val outcomes = runAll() + // the tests run in the library's module, which neither reads logback's nor exports the scenarios to kotlin-reflect + val module = CompatTest::class.java.module + listOf("ch.qos.logback.classic", "ch.qos.logback.core").forEach { ModuleLayer.boot().findModule(it).ifPresent(module::addReads) } + ModuleLayer.boot().findModule("kotlin.reflect").ifPresent { module.addExports(Scenario::class.java.packageName, it) } + if (SCENARIOS.isEmpty()) return fail("No scenarios in ${Scenario::class.java.packageName}, so nothing is checked.") + val variants = SCENARIOS.flatMap(::variants) + val outcomes = runAll(variants) val version = pomVersion() if (System.getProperty("compat.capture") != null) { val dir = File(CAPTURES, version.toString()).apply { mkdirs() } @@ -27,44 +33,60 @@ class CompatTest { .filter { it.first <= version }.maxByOrNull { it.first } ?: return fail("No capture in $CAPTURES at or below $version. Capture the last release as AGENTS.md describes under Releases.") val released = read(File(dir, "cases.tsv")) + if (released.isEmpty()) return fail("$dir/cases.tsv is empty, so nothing is checked. Capture $release as AGENTS.md describes under Releases.") val acceptedFile = File(dir, "accepted.txt") - val accepted = acceptedFile.readLines().filter { it.isNotBlank() }.map { Regex(it.substringBefore('\t')) } + val accepted = readAccepted(acceptedFile) val major = version.major > release.major + val warnNames = variants.associate { it.key to it.warnNames } fun builtWithItsSeedOnRelease(key: CaseKey) = released[key.seed]?.built == true && released.getValue(key).built fun repeatsSeedBreak(key: CaseKey) = key != key.seed && outcomes[key.seed]?.error == outcomes.getValue(key).error - fun warnedOnRelease(key: CaseKey) = - (released.getValue(key).warnings - if (key == key.seed) emptySet() else released.getValue(key.seed).warnings.toSet()).isNotEmpty() + fun warnedOnRelease(key: CaseKey): Boolean { + val ownWarnings = released.getValue(key).warnings - if (key == key.seed) emptySet() else released.getValue(key.seed).warnings.toSet() + val names = warnNames.getValue(key).ifEmpty { namesIn(outcomes.getValue(key).error!!) } + return ownWarnings.any { warning -> names.all { alternatives -> alternatives.any { warning.names(it) } } } + } + fun isAccepted(key: CaseKey) = accepted.any { it.matches(key) } - val broke = released.keys.filter { builtWithItsSeedOnRelease(it) && outcomes[it]?.built == false } - .filterNot(::repeatsSeedBreak) - .filterNot { key -> accepted.any { it.containsMatchIn(key.toString()) } } - .filterNot { major && warnedOnRelease(it) } - if (broke.isEmpty()) return + val protected = released.keys.filter(::builtWithItsSeedOnRelease) + val missing = protected.filterNot(outcomes::containsKey) + val broken = protected.filter { outcomes[it]?.built == false }.filterNot(::repeatsSeedBreak) + val stale = accepted.filter { entry -> (missing + broken).none(entry::matches) } + val broke = broken.filterNot(::isAccepted).filterNot { major && warnedOnRelease(it) } + val gone = missing.filterNot(::isAccepted) + if (broke.isEmpty() && gone.isEmpty() && stale.isEmpty()) return val target = "${release.major + 1}.0.0" - val cases = broke.take(SHOWN).joinToString("\n") { " $it\n ${outcomes.getValue(it).error}" } + - if (broke.size > SHOWN) "\n and ${broke.size - SHOWN} more" else "" - val byOperator = broke.groupingBy { it.operator }.eachCount().toSortedMap() - val deliberate = "A deliberate break that the release notes list goes into $acceptedFile as a regex for the case, a tab, and the issue." - fail( - if (major) { - """ - |${broke.size} cases built on $release with no WARN of their own and throw now $byOperator. + val accept = "add a line to $acceptedFile with the case as listed here, a tab, and why, naming its issue (#N) or the release " + + "notes (\"X.Y.Z release notes\"). Start the case with $PATTERN to give a regex instead." + val deliberate = "For a deliberate break that the release notes list, $accept" + val brokeReport = when { + broke.isEmpty() -> null + major -> """ + |${broke.size} cases built on $release with no WARN that names them and throw now ${byOperator(broke)}. |A major may reject only input that the last minor warned about. Log a WARN that names the type and the item in a |${release.major}.x release first. $deliberate - |$cases + |${list(broke) { outcomes.getValue(it).error!! }} """.trimMargin() - } else { - """ - |${broke.size} cases built on $release and throw now $byOperator. + else -> """ + |${broke.size} cases built on $release and throw now ${byOperator(broke)}. |Invalid input that built on the last release keeps building until the next major (AGENTS.md, Compatibility). |Instead of throwing, log a WARN that names the type and the item, open a GitHub issue with $target in its title, |and leave `// TODO in $target (#N)`. $deliberate - |$cases + |${list(broke) { outcomes.getValue(it).error!! }} """.trimMargin() - } - ) + } + val goneReport = if (gone.isEmpty()) null else """ + |${gone.size} cases built on $release and aren't generated any more ${byOperator(gone)}, so nothing checks them. + |A scenario was renamed, removed, or its SDL changed. If that was deliberate, capture $release again with the scenarios + |you have: `git checkout v$release -- pom.xml src/main`, `mvn -B -ntp clean test -Dtest=CompatTest -Dcompat.capture`, + |then `git checkout HEAD -- pom.xml src/main`. Otherwise $accept + |${list(gone)} + """.trimMargin() + val staleReport = if (stale.isEmpty()) null else + "Lines in $acceptedFile that match no case that throws or is gone. Delete each one whose case builds again:\n" + + stale.joinToString("\n") { " line ${it.line}: ${it.case}" } + fail(listOfNotNull(brokeReport, goneReport, staleReport).joinToString("\n\n")) } } @@ -72,26 +94,59 @@ class Outcome(val error: String?, val warnings: List) { val built get() = error == null } +private class Accepted(val line: Int, val case: String) { + private val pattern = if (case.startsWith(PATTERN)) Regex(case.removePrefix(PATTERN)) else null + + fun matches(key: CaseKey) = pattern?.matches(key.toString()) ?: (case == key.toString()) +} + private val CAPTURES = File("src/test/resources/compat") private const val SHOWN = 50 +private const val PATTERN = "re:" +private val REFERENCE = Regex("#\\d+|\\d+\\.\\d+\\.\\d+ release notes") + +private fun readAccepted(file: File): List { + val problems = mutableListOf() + val accepted = file.readLines().withIndex().filter { it.value.isNotBlank() }.mapNotNull { (index, text) -> + val case = text.substringBefore('\t') + val reason = text.substringAfter('\t', "") + val problem = when { + !REFERENCE.containsMatchIn(reason) -> "needs a tab and a reason that names an issue (#N) or the release notes (\"X.Y.Z release notes\")" + case.startsWith(PATTERN) && runCatching { Regex(case.removePrefix(PATTERN)) }.isFailure -> "starts with $PATTERN but isn't a valid regex" + else -> null + } + problem?.let { problems += " line ${index + 1} $it: $text" } + if (problem == null) Accepted(index + 1, case) else null + } + if (problems.isNotEmpty()) fail("$file has lines the check can't use:\n${problems.joinToString("\n")}") + return accepted +} + +private fun byOperator(keys: List) = keys.groupingBy { it.operator }.eachCount().toSortedMap() + +private fun list(keys: List, detail: (CaseKey) -> String? = { null }) = + keys.take(SHOWN).joinToString("\n") { key -> " $key" + detail(key)?.let { "\n $it" }.orEmpty() } + + if (keys.size > SHOWN) "\n and ${keys.size - SHOWN} more" else "" + +// an error without a snippet to name the type and item names them itself, in quotes, or not at all +private fun namesIn(error: String): List> = + Regex("(? { - // the tests run in the library's module, which neither reads logback's nor exports the scenarios to kotlin-reflect - val module = CompatTest::class.java.module - listOf("ch.qos.logback.classic", "ch.qos.logback.core").forEach { ModuleLayer.boot().findModule(it).ifPresent(module::addReads) } - ModuleLayer.boot().findModule("kotlin.reflect").ifPresent { module.addExports(Scenario::class.java.packageName, it) } +private fun runAll(variants: List): Map { val logger = LoggerFactory.getLogger("graphql.kickstart.tools") as Logger val appender = ListAppender().apply { start() } logger.addAppender(appender) logger.isAdditive = false try { - return SCENARIOS.flatMap(::variants).associate { variant -> + return variants.associate { variant -> appender.list.clear() val error = try { variant.build() null } catch (e: Throwable) { - "${e.javaClass.simpleName}: ${normalize(e.message.orEmpty().lineSequence().first())}" + "${e.javaClass.simpleName}: ${normalize(e.message.orEmpty())}" } val warnings = appender.list.filter { it.level.isGreaterOrEqual(Level.WARN) }.map { normalize(it.formattedMessage) }.sorted() variant.key to Outcome(error, warnings) @@ -104,6 +159,7 @@ private fun runAll(): Map { private fun normalize(message: String) = message .replace(Regex("\\s+"), " ") + .trim() .replace(Regex("jdk\\.proxy\\d+\\.\\\$Proxy\\d+"), "jdk.proxyN.\\\$ProxyN") .replace(Regex("\\\$\\\$SpringCGLIB\\\$\\\$\\d+"), "\\\$\\\$SpringCGLIB\\\$\\\$N") .replace(Regex("@[0-9a-f]{5,}"), "@HASH") diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt index 06ca1d27..2930a9a2 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt @@ -25,18 +25,26 @@ data class CaseKey(val scenario: String, val operator: String, val snippet: Stri override fun toString() = listOf(scenario, operator, snippet).filter { it.isNotEmpty() }.joinToString(" | ") } -class Variant(val key: CaseKey, val build: () -> Unit) +/** + * [warnNames] is what a release's WARN has to name to count as a warning about this case: one name out of each set. Seed + * and proxy cases have none, because only their error says what broke. + */ +class Variant(val key: CaseKey, val warnNames: List>, val build: () -> Unit) fun variants(scenario: Scenario): List { - fun variant(operator: String, snippet: String = "", resolvers: () -> List> = { scenario.resolvers }) = - Variant(CaseKey(scenario.name, operator, snippet)) { - val builder = scenario.parser(resolvers()) - if (snippet.isNotEmpty()) builder.schemaString(snippet) - scenario.schema(builder.build()) - } + fun variant( + operator: String, + snippet: String = "", + warnNames: List> = emptyList(), + resolvers: () -> List> = { scenario.resolvers } + ) = Variant(CaseKey(scenario.name, operator, snippet), warnNames) { + val builder = scenario.parser(resolvers()) + if (snippet.isNotEmpty()) builder.schemaString(snippet) + scenario.schema(builder.build()) + } return listOf(variant("seed"), variant("proxy") { scenario.resolvers.map { ProxyFactory(it).proxy as GraphQLResolver<*> } }) + - snippets(scenario).map { (operator, snippet) -> variant(operator, snippet) } + snippets(scenario).map { (key, warnNames) -> variant(key.first, key.second, warnNames) } } private val KINDS: Map, String> = mapOf( @@ -52,50 +60,59 @@ private val LOCATIONS = mapOf("type" to "OBJECT", "interface" to "INTERFACE", "i private val SPECIFIED_BY = Parser().parseDocument("directive @specifiedBy(url: String!) on SCALAR").definitions.single() as DirectiveDefinition -private fun snippets(scenario: Scenario): Set> { +private fun snippets(scenario: Scenario): Map, List>> { val sdl = scenario.files.joinToString("\n") { Scenario::class.java.classLoader.getResource(it)!!.readText() } val definitions = Parser().parseDocument(sdl).definitions val types = definitions.filterIsInstance>().filter { it.javaClass in KINDS } val directives = definitions.filterIsInstance() + SPECIFIED_BY val objectNames = types.filterIsInstance().map { it.name } - setOf("Query", "Mutation", "Subscription") - val snippets = LinkedHashSet>() + val snippets = LinkedHashMap, List>>() for (type in types) { val kind = KINDS.getValue(type.javaClass) + fun add(operator: String, snippet: String, vararg warnNames: Set) = snippets.putIfAbsent(operator to snippet, warnNames.toList()) + // a WARN about a directive in an extension may point at the application instead of naming the type + fun addDirective(operator: String, directive: String, applications: String) { + val snippet = "extend $kind ${type.name} $applications" + val positions = Regex("@$directive\\b").findAll(snippet).map { "line 1, column ${it.range.first + 1}" } + add(operator, snippet, setOf(directive), setOf(type.name) + positions) + } + for (other in KINDS.values - kind) { when (other) { "enum" -> "extend enum ${type.name} { COMPAT_Z }" "union" -> objectNames.firstOrNull { it != type.name }?.let { "extend union ${type.name} = $it" } "scalar" -> "extend scalar ${type.name} @specifiedBy(url: \"https://example.com\")" else -> "extend $other ${type.name} { compatZ: String }" - }?.let { snippets += "kind" to it } + }?.let { add("kind", it, setOf(type.name)) } } - snippets += "undeclared" to "extend $kind ${type.name} @compatUndeclared" - firstMember(type)?.let { snippets += "repeat" to "extend $kind ${type.name} $it" } + addDirective("undeclared", "compatUndeclared", "@compatUndeclared") + firstMember(type)?.let { (name, member) -> add("repeat", "extend $kind ${type.name} $member", setOf(type.name), setOf(name)) } for (directive in directives) { + val name = directive.name if (LOCATIONS.getValue(kind) !in directive.directiveLocations.map { it.name }) { - snippets += "location" to "extend $kind ${type.name} @${directive.name}" + addDirective("location", name, "@$name") continue } for (argument in directive.inputValueDefinitions) { for (literal in wrongLiterals(argument.type)) { - snippets += "argval" to "extend $kind ${type.name} @${directive.name}(${argument.name}: $literal)" + addDirective("argval", name, "@$name(${argument.name}: $literal)") } } if (!directive.isRepeatable && directive.inputValueDefinitions.none { it.type is NonNullType && it.defaultValue == null }) { - snippets += "repeat-directive" to "extend $kind ${type.name} @${directive.name} @${directive.name}" + addDirective("repeat-directive", name, "@$name @$name") } } } return snippets } -private fun firstMember(type: TypeDefinition<*>): String? = when (type) { - is EnumTypeDefinition -> type.enumValueDefinitions.firstOrNull()?.let { "{ ${it.name} }" } - is UnionTypeDefinition -> type.memberTypes.firstOrNull()?.let { "= ${(it as TypeName).name}" } - is ObjectTypeDefinition -> type.fieldDefinitions.firstOrNull()?.let { "{ ${AstPrinter.printAst(it).oneLine()} }" } - is InterfaceTypeDefinition -> type.fieldDefinitions.firstOrNull()?.let { "{ ${AstPrinter.printAst(it).oneLine()} }" } - is InputObjectTypeDefinition -> type.inputValueDefinitions.firstOrNull()?.let { "{ ${AstPrinter.printAst(it).oneLine()} }" } +private fun firstMember(type: TypeDefinition<*>): Pair? = when (type) { + is EnumTypeDefinition -> type.enumValueDefinitions.firstOrNull()?.let { it.name to "{ ${it.name} }" } + is UnionTypeDefinition -> type.memberTypes.firstOrNull()?.let { (it as TypeName).name!! to "= ${it.name}" } + is ObjectTypeDefinition -> type.fieldDefinitions.firstOrNull()?.let { it.name to "{ ${AstPrinter.printAst(it).oneLine()} }" } + is InterfaceTypeDefinition -> type.fieldDefinitions.firstOrNull()?.let { it.name to "{ ${AstPrinter.printAst(it).oneLine()} }" } + is InputObjectTypeDefinition -> type.inputValueDefinitions.firstOrNull()?.let { it.name to "{ ${AstPrinter.printAst(it).oneLine()} }" } else -> null } diff --git a/src/test/resources/compat/15.0.0/cases.tsv b/src/test/resources/compat/15.0.0/cases.tsv index e191fc58..9987adb6 100644 --- a/src/test/resources/compat/15.0.0/cases.tsv +++ b/src/test/resources/compat/15.0.0/cases.tsv @@ -1,5 +1,5 @@ async seed BUILT -async proxy FieldResolverError: Field 'Query.future' resolves to graphql.kickstart.tools.compat.scenarios.AsyncQuery.future, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AsyncQuery, so every query of the field will fail. +async proxy FieldResolverError: Field 'Query.future' resolves to graphql.kickstart.tools.compat.scenarios.AsyncQuery.future, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AsyncQuery, so every query of the field will fail. Field 'Query.suspended' resolves to graphql.kickstart.tools.compat.scenarios.AsyncQuery.suspended, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AsyncQuery, so every query of the field will fail. Field 'Query.shipments' resolves to graphql.kickstart.tools.compat.scenarios.AsyncQuery.shipments, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AsyncQuery, so every query of the field will fail. Field 'Subscription.ticks' resolves to graphql.kickstart.tools.compat.scenarios.AsyncSubscription.ticks, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AsyncSubscription, so every query of the field will fail. Field 'Shipment.status' resolves to graphql.kickstart.tools.compat.scenarios.ShipmentResolver.status, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ShipmentResolver, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. async kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. async kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. async kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -7,14 +7,14 @@ async kind extend union Query = Shipment BUILT Type 'Query' is defined as an obj async kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. async undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. async repeat extend type Query { future: String! } SchemaError: Type 'Query' declares field 'future' more than once at line 1, column 21. -async location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +async location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. async kind extend interface Shipment { compatZ: String } BUILT Type 'Shipment' is defined as an object type, but extended as an interface. The extension is ignored. async kind extend input Shipment { compatZ: String } BUILT Type 'Shipment' is defined as an object type, but extended as an input object type. The extension is ignored. async kind extend enum Shipment { COMPAT_Z } BUILT Type 'Shipment' is defined as an object type, but extended as an enum. The extension is ignored. async kind extend scalar Shipment @specifiedBy(url: "https://example.com") BUILT Type 'Shipment' is defined as an object type, but extended as a scalar. The extension is ignored. async undeclared extend type Shipment @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. async repeat extend type Shipment { id: ID! } SchemaError: Type 'Shipment' declares field 'id' more than once at line 1, column 24. -async location extend type Shipment @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. +async location extend type Shipment @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 22 is missing its required argument 'url'. async kind extend interface Subscription { compatZ: String } BUILT Type 'Subscription' is defined as an object type, but extended as an interface. The extension is ignored. async kind extend input Subscription { compatZ: String } BUILT Type 'Subscription' is defined as an object type, but extended as an input object type. The extension is ignored. async kind extend enum Subscription { COMPAT_Z } BUILT Type 'Subscription' is defined as an object type, but extended as an enum. The extension is ignored. @@ -22,18 +22,18 @@ async kind extend union Subscription = Shipment BUILT Type 'Subscription' is def async kind extend scalar Subscription @specifiedBy(url: "https://example.com") BUILT Type 'Subscription' is defined as an object type, but extended as a scalar. The extension is ignored. async undeclared extend type Subscription @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. async repeat extend type Subscription { ticks(count: Int!): Int! } SchemaError: Type 'Subscription' declares field 'ticks' more than once at line 1, column 28. -async location extend type Subscription @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 26 is applied to OBJECT, but it's declared on SCALAR. +async location extend type Subscription @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 26 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 26 is missing its required argument 'url'. bookstore seed BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore proxy FieldResolverError: Field 'Query.books' resolves to graphql.kickstart.tools.compat.scenarios.BookstoreQuery.books, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.BookstoreQuery, so every query of the field will fail. +bookstore proxy FieldResolverError: Field 'Query.books' resolves to graphql.kickstart.tools.compat.scenarios.BookstoreQuery.books, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.BookstoreQuery, so every query of the field will fail. Field 'Query.book' resolves to graphql.kickstart.tools.compat.scenarios.BookstoreQuery.book, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.BookstoreQuery, so every query of the field will fail. Field 'Book.author' resolves to graphql.kickstart.tools.compat.scenarios.AuthorResolver.author, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.AuthorResolver, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. bookstore kind extend type Date { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. bookstore kind extend interface Date { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. bookstore kind extend input Date { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. bookstore kind extend enum Date { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. bookstore kind extend union Date = Book BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. bookstore undeclared extend scalar Date @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore argval extend scalar Date @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore argval extend scalar Date @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore argval extend scalar Date @specifiedBy(url: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore argval extend scalar Date @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore argval extend scalar Date @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore argval extend scalar Date @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore kind extend interface Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. bookstore kind extend input Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. bookstore kind extend enum Query { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -41,7 +41,7 @@ bookstore kind extend union Query = Book BUILT Schema type was defined but can n bookstore kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. bookstore undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore repeat extend type Query { books: [Book!]! } SchemaError: Type 'Query' declares field 'books' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore kind extend interface Book { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. bookstore kind extend input Book { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. bookstore kind extend enum Book { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. @@ -49,7 +49,7 @@ bookstore kind extend union Book = Author BUILT Schema type was defined but can bookstore kind extend scalar Book @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. bookstore undeclared extend type Book @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore repeat extend type Book { id: ID! } SchemaError: Type 'Book' declares field 'id' more than once at line 1, column 20. Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore location extend type Book @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Book @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore kind extend interface Author { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as an interface. The extension is ignored. bookstore kind extend input Author { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as an input object type. The extension is ignored. bookstore kind extend enum Author { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as an enum. The extension is ignored. @@ -57,7 +57,7 @@ bookstore kind extend union Author = Book BUILT Schema type was defined but can bookstore kind extend scalar Author @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Author' is defined as an object type, but extended as a scalar. The extension is ignored. bookstore undeclared extend type Author @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore repeat extend type Author { id: ID! } SchemaError: Type 'Author' declares field 'id' more than once at line 1, column 22. Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore location extend type Author @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Review +bookstore location extend type Author @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore kind extend interface Review { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as an interface. The extension is ignored. bookstore kind extend input Review { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as an input object type. The extension is ignored. bookstore kind extend enum Review { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review Type 'Review' is defined as an object type, but extended as an enum. The extension is ignored. @@ -66,51 +66,51 @@ bookstore kind extend scalar Review @specifiedBy(url: "https://example.com") BUI bookstore undeclared extend type Review @compatUndeclared BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore repeat extend type Review { stars: Int! } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review bookstore location extend type Review @specifiedBy BUILT Schema type was defined but can never be accessed, and can be safely deleted: Review -bookstore-missing-resolver seed FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver proxy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver kind extend type Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. -bookstore-missing-resolver kind extend interface Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. -bookstore-missing-resolver kind extend input Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. -bookstore-missing-resolver kind extend enum Date { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. -bookstore-missing-resolver kind extend union Date = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. -bookstore-missing-resolver undeclared extend scalar Date @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: 5) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: NOPE) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: null) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver kind extend interface Query { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -bookstore-missing-resolver kind extend input Query { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -bookstore-missing-resolver kind extend enum Query { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -bookstore-missing-resolver kind extend union Query = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. -bookstore-missing-resolver kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. -bookstore-missing-resolver undeclared extend type Query @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver repeat extend type Query { books: [Book!]! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver location extend type Query @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver kind extend interface Book { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. -bookstore-missing-resolver kind extend input Book { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. -bookstore-missing-resolver kind extend enum Book { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. -bookstore-missing-resolver kind extend union Book = Author FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as a union. The extension is ignored. -bookstore-missing-resolver kind extend scalar Book @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. -bookstore-missing-resolver undeclared extend type Book @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver repeat extend type Book { id: ID! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver location extend type Book @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver kind extend interface Author { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as an interface. The extension is ignored. -bookstore-missing-resolver kind extend input Author { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as an input object type. The extension is ignored. -bookstore-missing-resolver kind extend enum Author { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as an enum. The extension is ignored. -bookstore-missing-resolver kind extend union Author = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as a union. The extension is ignored. -bookstore-missing-resolver kind extend scalar Author @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Author' is defined as an object type, but extended as a scalar. The extension is ignored. -bookstore-missing-resolver undeclared extend type Author @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver repeat extend type Author { id: ID! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver location extend type Author @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver kind extend interface Review { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as an interface. The extension is ignored. -bookstore-missing-resolver kind extend input Review { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as an input object type. The extension is ignored. -bookstore-missing-resolver kind extend enum Review { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as an enum. The extension is ignored. -bookstore-missing-resolver kind extend union Review = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as a union. The extension is ignored. -bookstore-missing-resolver kind extend scalar Review @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Review' is defined as an object type, but extended as a scalar. The extension is ignored. -bookstore-missing-resolver undeclared extend type Review @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver repeat extend type Review { stars: Int! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -bookstore-missing-resolver location extend type Review @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +bookstore-missing-resolver seed FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver proxy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver kind extend type Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. +bookstore-missing-resolver kind extend interface Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Date { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Date { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Date = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. +bookstore-missing-resolver undeclared extend scalar Date @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: 5) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: NOPE) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver argval extend scalar Date @specifiedBy(url: null) FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver kind extend interface Query { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Query { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Query { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Query = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Query @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver repeat extend type Query { books: [Book!]! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver location extend type Query @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver kind extend interface Book { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Book { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Book { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Book = Author FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Book' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Book @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Book @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver repeat extend type Book { id: ID! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver location extend type Book @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver kind extend interface Author { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Author' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Author { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Author' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Author { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Author' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Author = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Author' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Author @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Author' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Author @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver repeat extend type Author { id: ID! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver location extend type Author @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver kind extend interface Review { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Review' is defined as an object type, but extended as an interface. The extension is ignored. +bookstore-missing-resolver kind extend input Review { compatZ: String } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Review' is defined as an object type, but extended as an input object type. The extension is ignored. +bookstore-missing-resolver kind extend enum Review { COMPAT_Z } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Review' is defined as an object type, but extended as an enum. The extension is ignored. +bookstore-missing-resolver kind extend union Review = Book FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Review' is defined as an object type, but extended as a union. The extension is ignored. +bookstore-missing-resolver kind extend scalar Review @specifiedBy(url: "https://example.com") FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() Type 'Review' is defined as an object type, but extended as a scalar. The extension is ignored. +bookstore-missing-resolver undeclared extend type Review @compatUndeclared FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver repeat extend type Review { stars: Int! } FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() +bookstore-missing-resolver location extend type Review @specifiedBy FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn(graphql.kickstart.tools.compat.scenarios.Book) graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn graphql.kickstart.tools.compat.scenarios.Book.isbn() graphql.kickstart.tools.compat.scenarios.Book.getIsbn() graphql.kickstart.tools.compat.scenarios.Book.isbn graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn() graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn() context-and-environment seed BUILT -context-and-environment proxy FieldResolverError: Field 'Query.greeting' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.greeting, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. +context-and-environment proxy FieldResolverError: Field 'Query.greeting' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.greeting, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. Field 'Query.farewell' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.farewell, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. Field 'Query.user' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.user, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. Field 'Query.environmentOnly' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.environmentOnly, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. Field 'Query.contextOnly' resolves to graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery.contextOnly, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentQuery, so every query of the field will fail. Field 'User.locale' resolves to graphql.kickstart.tools.compat.scenarios.UserResolver.locale, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.UserResolver, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. context-and-environment kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. context-and-environment kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. context-and-environment kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -118,23 +118,23 @@ context-and-environment kind extend union Query = User BUILT Type 'Query' is def context-and-environment kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. context-and-environment undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. context-and-environment repeat extend type Query { greeting(name: String!): String! } SchemaError: Type 'Query' declares field 'greeting' more than once at line 1, column 21. -context-and-environment location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +context-and-environment location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. context-and-environment kind extend interface User { compatZ: String } BUILT Type 'User' is defined as an object type, but extended as an interface. The extension is ignored. context-and-environment kind extend input User { compatZ: String } BUILT Type 'User' is defined as an object type, but extended as an input object type. The extension is ignored. context-and-environment kind extend enum User { COMPAT_Z } BUILT Type 'User' is defined as an object type, but extended as an enum. The extension is ignored. context-and-environment kind extend scalar User @specifiedBy(url: "https://example.com") BUILT Type 'User' is defined as an object type, but extended as a scalar. The extension is ignored. context-and-environment undeclared extend type User @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. context-and-environment repeat extend type User { name: String! } SchemaError: Type 'User' declares field 'name' more than once at line 1, column 20. -context-and-environment location extend type User @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. -context-and-environment-invalid seed FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: -context-and-environment-invalid proxy FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: -context-and-environment-invalid kind extend interface Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -context-and-environment-invalid kind extend input Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -context-and-environment-invalid kind extend enum Query { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -context-and-environment-invalid kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. -context-and-environment-invalid undeclared extend type Query @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: -context-and-environment-invalid repeat extend type Query { greeting(name: String!): String! } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: -context-and-environment-invalid location extend type Query @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: +context-and-environment location extend type User @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. +context-and-environment-invalid seed FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) +context-and-environment-invalid proxy FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) +context-and-environment-invalid kind extend interface Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +context-and-environment-invalid kind extend input Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +context-and-environment-invalid kind extend enum Query { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +context-and-environment-invalid kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +context-and-environment-invalid undeclared extend type Query @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) +context-and-environment-invalid repeat extend type Query { greeting(name: String!): String! } FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) +context-and-environment-invalid location extend type Query @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/context-and-environment-invalid/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class graphql.kickstart.tools.compat.scenarios.AppContext]), in priority order: graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.greeting(~name) graphql.kickstart.tools.compat.scenarios.ContextAndEnvironmentInvalidQuery.getGreeting(~name) context-misbound seed FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. context-misbound proxy FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. context-misbound kind extend interface Query { compatZ: String } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. @@ -153,7 +153,7 @@ context-misbound undeclared extend type User @compatUndeclared FieldResolverErro context-misbound repeat extend type User { name: String! } FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. context-misbound location extend type User @specifiedBy FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment parameter gets the argument instead. Add a parameter for each argument, in order, before the DataFetchingEnvironment parameter. directive-drift seed BUILT -directive-drift proxy FieldResolverError: Field 'Query.plain' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.plain, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. +directive-drift proxy FieldResolverError: Field 'Query.plain' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.plain, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.old' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.old, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.older' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.older, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.search' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.search, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.animal' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.animal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.pet' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.pet, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.color' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.color, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.when' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.when, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. Field 'Query.price' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery.price, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. directive-drift kind extend type Kind { compatZ: String } BUILT Type 'Kind' is defined as an enum, but extended as an object type. The extension is ignored. directive-drift kind extend interface Kind { compatZ: String } BUILT Type 'Kind' is defined as an enum, but extended as an interface. The extension is ignored. directive-drift kind extend input Kind { compatZ: String } BUILT Type 'Kind' is defined as an enum, but extended as an input object type. The extension is ignored. @@ -161,21 +161,21 @@ directive-drift kind extend union Kind = Dog BUILT Type 'Kind' is defined as an directive-drift kind extend scalar Kind @specifiedBy(url: "https://example.com") BUILT Type 'Kind' is defined as an enum, but extended as a scalar. The extension is ignored. directive-drift undeclared extend enum Kind @compatUndeclared BUILT directive-drift repeat extend enum Kind { PLAIN } SchemaError: Type 'Kind' declares value 'PLAIN' more than once at line 1, column 20. -directive-drift argval extend enum Kind @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend enum Kind @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend enum Kind @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Kind @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend enum Kind @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend enum Kind @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend enum Kind @tag(level: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. directive-drift argval extend enum Kind @tag(kind: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. directive-drift argval extend enum Kind @tag(kind: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. directive-drift argval extend enum Kind @tag(meta: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. directive-drift argval extend enum Kind @tag(meta: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. -directive-drift argval extend enum Kind @once(reason: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend enum Kind @once(reason: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Kind @once(reason: 5) InvalidSchemaException: invalid schema: Invalid argument 'reason' for applied directive of name 'once' +directive-drift argval extend enum Kind @once(reason: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'reason' for applied directive of name 'once' directive-drift repeat-directive extend enum Kind @once @once SchemaError: Directive @once at line 1, column 24 isn't repeatable but is applied more than once. -directive-drift location extend enum Kind @link SchemaError: Directive @link at line 1, column 18 is applied to ENUM, but it's declared on SCHEMA. +directive-drift location extend enum Kind @link SchemaError: Directive @link at line 1, column 18 is applied to ENUM, but it's declared on SCHEMA. Directive @link at line 1, column 18 is missing its required argument 'url'. directive-drift location extend enum Kind @argDoc SchemaError: Directive @argDoc at line 1, column 18 is applied to ENUM, but it's declared on FIELD_DEFINITION. directive-drift location extend enum Kind @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 18 is applied to ENUM, but it's declared on FIELD_DEFINITION. -directive-drift location extend enum Kind @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to ENUM, but it's declared on SCALAR. +directive-drift location extend enum Kind @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to ENUM, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. directive-drift kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. directive-drift kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. directive-drift kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -183,9 +183,9 @@ directive-drift kind extend union Query = Dog BUILT Type 'Query' is defined as a directive-drift kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. directive-drift undeclared extend type Query @compatUndeclared BUILT directive-drift repeat extend type Query { plain: String @tag(name: "plain", level: 2) @once(reason: "supplied") @fieldOnly @argDoc(note: "x") } SchemaError: Type 'Query' declares field 'plain' more than once at line 1, column 21. -directive-drift argval extend type Query @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend type Query @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend type Query @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend type Query @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend type Query @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend type Query @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend type Query @tag(level: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. directive-drift argval extend type Query @tag(kind: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. directive-drift argval extend type Query @tag(kind: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. @@ -194,10 +194,10 @@ directive-drift argval extend type Query @tag(meta: "x") SchemaError: Directive directive-drift argval extend type Query @once(reason: 5) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. directive-drift argval extend type Query @once(reason: NOPE) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. directive-drift repeat-directive extend type Query @once @once SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. -directive-drift location extend type Query @link SchemaError: Directive @link at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA. +directive-drift location extend type Query @link SchemaError: Directive @link at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA. Directive @link at line 1, column 19 is missing its required argument 'url'. directive-drift location extend type Query @argDoc SchemaError: Directive @argDoc at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. directive-drift location extend type Query @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -directive-drift location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +directive-drift location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. directive-drift kind extend type Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. directive-drift kind extend input Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. directive-drift kind extend enum Animal { COMPAT_Z } BUILT Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. @@ -205,9 +205,9 @@ directive-drift kind extend union Animal = Dog BUILT Type 'Animal' is defined as directive-drift kind extend scalar Animal @specifiedBy(url: "https://example.com") BUILT Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. directive-drift undeclared extend interface Animal @compatUndeclared BUILT directive-drift repeat extend interface Animal { name: String @once } SchemaError: Type 'Animal' declares field 'name' more than once at line 1, column 27. -directive-drift argval extend interface Animal @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend interface Animal @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend interface Animal @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend interface Animal @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend interface Animal @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend interface Animal @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend interface Animal @tag(level: "x") SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. directive-drift argval extend interface Animal @tag(kind: 5) SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. directive-drift argval extend interface Animal @tag(kind: "x") SchemaError: Directive @tag at line 1, column 25 is missing its required argument 'name'. @@ -216,31 +216,31 @@ directive-drift argval extend interface Animal @tag(meta: "x") SchemaError: Dire directive-drift argval extend interface Animal @once(reason: 5) SchemaError: Directive @once at line 1, column 25 isn't repeatable but is applied more than once. directive-drift argval extend interface Animal @once(reason: NOPE) SchemaError: Directive @once at line 1, column 25 isn't repeatable but is applied more than once. directive-drift repeat-directive extend interface Animal @once @once SchemaError: Directive @once at line 1, column 25 isn't repeatable but is applied more than once. -directive-drift location extend interface Animal @link SchemaError: Directive @link at line 1, column 25 is applied to INTERFACE, but it's declared on SCHEMA. +directive-drift location extend interface Animal @link SchemaError: Directive @link at line 1, column 25 is applied to INTERFACE, but it's declared on SCHEMA. Directive @link at line 1, column 25 is missing its required argument 'url'. directive-drift location extend interface Animal @argDoc SchemaError: Directive @argDoc at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. directive-drift location extend interface Animal @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. -directive-drift location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. +directive-drift location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. directive-drift kind extend interface Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. directive-drift kind extend input Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. directive-drift kind extend enum Dog { COMPAT_Z } BUILT Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. directive-drift kind extend scalar Dog @specifiedBy(url: "https://example.com") BUILT Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. directive-drift undeclared extend type Dog @compatUndeclared BUILT directive-drift repeat extend type Dog { name: String } SchemaError: Type 'Dog' declares field 'name' more than once at line 1, column 19. -directive-drift argval extend type Dog @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend type Dog @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend type Dog @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend type Dog @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend type Dog @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend type Dog @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend type Dog @tag(level: "x") SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. directive-drift argval extend type Dog @tag(kind: 5) SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. directive-drift argval extend type Dog @tag(kind: "x") SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. directive-drift argval extend type Dog @tag(meta: 5) SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. directive-drift argval extend type Dog @tag(meta: "x") SchemaError: Directive @tag at line 1, column 17 is missing its required argument 'name'. -directive-drift argval extend type Dog @once(reason: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend type Dog @once(reason: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend type Dog @once(reason: 5) InvalidSchemaException: invalid schema: Invalid argument 'reason' for applied directive of name 'once' +directive-drift argval extend type Dog @once(reason: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'reason' for applied directive of name 'once' directive-drift repeat-directive extend type Dog @once @once SchemaError: Directive @once at line 1, column 23 isn't repeatable but is applied more than once. -directive-drift location extend type Dog @link SchemaError: Directive @link at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. +directive-drift location extend type Dog @link SchemaError: Directive @link at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. Directive @link at line 1, column 17 is missing its required argument 'url'. directive-drift location extend type Dog @argDoc SchemaError: Directive @argDoc at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. directive-drift location extend type Dog @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -directive-drift location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +directive-drift location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 17 is missing its required argument 'url'. directive-drift kind extend type Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. directive-drift kind extend interface Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. directive-drift kind extend input Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. @@ -248,9 +248,9 @@ directive-drift kind extend enum Pet { COMPAT_Z } BUILT Type 'Pet' is defined as directive-drift kind extend scalar Pet @specifiedBy(url: "https://example.com") BUILT Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. directive-drift undeclared extend union Pet @compatUndeclared BUILT directive-drift repeat extend union Pet = Dog SchemaError: Type 'Pet' declares member 'Dog' more than once at line 1, column 20. -directive-drift argval extend union Pet @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend union Pet @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend union Pet @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend union Pet @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend union Pet @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend union Pet @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend union Pet @tag(level: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. directive-drift argval extend union Pet @tag(kind: 5) SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. directive-drift argval extend union Pet @tag(kind: "x") SchemaError: Directive @tag at line 1, column 18 is missing its required argument 'name'. @@ -259,10 +259,10 @@ directive-drift argval extend union Pet @tag(meta: "x") SchemaError: Directive @ directive-drift argval extend union Pet @once(reason: 5) SchemaError: Directive @once at line 1, column 18 isn't repeatable but is applied more than once. directive-drift argval extend union Pet @once(reason: NOPE) SchemaError: Directive @once at line 1, column 18 isn't repeatable but is applied more than once. directive-drift repeat-directive extend union Pet @once @once SchemaError: Directive @once at line 1, column 18 isn't repeatable but is applied more than once. -directive-drift location extend union Pet @link SchemaError: Directive @link at line 1, column 18 is applied to UNION, but it's declared on SCHEMA. +directive-drift location extend union Pet @link SchemaError: Directive @link at line 1, column 18 is applied to UNION, but it's declared on SCHEMA. Directive @link at line 1, column 18 is missing its required argument 'url'. directive-drift location extend union Pet @argDoc SchemaError: Directive @argDoc at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. directive-drift location extend union Pet @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. -directive-drift location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. +directive-drift location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. directive-drift kind extend type Color { compatZ: String } BUILT Type 'Color' is defined as an enum, but extended as an object type. The extension is ignored. directive-drift kind extend interface Color { compatZ: String } BUILT Type 'Color' is defined as an enum, but extended as an interface. The extension is ignored. directive-drift kind extend input Color { compatZ: String } BUILT Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored. @@ -270,9 +270,9 @@ directive-drift kind extend union Color = Dog BUILT Type 'Color' is defined as a directive-drift kind extend scalar Color @specifiedBy(url: "https://example.com") BUILT Type 'Color' is defined as an enum, but extended as a scalar. The extension is ignored. directive-drift undeclared extend enum Color @compatUndeclared BUILT directive-drift repeat extend enum Color { RED } SchemaError: Type 'Color' declares value 'RED' more than once at line 1, column 21. -directive-drift argval extend enum Color @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend enum Color @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend enum Color @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend enum Color @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend enum Color @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend enum Color @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend enum Color @tag(level: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. directive-drift argval extend enum Color @tag(kind: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. directive-drift argval extend enum Color @tag(kind: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. @@ -281,10 +281,10 @@ directive-drift argval extend enum Color @tag(meta: "x") SchemaError: Directive directive-drift argval extend enum Color @once(reason: 5) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. directive-drift argval extend enum Color @once(reason: NOPE) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. directive-drift repeat-directive extend enum Color @once @once SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. -directive-drift location extend enum Color @link SchemaError: Directive @link at line 1, column 19 is applied to ENUM, but it's declared on SCHEMA. +directive-drift location extend enum Color @link SchemaError: Directive @link at line 1, column 19 is applied to ENUM, but it's declared on SCHEMA. Directive @link at line 1, column 19 is missing its required argument 'url'. directive-drift location extend enum Color @argDoc SchemaError: Directive @argDoc at line 1, column 19 is applied to ENUM, but it's declared on FIELD_DEFINITION. directive-drift location extend enum Color @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 19 is applied to ENUM, but it's declared on FIELD_DEFINITION. -directive-drift location extend enum Color @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. +directive-drift location extend enum Color @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. directive-drift kind extend type Meta { compatZ: String } BUILT Type 'Meta' is defined as an input object type, but extended as an object type. The extension is ignored. directive-drift kind extend interface Meta { compatZ: String } BUILT Type 'Meta' is defined as an input object type, but extended as an interface. The extension is ignored. directive-drift kind extend enum Meta { COMPAT_Z } BUILT Type 'Meta' is defined as an input object type, but extended as an enum. The extension is ignored. @@ -292,9 +292,9 @@ directive-drift kind extend union Meta = Dog BUILT Type 'Meta' is defined as an directive-drift kind extend scalar Meta @specifiedBy(url: "https://example.com") BUILT Type 'Meta' is defined as an input object type, but extended as a scalar. The extension is ignored. directive-drift undeclared extend input Meta @compatUndeclared BUILT directive-drift repeat extend input Meta { owner: String @once(reason: "x") } SchemaError: Type 'Meta' declares field 'owner' more than once at line 1, column 21. -directive-drift argval extend input Meta @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend input Meta @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend input Meta @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend input Meta @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend input Meta @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend input Meta @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend input Meta @tag(level: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. directive-drift argval extend input Meta @tag(kind: 5) SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. directive-drift argval extend input Meta @tag(kind: "x") SchemaError: Directive @tag at line 1, column 19 is missing its required argument 'name'. @@ -303,19 +303,19 @@ directive-drift argval extend input Meta @tag(meta: "x") SchemaError: Directive directive-drift argval extend input Meta @once(reason: 5) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. directive-drift argval extend input Meta @once(reason: NOPE) SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. directive-drift repeat-directive extend input Meta @once @once SchemaError: Directive @once at line 1, column 19 isn't repeatable but is applied more than once. -directive-drift location extend input Meta @link SchemaError: Directive @link at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on SCHEMA. +directive-drift location extend input Meta @link SchemaError: Directive @link at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on SCHEMA. Directive @link at line 1, column 19 is missing its required argument 'url'. directive-drift location extend input Meta @argDoc SchemaError: Directive @argDoc at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION. directive-drift location extend input Meta @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION. -directive-drift location extend input Meta @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on SCALAR. +directive-drift location extend input Meta @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. directive-drift kind extend type Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. directive-drift kind extend interface Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. directive-drift kind extend input Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. directive-drift kind extend enum Date { COMPAT_Z } BUILT Type 'Date' is defined as a scalar, but extended as an enum. The extension is ignored. directive-drift kind extend union Date = Dog BUILT Type 'Date' is defined as a scalar, but extended as a union. The extension is ignored. directive-drift undeclared extend scalar Date @compatUndeclared BUILT -directive-drift argval extend scalar Date @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Date @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Date @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Date @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend scalar Date @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend scalar Date @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend scalar Date @tag(level: "x") SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. directive-drift argval extend scalar Date @tag(kind: 5) SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. directive-drift argval extend scalar Date @tag(kind: "x") SchemaError: Directive @tag at line 1, column 20 is missing its required argument 'name'. @@ -324,7 +324,7 @@ directive-drift argval extend scalar Date @tag(meta: "x") SchemaError: Directive directive-drift argval extend scalar Date @once(reason: 5) SchemaError: Directive @once at line 1, column 20 isn't repeatable but is applied more than once. directive-drift argval extend scalar Date @once(reason: NOPE) SchemaError: Directive @once at line 1, column 20 isn't repeatable but is applied more than once. directive-drift repeat-directive extend scalar Date @once @once SchemaError: Directive @once at line 1, column 20 isn't repeatable but is applied more than once. -directive-drift location extend scalar Date @link SchemaError: Directive @link at line 1, column 20 is applied to SCALAR, but it's declared on SCHEMA. +directive-drift location extend scalar Date @link SchemaError: Directive @link at line 1, column 20 is applied to SCALAR, but it's declared on SCHEMA. Directive @link at line 1, column 20 is missing its required argument 'url'. directive-drift location extend scalar Date @argDoc SchemaError: Directive @argDoc at line 1, column 20 is applied to SCALAR, but it's declared on FIELD_DEFINITION. directive-drift location extend scalar Date @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 20 is applied to SCALAR, but it's declared on FIELD_DEFINITION. directive-drift argval extend scalar Date @specifiedBy(url: 5) SchemaError: Directive @specifiedBy at line 1, column 20 isn't repeatable but is applied more than once. @@ -336,25 +336,25 @@ directive-drift kind extend input Money { compatZ: String } BUILT Type 'Money' i directive-drift kind extend enum Money { COMPAT_Z } BUILT Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. directive-drift kind extend union Money = Dog BUILT Type 'Money' is defined as a scalar, but extended as a union. The extension is ignored. directive-drift undeclared extend scalar Money @compatUndeclared BUILT -directive-drift argval extend scalar Money @tag(name: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Money @tag(name: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Money @tag(name: null) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend scalar Money @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' +directive-drift argval extend scalar Money @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' directive-drift argval extend scalar Money @tag(level: "x") SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. directive-drift argval extend scalar Money @tag(kind: 5) SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. directive-drift argval extend scalar Money @tag(kind: "x") SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. directive-drift argval extend scalar Money @tag(meta: 5) SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. directive-drift argval extend scalar Money @tag(meta: "x") SchemaError: Directive @tag at line 1, column 21 is missing its required argument 'name'. -directive-drift argval extend scalar Money @once(reason: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Money @once(reason: NOPE) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @once(reason: 5) InvalidSchemaException: invalid schema: Invalid argument 'reason' for applied directive of name 'once' +directive-drift argval extend scalar Money @once(reason: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'reason' for applied directive of name 'once' directive-drift repeat-directive extend scalar Money @once @once SchemaError: Directive @once at line 1, column 27 isn't repeatable but is applied more than once. -directive-drift location extend scalar Money @link SchemaError: Directive @link at line 1, column 21 is applied to SCALAR, but it's declared on SCHEMA. +directive-drift location extend scalar Money @link SchemaError: Directive @link at line 1, column 21 is applied to SCALAR, but it's declared on SCHEMA. Directive @link at line 1, column 21 is missing its required argument 'url'. directive-drift location extend scalar Money @argDoc SchemaError: Directive @argDoc at line 1, column 21 is applied to SCALAR, but it's declared on FIELD_DEFINITION. directive-drift location extend scalar Money @fieldOnly SchemaError: Directive @fieldOnly at line 1, column 21 is applied to SCALAR, but it's declared on FIELD_DEFINITION. -directive-drift argval extend scalar Money @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Money @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -directive-drift argval extend scalar Money @specifiedBy(url: null) InvalidSchemaException: invalid schema: +directive-drift argval extend scalar Money @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +directive-drift argval extend scalar Money @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +directive-drift argval extend scalar Money @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' directive-drift-undeclared seed SchemaError: Found applied directive undeclared without corresponding directive definition. -directive-drift-undeclared proxy FieldResolverError: Field 'Query.a' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField.a, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField, so every query of the field will fail. +directive-drift-undeclared proxy FieldResolverError: Field 'Query.a' resolves to graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField.a, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectiveDriftOneField, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. directive-drift-undeclared kind extend interface Query { compatZ: String } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. directive-drift-undeclared kind extend input Query { compatZ: String } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. directive-drift-undeclared kind extend enum Query { COMPAT_Z } SchemaError: Found applied directive undeclared without corresponding directive definition. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -363,7 +363,7 @@ directive-drift-undeclared undeclared extend type Query @compatUndeclared Schema directive-drift-undeclared repeat extend type Query { a: String @undeclared(s: "x") } SchemaError: Type 'Query' declares field 'a' more than once at line 1, column 21. directive-drift-undeclared location extend type Query @specifiedBy SchemaError: Found applied directive undeclared without corresponding directive definition. directives seed BUILT -directives proxy FieldResolverError: Field 'Query.motto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesQuery.motto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesQuery, so every query of the field will fail. +directives proxy FieldResolverError: Field 'Query.motto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesQuery.motto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesQuery, so every query of the field will fail. Field 'Query.oldMotto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesQuery.oldMotto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesQuery, so every query of the field will fail. Field 'Query.members' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesQuery.members, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. directives kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. directives kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. directives kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -372,8 +372,8 @@ directives kind extend scalar Query @specifiedBy(url: "https://example.com") BUI directives undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. directives repeat extend type Query { motto: String! @uppercase } SchemaError: Type 'Query' declares field 'motto' more than once at line 1, column 21. directives location extend type Query @uppercase SchemaError: Directive @uppercase at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -directives location extend type Query @connection SchemaError: Directive @connection at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -directives location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +directives location extend type Query @connection SchemaError: Directive @connection at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @connection at line 1, column 19 is missing its required argument 'for'. +directives location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. directives kind extend interface Member { compatZ: String } BUILT Type 'Member' is defined as an object type, but extended as an interface. The extension is ignored. directives kind extend input Member { compatZ: String } BUILT Type 'Member' is defined as an object type, but extended as an input object type. The extension is ignored. directives kind extend enum Member { COMPAT_Z } BUILT Type 'Member' is defined as an object type, but extended as an enum. The extension is ignored. @@ -381,49 +381,49 @@ directives kind extend scalar Member @specifiedBy(url: "https://example.com") BU directives undeclared extend type Member @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. directives repeat extend type Member { id: ID! } SchemaError: Type 'Member' declares field 'id' more than once at line 1, column 22. directives location extend type Member @uppercase SchemaError: Directive @uppercase at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -directives location extend type Member @connection SchemaError: Directive @connection at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -directives location extend type Member @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. -directives-invalid seed SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid proxy FieldResolverError: Field 'Query.motto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery.motto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery, so every query of the field will fail. -directives-invalid kind extend interface Query { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -directives-invalid kind extend input Query { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -directives-invalid kind extend enum Query { COMPAT_Z } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -directives-invalid kind extend union Query = Member SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. -directives-invalid kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +directives location extend type Member @connection SchemaError: Directive @connection at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @connection at line 1, column 20 is missing its required argument 'for'. +directives location extend type Member @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. +directives-invalid seed SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid proxy FieldResolverError: Field 'Query.motto' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery.motto, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery, so every query of the field will fail. Field 'Query.secret' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery.secret, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery, so every query of the field will fail. Field 'Query.members' resolves to graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery.members, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.DirectivesInvalidQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. +directives-invalid kind extend interface Query { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +directives-invalid kind extend input Query { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +directives-invalid kind extend enum Query { COMPAT_Z } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +directives-invalid kind extend union Query = Member SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +directives-invalid kind extend scalar Query @specifiedBy(url: "https://example.com") SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. directives-invalid undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. directives-invalid repeat extend type Query { motto: String! @uppercase } SchemaError: Type 'Query' declares field 'motto' more than once at line 1, column 21. -directives-invalid repeat-directive extend type Query @uppercase @uppercase SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid location extend type Query @auth SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid location extend type Query @cached SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid location extend type Query @specifiedBy SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid kind extend interface Member { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as an interface. The extension is ignored. -directives-invalid kind extend input Member { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as an input object type. The extension is ignored. -directives-invalid kind extend enum Member { COMPAT_Z } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as an enum. The extension is ignored. -directives-invalid kind extend scalar Member @specifiedBy(url: "https://example.com") SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Type 'Member' is defined as an object type, but extended as a scalar. The extension is ignored. +directives-invalid repeat-directive extend type Query @uppercase @uppercase SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 1, column 30 isn't repeatable but is applied more than once. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid location extend type Query @auth SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @auth at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @auth at line 1, column 19 is missing its required argument 'role'. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid location extend type Query @cached SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @cached at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA | FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid location extend type Query @specifiedBy SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid kind extend interface Member { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Member' is defined as an object type, but extended as an interface. The extension is ignored. +directives-invalid kind extend input Member { compatZ: String } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Member' is defined as an object type, but extended as an input object type. The extension is ignored. +directives-invalid kind extend enum Member { COMPAT_Z } SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Member' is defined as an object type, but extended as an enum. The extension is ignored. +directives-invalid kind extend scalar Member @specifiedBy(url: "https://example.com") SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Type 'Member' is defined as an object type, but extended as a scalar. The extension is ignored. directives-invalid undeclared extend type Member @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. directives-invalid repeat extend type Member { id: ID! } SchemaError: Type 'Member' declares field 'id' more than once at line 1, column 22. -directives-invalid repeat-directive extend type Member @uppercase @uppercase SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid location extend type Member @auth SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid location extend type Member @cached SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. -directives-invalid location extend type Member @specifiedBy SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. +directives-invalid repeat-directive extend type Member @uppercase @uppercase SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @uppercase at line 1, column 31 isn't repeatable but is applied more than once. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid location extend type Member @auth SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @auth at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @auth at line 1, column 20 is missing its required argument 'role'. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid location extend type Member @cached SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @cached at line 1, column 20 is applied to OBJECT, but it's declared on SCHEMA | FIELD_DEFINITION. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. +directives-invalid location extend type Member @specifiedBy SchemaError: Directive @deprecated at line 17, column 13 in compat/scenarios/directives-invalid/schema.graphqls is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION. Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. Directive @uppercase at line 12, column 20 in compat/scenarios/directives-invalid/schema.graphqls is applied to FIELD_DEFINITION, but it's declared on OBJECT. Directive @auth at line 13, column 20 in compat/scenarios/directives-invalid/schema.graphqls is missing its required argument 'role'. Directive @cached at line 14, column 32 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. Directive @cached at line 9, column 15 in compat/scenarios/directives-invalid/schema.graphqls isn't repeatable but is applied more than once. generic-input-resolver seed BUILT -generic-input-resolver proxy FieldResolverError: Field 'Query.generic' resolves to graphql.kickstart.tools.compat.scenarios.InputResolver.generic, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputResolver, so every query of the field will fail. +generic-input-resolver proxy FieldResolverError: Field 'Query.generic' resolves to graphql.kickstart.tools.compat.scenarios.InputResolver.generic, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputResolver, so every query of the field will fail. Field 'Query.plain' resolves to graphql.kickstart.tools.compat.scenarios.GreetingQuery.plain, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.GreetingQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. generic-input-resolver kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. generic-input-resolver kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. generic-input-resolver kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. generic-input-resolver kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. generic-input-resolver undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. generic-input-resolver repeat extend type Query { generic(input: GreetingInput!): String! } SchemaError: Type 'Query' declares field 'generic' more than once at line 1, column 21. -generic-input-resolver location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +generic-input-resolver location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. generic-input-resolver kind extend type GreetingInput { compatZ: String } BUILT Type 'GreetingInput' is defined as an input object type, but extended as an object type. The extension is ignored. generic-input-resolver kind extend interface GreetingInput { compatZ: String } BUILT Type 'GreetingInput' is defined as an input object type, but extended as an interface. The extension is ignored. generic-input-resolver kind extend enum GreetingInput { COMPAT_Z } BUILT Type 'GreetingInput' is defined as an input object type, but extended as an enum. The extension is ignored. generic-input-resolver kind extend scalar GreetingInput @specifiedBy(url: "https://example.com") BUILT Type 'GreetingInput' is defined as an input object type, but extended as a scalar. The extension is ignored. generic-input-resolver undeclared extend input GreetingInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. generic-input-resolver repeat extend input GreetingInput { name: String! } SchemaError: Type 'GreetingInput' declares field 'name' more than once at line 1, column 30. -generic-input-resolver location extend input GreetingInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 28 is applied to INPUT_OBJECT, but it's declared on SCALAR. +generic-input-resolver location extend input GreetingInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 28 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 28 is missing its required argument 'url'. inputs seed BUILT -inputs proxy FieldResolverError: Field 'Query.search' resolves to graphql.kickstart.tools.compat.scenarios.InputsQuery.search, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputsQuery, so every query of the field will fail. +inputs proxy FieldResolverError: Field 'Query.search' resolves to graphql.kickstart.tools.compat.scenarios.InputsQuery.search, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputsQuery, so every query of the field will fail. Field 'Query.nickname' resolves to graphql.kickstart.tools.compat.scenarios.InputsQuery.nickname, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputsQuery, so every query of the field will fail. Field 'Mutation.addBook' resolves to graphql.kickstart.tools.compat.scenarios.InputsMutation.addBook, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.InputsMutation, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. inputs kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. inputs kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. inputs kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -431,7 +431,7 @@ inputs kind extend union Query = SavedBook BUILT Type 'Query' is defined as an o inputs kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. inputs undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. inputs repeat extend type Query { search(term: String!, limit: Int = 10, genres: [Genre!]): String! } SchemaError: Type 'Query' declares field 'search' more than once at line 1, column 21. -inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. inputs kind extend interface Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an interface. The extension is ignored. inputs kind extend input Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an input object type. The extension is ignored. inputs kind extend enum Mutation { COMPAT_Z } BUILT Type 'Mutation' is defined as an object type, but extended as an enum. The extension is ignored. @@ -439,7 +439,7 @@ inputs kind extend union Mutation = SavedBook BUILT Type 'Mutation' is defined a inputs kind extend scalar Mutation @specifiedBy(url: "https://example.com") BUILT Type 'Mutation' is defined as an object type, but extended as a scalar. The extension is ignored. inputs undeclared extend type Mutation @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. inputs repeat extend type Mutation { addBook(input: BookInput!): SavedBook! } SchemaError: Type 'Mutation' declares field 'addBook' more than once at line 1, column 24. -inputs location extend type Mutation @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. +inputs location extend type Mutation @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 22 is missing its required argument 'url'. inputs kind extend type Genre { compatZ: String } BUILT Type 'Genre' is defined as an enum, but extended as an object type. The extension is ignored. inputs kind extend interface Genre { compatZ: String } BUILT Type 'Genre' is defined as an enum, but extended as an interface. The extension is ignored. inputs kind extend input Genre { compatZ: String } BUILT Type 'Genre' is defined as an enum, but extended as an input object type. The extension is ignored. @@ -447,7 +447,7 @@ inputs kind extend union Genre = SavedBook BUILT Type 'Genre' is defined as an e inputs kind extend scalar Genre @specifiedBy(url: "https://example.com") BUILT Type 'Genre' is defined as an enum, but extended as a scalar. The extension is ignored. inputs undeclared extend enum Genre @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. inputs repeat extend enum Genre { FICTION } SchemaError: Type 'Genre' declares value 'FICTION' more than once at line 1, column 21. -inputs location extend enum Genre @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. +inputs location extend enum Genre @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. inputs kind extend type BookInput { compatZ: String } BUILT Type 'BookInput' is defined as an input object type, but extended as an object type. The extension is ignored. inputs kind extend interface BookInput { compatZ: String } BUILT Type 'BookInput' is defined as an input object type, but extended as an interface. The extension is ignored. inputs kind extend enum BookInput { COMPAT_Z } BUILT Type 'BookInput' is defined as an input object type, but extended as an enum. The extension is ignored. @@ -455,7 +455,7 @@ inputs kind extend union BookInput = SavedBook BUILT Type 'BookInput' is defined inputs kind extend scalar BookInput @specifiedBy(url: "https://example.com") BUILT Type 'BookInput' is defined as an input object type, but extended as a scalar. The extension is ignored. inputs undeclared extend input BookInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. inputs repeat extend input BookInput { title: String! } SchemaError: Type 'BookInput' declares field 'title' more than once at line 1, column 26. -inputs location extend input BookInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. +inputs location extend input BookInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 24 is missing its required argument 'url'. inputs kind extend type DetailsInput { compatZ: String } BUILT Type 'DetailsInput' is defined as an input object type, but extended as an object type. The extension is ignored. inputs kind extend interface DetailsInput { compatZ: String } BUILT Type 'DetailsInput' is defined as an input object type, but extended as an interface. The extension is ignored. inputs kind extend enum DetailsInput { COMPAT_Z } BUILT Type 'DetailsInput' is defined as an input object type, but extended as an enum. The extension is ignored. @@ -463,23 +463,23 @@ inputs kind extend union DetailsInput = SavedBook BUILT Type 'DetailsInput' is d inputs kind extend scalar DetailsInput @specifiedBy(url: "https://example.com") BUILT Type 'DetailsInput' is defined as an input object type, but extended as a scalar. The extension is ignored. inputs undeclared extend input DetailsInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. inputs repeat extend input DetailsInput { pages: Int! } SchemaError: Type 'DetailsInput' declares field 'pages' more than once at line 1, column 29. -inputs location extend input DetailsInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to INPUT_OBJECT, but it's declared on SCALAR. +inputs location extend input DetailsInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 27 is missing its required argument 'url'. inputs kind extend interface SavedBook { compatZ: String } BUILT Type 'SavedBook' is defined as an object type, but extended as an interface. The extension is ignored. inputs kind extend input SavedBook { compatZ: String } BUILT Type 'SavedBook' is defined as an object type, but extended as an input object type. The extension is ignored. inputs kind extend enum SavedBook { COMPAT_Z } BUILT Type 'SavedBook' is defined as an object type, but extended as an enum. The extension is ignored. inputs kind extend scalar SavedBook @specifiedBy(url: "https://example.com") BUILT Type 'SavedBook' is defined as an object type, but extended as a scalar. The extension is ignored. inputs undeclared extend type SavedBook @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. inputs repeat extend type SavedBook { title: String! } SchemaError: Type 'SavedBook' declares field 'title' more than once at line 1, column 25. -inputs location extend type SavedBook @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to OBJECT, but it's declared on SCALAR. -jdk-proxy seed FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. -jdk-proxy proxy FieldResolverError: No method or field found as defined in schema compat/scenarios/jdk-proxy/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -jdk-proxy kind extend interface Query { compatZ: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -jdk-proxy kind extend input Query { compatZ: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -jdk-proxy kind extend enum Query { COMPAT_Z } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -jdk-proxy kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. -jdk-proxy undeclared extend type Query @compatUndeclared FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. -jdk-proxy repeat extend type Query { test: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. -jdk-proxy location extend type Query @specifiedBy FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +inputs location extend type SavedBook @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 23 is missing its required argument 'url'. +jdk-proxy seed FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. +jdk-proxy proxy FieldResolverError: No method or field found as defined in schema compat/scenarios/jdk-proxy/schema.graphqls:2 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: jdk.proxyN.$ProxyN.test() jdk.proxyN.$ProxyN.getTest() jdk.proxyN.$ProxyN.test +jdk-proxy kind extend interface Query { compatZ: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +jdk-proxy kind extend input Query { compatZ: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +jdk-proxy kind extend enum Query { COMPAT_Z } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +jdk-proxy kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +jdk-proxy undeclared extend type Query @compatUndeclared FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. +jdk-proxy repeat extend type Query { test: String } FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. +jdk-proxy location extend type Query @specifiedBy FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. jdk-proxy-cglib seed AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class jdk-proxy-cglib proxy AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class jdk-proxy-cglib kind extend interface Query { compatZ: String } AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class @@ -490,16 +490,16 @@ jdk-proxy-cglib undeclared extend type Query @compatUndeclared AopConfigExceptio jdk-proxy-cglib repeat extend type Query { test: String } AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class jdk-proxy-cglib location extend type Query @specifiedBy AopConfigException: Could not generate CGLIB subclass of class graphql.kickstart.tools.compat.scenarios.ProxiedQuery: Common causes of this problem include using a final class or a non-visible class jdk-proxy-plain seed BUILT -jdk-proxy-plain proxy FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. +jdk-proxy-plain proxy FieldResolverError: Field 'Query.test' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.test, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. Field 'Query.total' resolves to graphql.kickstart.tools.compat.scenarios.ProxiedQuery.getTotal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ProxiedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. For a public field, also add a getter, since class-based proxies don't pass field reads to the target. jdk-proxy-plain kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. jdk-proxy-plain kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. jdk-proxy-plain kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. jdk-proxy-plain kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. jdk-proxy-plain undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. jdk-proxy-plain repeat extend type Query { test: String } SchemaError: Type 'Query' declares field 'test' more than once at line 1, column 21. -jdk-proxy-plain location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +jdk-proxy-plain location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-unions seed BUILT -nested-unions proxy FieldResolverError: Field 'Query.results' resolves to graphql.kickstart.tools.compat.scenarios.NestedUnionsQuery.results, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedUnionsQuery, so every query of the field will fail. +nested-unions proxy FieldResolverError: Field 'Query.results' resolves to graphql.kickstart.tools.compat.scenarios.NestedUnionsQuery.results, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedUnionsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. nested-unions kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. nested-unions kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. nested-unions kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -507,7 +507,7 @@ nested-unions kind extend union Query = Book BUILT Type 'Query' is defined as an nested-unions kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. nested-unions undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-unions repeat extend type Query { results: [Result!]! } SchemaError: Type 'Query' declares field 'results' more than once at line 1, column 21. -nested-unions location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-unions location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-unions kind extend type Result { compatZ: String } BUILT Type 'Result' is defined as a union, but extended as an object type. The extension is ignored. nested-unions kind extend interface Result { compatZ: String } BUILT Type 'Result' is defined as a union, but extended as an interface. The extension is ignored. nested-unions kind extend input Result { compatZ: String } BUILT Type 'Result' is defined as a union, but extended as an input object type. The extension is ignored. @@ -515,7 +515,7 @@ nested-unions kind extend enum Result { COMPAT_Z } BUILT Type 'Result' is define nested-unions kind extend scalar Result @specifiedBy(url: "https://example.com") BUILT Type 'Result' is defined as a union, but extended as a scalar. The extension is ignored. nested-unions undeclared extend union Result @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-unions repeat extend union Result = Book SchemaError: Type 'Result' declares member 'Book' more than once at line 1, column 23. -nested-unions location extend union Result @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to UNION, but it's declared on SCALAR. +nested-unions location extend union Result @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. nested-unions kind extend type Media { compatZ: String } BUILT Type 'Media' is defined as a union, but extended as an object type. The extension is ignored. nested-unions kind extend interface Media { compatZ: String } BUILT Type 'Media' is defined as a union, but extended as an interface. The extension is ignored. nested-unions kind extend input Media { compatZ: String } BUILT Type 'Media' is defined as a union, but extended as an input object type. The extension is ignored. @@ -523,7 +523,7 @@ nested-unions kind extend enum Media { COMPAT_Z } BUILT Type 'Media' is defined nested-unions kind extend scalar Media @specifiedBy(url: "https://example.com") BUILT Type 'Media' is defined as a union, but extended as a scalar. The extension is ignored. nested-unions undeclared extend union Media @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-unions repeat extend union Media = Movie SchemaError: Type 'Media' declares member 'Movie' more than once at line 1, column 22. -nested-unions location extend union Media @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to UNION, but it's declared on SCALAR. +nested-unions location extend union Media @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. nested-unions kind extend interface Book { compatZ: String } BUILT Type 'Book' is defined as an object type, but extended as an interface. The extension is ignored. nested-unions kind extend input Book { compatZ: String } BUILT Type 'Book' is defined as an object type, but extended as an input object type. The extension is ignored. nested-unions kind extend enum Book { COMPAT_Z } BUILT Type 'Book' is defined as an object type, but extended as an enum. The extension is ignored. @@ -531,7 +531,7 @@ nested-unions kind extend union Book = Movie BUILT Type 'Book' is defined as an nested-unions kind extend scalar Book @specifiedBy(url: "https://example.com") BUILT Type 'Book' is defined as an object type, but extended as a scalar. The extension is ignored. nested-unions undeclared extend type Book @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-unions repeat extend type Book { title: String! } SchemaError: Type 'Book' declares field 'title' more than once at line 1, column 20. -nested-unions location extend type Book @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-unions location extend type Book @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. nested-unions kind extend interface Movie { compatZ: String } BUILT Type 'Movie' is defined as an object type, but extended as an interface. The extension is ignored. nested-unions kind extend input Movie { compatZ: String } BUILT Type 'Movie' is defined as an object type, but extended as an input object type. The extension is ignored. nested-unions kind extend enum Movie { COMPAT_Z } BUILT Type 'Movie' is defined as an object type, but extended as an enum. The extension is ignored. @@ -539,9 +539,9 @@ nested-unions kind extend union Movie = Book BUILT Type 'Movie' is defined as an nested-unions kind extend scalar Movie @specifiedBy(url: "https://example.com") BUILT Type 'Movie' is defined as an object type, but extended as a scalar. The extension is ignored. nested-unions undeclared extend type Movie @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-unions repeat extend type Movie { title: String! } SchemaError: Type 'Movie' declares field 'title' more than once at line 1, column 21. -nested-unions location extend type Movie @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-unions location extend type Movie @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-wrappers seed BUILT -nested-wrappers proxy FieldResolverError: Field 'Query.payload' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payload, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. +nested-wrappers proxy FieldResolverError: Field 'Query.payload' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payload, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.payloads' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payloads, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.payloadStrings' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payloadStrings, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.items' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.items, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.itemNames' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.itemNames, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.futureOfFuture' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.futureOfFuture, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.futureOfTries' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.futureOfTries, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.triesOfFutures' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.triesOfFutures, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.loadedItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.loadedItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.failedTryInList' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.failedTryInList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.failedFutureInList' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.failedFutureInList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.plainItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.plainItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.futureOfItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.futureOfItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. nested-wrappers kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -549,7 +549,7 @@ nested-wrappers kind extend union Query = Payload BUILT Type 'Query' is defined nested-wrappers kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers repeat extend type Query { payload: Payload! } SchemaError: Type 'Query' declares field 'payload' more than once at line 1, column 21. -nested-wrappers location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-wrappers kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. @@ -557,7 +557,7 @@ nested-wrappers kind extend union Payload = Item BUILT Type 'Payload' is defined nested-wrappers kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers repeat extend type Payload { data: String! } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. -nested-wrappers location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. nested-wrappers kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. @@ -565,18 +565,18 @@ nested-wrappers kind extend union Item = Payload BUILT Type 'Item' is defined as nested-wrappers kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. -nested-wrappers location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. nested-wrappers-exact seed BUILT -nested-wrappers-exact proxy FieldResolverError: Field 'Query.dates' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.dates, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. +nested-wrappers-exact proxy FieldResolverError: Field 'Query.dates' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.dates, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. Field 'Query.triedDates' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.triedDates, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. Field 'Query.plainFutureItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.plainFutureItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. Field 'Query.batchedItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.batchedItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. Field 'Query.boxedItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.boxedItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. Field 'Query.laterItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.laterItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. Field 'Query.suspendPlainFutureItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery.suspendPlainFutureItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersExactQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. nested-wrappers-exact kind extend type DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an object type. The extension is ignored. nested-wrappers-exact kind extend interface DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an interface. The extension is ignored. nested-wrappers-exact kind extend input DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an input object type. The extension is ignored. nested-wrappers-exact kind extend enum DateTime { COMPAT_Z } BUILT Type 'DateTime' is defined as a scalar, but extended as an enum. The extension is ignored. nested-wrappers-exact kind extend union DateTime = Item BUILT Type 'DateTime' is defined as a scalar, but extended as a union. The extension is ignored. nested-wrappers-exact undeclared extend scalar DateTime @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: null) InvalidSchemaException: invalid schema: +nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +nested-wrappers-exact argval extend scalar DateTime @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' nested-wrappers-exact kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-exact kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-exact kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -584,16 +584,16 @@ nested-wrappers-exact kind extend union Query = Item BUILT Type 'Query' is defin nested-wrappers-exact kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-exact undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-exact repeat extend type Query { dates: [DateTime] } SchemaError: Type 'Query' declares field 'dates' more than once at line 1, column 21. -nested-wrappers-exact location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-exact location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-wrappers-exact kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-exact kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-exact kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. nested-wrappers-exact kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-exact undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-exact repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. -nested-wrappers-exact location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-exact location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. nested-wrappers-suspend seed BUILT -nested-wrappers-suspend proxy FieldResolverError: Field 'Query.nullableItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery.nullableItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery, so every query of the field will fail. +nested-wrappers-suspend proxy FieldResolverError: Field 'Query.nullableItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery.nullableItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery, so every query of the field will fail. Field 'Query.nonNullItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery.nonNullItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery, so every query of the field will fail. Field 'Query.typeVariableStrings' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery.typeVariableStrings, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersSuspendQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. nested-wrappers-suspend kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-suspend kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-suspend kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -601,16 +601,16 @@ nested-wrappers-suspend kind extend union Query = Item BUILT Type 'Query' is def nested-wrappers-suspend kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-suspend undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-suspend repeat extend type Query { nullableItems: [Item] } SchemaError: Type 'Query' declares field 'nullableItems' more than once at line 1, column 21. -nested-wrappers-suspend location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-suspend location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-wrappers-suspend kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-suspend kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-suspend kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. nested-wrappers-suspend kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-suspend undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-suspend repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. -nested-wrappers-suspend location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-suspend location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. nested-wrappers-unboxer seed BUILT -nested-wrappers-unboxer proxy FieldResolverError: Field 'Query.payload' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payload, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. +nested-wrappers-unboxer proxy FieldResolverError: Field 'Query.payload' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payload, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.payloads' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payloads, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.payloadStrings' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.payloadStrings, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.items' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.items, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.itemNames' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.itemNames, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.futureOfFuture' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.futureOfFuture, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.futureOfTries' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.futureOfTries, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.triesOfFutures' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.triesOfFutures, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.loadedItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.loadedItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.failedTryInList' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.failedTryInList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.failedFutureInList' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.failedFutureInList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.plainItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.plainItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. Field 'Query.futureOfItems' resolves to graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery.futureOfItems, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.NestedWrappersQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. nested-wrappers-unboxer kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-unboxer kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-unboxer kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -618,7 +618,7 @@ nested-wrappers-unboxer kind extend union Query = Payload BUILT Type 'Query' is nested-wrappers-unboxer kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-unboxer undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-unboxer repeat extend type Query { payload: Payload! } SchemaError: Type 'Query' declares field 'payload' more than once at line 1, column 21. -nested-wrappers-unboxer location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-unboxer location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. nested-wrappers-unboxer kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-unboxer kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-unboxer kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. @@ -626,7 +626,7 @@ nested-wrappers-unboxer kind extend union Payload = Item BUILT Type 'Payload' is nested-wrappers-unboxer kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-unboxer undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-unboxer repeat extend type Payload { data: String! } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. -nested-wrappers-unboxer location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-unboxer location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. nested-wrappers-unboxer kind extend interface Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an interface. The extension is ignored. nested-wrappers-unboxer kind extend input Item { compatZ: String } BUILT Type 'Item' is defined as an object type, but extended as an input object type. The extension is ignored. nested-wrappers-unboxer kind extend enum Item { COMPAT_Z } BUILT Type 'Item' is defined as an object type, but extended as an enum. The extension is ignored. @@ -634,9 +634,9 @@ nested-wrappers-unboxer kind extend union Item = Payload BUILT Type 'Item' is de nested-wrappers-unboxer kind extend scalar Item @specifiedBy(url: "https://example.com") BUILT Type 'Item' is defined as an object type, but extended as a scalar. The extension is ignored. nested-wrappers-unboxer undeclared extend type Item @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. nested-wrappers-unboxer repeat extend type Item { id: ID! } SchemaError: Type 'Item' declares field 'id' more than once at line 1, column 20. -nested-wrappers-unboxer location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. +nested-wrappers-unboxer location extend type Item @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. optional-results seed BUILT -optional-results proxy FieldResolverError: Field 'Query.optionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery.optionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery, so every query of the field will fail. +optional-results proxy FieldResolverError: Field 'Query.optionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery.optionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery, so every query of the field will fail. Field 'Query.optionalResultName' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery.optionalResultName, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery, so every query of the field will fail. Field 'Query.emptyOptionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery.emptyOptionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. optional-results kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. optional-results kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. optional-results kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -644,16 +644,16 @@ optional-results kind extend union Query = Payload BUILT Type 'Query' is defined optional-results kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. optional-results undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. optional-results repeat extend type Query { optionalResult: Payload } SchemaError: Type 'Query' declares field 'optionalResult' more than once at line 1, column 21. -optional-results location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +optional-results location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. optional-results kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. optional-results kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. optional-results kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. optional-results kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. optional-results undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. optional-results repeat extend type Payload { data: String } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. -optional-results location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +optional-results location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. optional-results-list seed BUILT -optional-results-list proxy FieldResolverError: Field 'Query.optionalResultList' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsListQuery.optionalResultList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsListQuery, so every query of the field will fail. +optional-results-list proxy FieldResolverError: Field 'Query.optionalResultList' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsListQuery.optionalResultList, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsListQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. optional-results-list kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. optional-results-list kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. optional-results-list kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -661,16 +661,16 @@ optional-results-list kind extend union Query = Payload BUILT Type 'Query' is de optional-results-list kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. optional-results-list undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. optional-results-list repeat extend type Query { optionalResultList: [Payload] } SchemaError: Type 'Query' declares field 'optionalResultList' more than once at line 1, column 21. -optional-results-list location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +optional-results-list location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. optional-results-list kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. optional-results-list kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. optional-results-list kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. optional-results-list kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. optional-results-list undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. optional-results-list repeat extend type Payload { data: String } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. -optional-results-list location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +optional-results-list location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. optional-results-mixed seed BUILT -optional-results-mixed proxy FieldResolverError: Field 'Query.optionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery.optionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery, so every query of the field will fail. +optional-results-mixed proxy FieldResolverError: Field 'Query.optionalResult' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery.optionalResult, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery, so every query of the field will fail. Field 'Query.resultOfOptional' resolves to graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery.resultOfOptional, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionalResultsMixedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. optional-results-mixed kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. optional-results-mixed kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. optional-results-mixed kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -678,14 +678,14 @@ optional-results-mixed kind extend union Query = Payload BUILT Type 'Query' is d optional-results-mixed kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. optional-results-mixed undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. optional-results-mixed repeat extend type Query { optionalResult: Payload } SchemaError: Type 'Query' declares field 'optionalResult' more than once at line 1, column 21. -optional-results-mixed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +optional-results-mixed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. optional-results-mixed kind extend interface Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an interface. The extension is ignored. optional-results-mixed kind extend input Payload { compatZ: String } BUILT Type 'Payload' is defined as an object type, but extended as an input object type. The extension is ignored. optional-results-mixed kind extend enum Payload { COMPAT_Z } BUILT Type 'Payload' is defined as an object type, but extended as an enum. The extension is ignored. optional-results-mixed kind extend scalar Payload @specifiedBy(url: "https://example.com") BUILT Type 'Payload' is defined as an object type, but extended as a scalar. The extension is ignored. optional-results-mixed undeclared extend type Payload @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. optional-results-mixed repeat extend type Payload { data: String } SchemaError: Type 'Payload' declares field 'data' more than once at line 1, column 23. -optional-results-mixed location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. +optional-results-mixed location extend type Payload @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. optional-results-nested seed SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself optional-results-nested proxy SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself optional-results-nested kind extend interface Query { compatZ: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. @@ -704,16 +704,16 @@ optional-results-nested undeclared extend type Payload @compatUndeclared SchemaC optional-results-nested repeat extend type Payload { data: String } SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself optional-results-nested location extend type Payload @specifiedBy SchemaClassScannerError: Unable to match type definition (Payload) for reference return type of method public final java.util.Optional graphql.kickstart.tools.compat.scenarios.OptionalResultsNestedQuery.optionalResultOfResult() with java type (java.util.Optional>>): graphql.execution.DataFetcherResult cannot be nested within itself options seed BUILT -options proxy FieldResolverError: Field 'Query.name' resolves to graphql.kickstart.tools.compat.scenarios.OptionsQuery.name, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionsQuery, so every query of the field will fail. +options proxy FieldResolverError: Field 'Query.name' resolves to graphql.kickstart.tools.compat.scenarios.OptionsQuery.name, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.OptionsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. options kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. options kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. options kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. options kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. options undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. options repeat extend type Query { name: String! } SchemaError: Type 'Query' declares field 'name' more than once at line 1, column 21. -options location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +options location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. polymorphism seed BUILT -polymorphism proxy FieldResolverError: Field 'Query.node' resolves to graphql.kickstart.tools.compat.scenarios.PolymorphismQuery.node, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.PolymorphismQuery, so every query of the field will fail. +polymorphism proxy FieldResolverError: Field 'Query.node' resolves to graphql.kickstart.tools.compat.scenarios.PolymorphismQuery.node, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.PolymorphismQuery, so every query of the field will fail. Field 'Query.search' resolves to graphql.kickstart.tools.compat.scenarios.PolymorphismQuery.search, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.PolymorphismQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. polymorphism kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. polymorphism kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. polymorphism kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -721,7 +721,7 @@ polymorphism kind extend union Query = Novel BUILT Type 'Query' is defined as an polymorphism kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. polymorphism undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. polymorphism repeat extend type Query { node(id: ID!): Node } SchemaError: Type 'Query' declares field 'node' more than once at line 1, column 21. -polymorphism location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +polymorphism location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. polymorphism kind extend type Node { compatZ: String } BUILT Type 'Node' is defined as an interface, but extended as an object type. The extension is ignored. polymorphism kind extend input Node { compatZ: String } BUILT Type 'Node' is defined as an interface, but extended as an input object type. The extension is ignored. polymorphism kind extend enum Node { COMPAT_Z } BUILT Type 'Node' is defined as an interface, but extended as an enum. The extension is ignored. @@ -729,7 +729,7 @@ polymorphism kind extend union Node = Novel BUILT Type 'Node' is defined as an i polymorphism kind extend scalar Node @specifiedBy(url: "https://example.com") BUILT Type 'Node' is defined as an interface, but extended as a scalar. The extension is ignored. polymorphism undeclared extend interface Node @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. polymorphism repeat extend interface Node { id: ID! } SchemaError: Type 'Node' declares field 'id' more than once at line 1, column 25. -polymorphism location extend interface Node @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to INTERFACE, but it's declared on SCALAR. +polymorphism location extend interface Node @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to INTERFACE, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 23 is missing its required argument 'url'. polymorphism kind extend interface Novel { compatZ: String } BUILT Type 'Novel' is defined as an object type, but extended as an interface. The extension is ignored. polymorphism kind extend input Novel { compatZ: String } BUILT Type 'Novel' is defined as an object type, but extended as an input object type. The extension is ignored. polymorphism kind extend enum Novel { COMPAT_Z } BUILT Type 'Novel' is defined as an object type, but extended as an enum. The extension is ignored. @@ -737,7 +737,7 @@ polymorphism kind extend union Novel = Writer BUILT Type 'Novel' is defined as a polymorphism kind extend scalar Novel @specifiedBy(url: "https://example.com") BUILT Type 'Novel' is defined as an object type, but extended as a scalar. The extension is ignored. polymorphism undeclared extend type Novel @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. polymorphism repeat extend type Novel { id: ID! } SchemaError: Type 'Novel' declares field 'id' more than once at line 1, column 21. -polymorphism location extend type Novel @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +polymorphism location extend type Novel @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. polymorphism kind extend interface Writer { compatZ: String } BUILT Type 'Writer' is defined as an object type, but extended as an interface. The extension is ignored. polymorphism kind extend input Writer { compatZ: String } BUILT Type 'Writer' is defined as an object type, but extended as an input object type. The extension is ignored. polymorphism kind extend enum Writer { COMPAT_Z } BUILT Type 'Writer' is defined as an object type, but extended as an enum. The extension is ignored. @@ -745,7 +745,7 @@ polymorphism kind extend union Writer = Novel BUILT Type 'Writer' is defined as polymorphism kind extend scalar Writer @specifiedBy(url: "https://example.com") BUILT Type 'Writer' is defined as an object type, but extended as a scalar. The extension is ignored. polymorphism undeclared extend type Writer @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. polymorphism repeat extend type Writer { id: ID! } SchemaError: Type 'Writer' declares field 'id' more than once at line 1, column 22. -polymorphism location extend type Writer @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +polymorphism location extend type Writer @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. polymorphism kind extend type SearchResult { compatZ: String } BUILT Type 'SearchResult' is defined as a union, but extended as an object type. The extension is ignored. polymorphism kind extend interface SearchResult { compatZ: String } BUILT Type 'SearchResult' is defined as a union, but extended as an interface. The extension is ignored. polymorphism kind extend input SearchResult { compatZ: String } BUILT Type 'SearchResult' is defined as a union, but extended as an input object type. The extension is ignored. @@ -753,9 +753,9 @@ polymorphism kind extend enum SearchResult { COMPAT_Z } BUILT Type 'SearchResult polymorphism kind extend scalar SearchResult @specifiedBy(url: "https://example.com") BUILT Type 'SearchResult' is defined as a union, but extended as a scalar. The extension is ignored. polymorphism undeclared extend union SearchResult @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. polymorphism repeat extend union SearchResult = Novel SchemaError: Type 'SearchResult' declares member 'Novel' more than once at line 1, column 29. -polymorphism location extend union SearchResult @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to UNION, but it's declared on SCALAR. +polymorphism location extend union SearchResult @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 27 is missing its required argument 'url'. read-only-schema seed BUILT -read-only-schema proxy FieldResolverError: Field 'Query.animal' resolves to graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery.animal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery, so every query of the field will fail. +read-only-schema proxy FieldResolverError: Field 'Query.animal' resolves to graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery.animal, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery, so every query of the field will fail. Field 'Query.pets' resolves to graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery.pets, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ReadOnlyQuery, so every query of the field will fail. Field 'Mutation.adopt' resolves to graphql.kickstart.tools.compat.scenarios.ReadOnlyMutation.adopt, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ReadOnlyMutation, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. read-only-schema kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. read-only-schema kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. read-only-schema kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -763,9 +763,9 @@ read-only-schema kind extend union Query = Dog BUILT Type 'Query' is defined as read-only-schema kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. read-only-schema undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. read-only-schema repeat extend type Query { animal(name: String!): Animal } SchemaError: Type 'Query' declares field 'animal' more than once at line 1, column 21. -read-only-schema location extend type Query @tag SchemaError: Directive @tag at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -read-only-schema location extend type Query @contact SchemaError: Directive @contact at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA. -read-only-schema location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema location extend type Query @tag SchemaError: Directive @tag at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @tag at line 1, column 19 is missing its required argument 'name'. +read-only-schema location extend type Query @contact SchemaError: Directive @contact at line 1, column 19 is applied to OBJECT, but it's declared on SCHEMA. Directive @contact at line 1, column 19 is missing its required argument 'name'. +read-only-schema location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. read-only-schema kind extend interface Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an interface. The extension is ignored. read-only-schema kind extend input Mutation { compatZ: String } BUILT Type 'Mutation' is defined as an object type, but extended as an input object type. The extension is ignored. read-only-schema kind extend enum Mutation { COMPAT_Z } BUILT Type 'Mutation' is defined as an object type, but extended as an enum. The extension is ignored. @@ -773,9 +773,9 @@ read-only-schema kind extend union Mutation = Dog BUILT Type 'Mutation' is defin read-only-schema kind extend scalar Mutation @specifiedBy(url: "https://example.com") BUILT Type 'Mutation' is defined as an object type, but extended as a scalar. The extension is ignored. read-only-schema undeclared extend type Mutation @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. read-only-schema repeat extend type Mutation { adopt(name: String!): Animal! } SchemaError: Type 'Mutation' declares field 'adopt' more than once at line 1, column 24. -read-only-schema location extend type Mutation @tag SchemaError: Directive @tag at line 1, column 22 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -read-only-schema location extend type Mutation @contact SchemaError: Directive @contact at line 1, column 22 is applied to OBJECT, but it's declared on SCHEMA. -read-only-schema location extend type Mutation @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema location extend type Mutation @tag SchemaError: Directive @tag at line 1, column 22 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @tag at line 1, column 22 is missing its required argument 'name'. +read-only-schema location extend type Mutation @contact SchemaError: Directive @contact at line 1, column 22 is applied to OBJECT, but it's declared on SCHEMA. Directive @contact at line 1, column 22 is missing its required argument 'name'. +read-only-schema location extend type Mutation @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 22 is missing its required argument 'url'. read-only-schema kind extend type Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. read-only-schema kind extend input Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. read-only-schema kind extend enum Animal { COMPAT_Z } BUILT Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. @@ -783,9 +783,9 @@ read-only-schema kind extend union Animal = Dog BUILT Type 'Animal' is defined a read-only-schema kind extend scalar Animal @specifiedBy(url: "https://example.com") BUILT Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. read-only-schema undeclared extend interface Animal @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. read-only-schema repeat extend interface Animal { name: String! @tag(name: "public") } SchemaError: Type 'Animal' declares field 'name' more than once at line 1, column 27. -read-only-schema location extend interface Animal @tag SchemaError: Directive @tag at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. -read-only-schema location extend interface Animal @contact SchemaError: Directive @contact at line 1, column 25 is applied to INTERFACE, but it's declared on SCHEMA. -read-only-schema location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. +read-only-schema location extend interface Animal @tag SchemaError: Directive @tag at line 1, column 25 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. Directive @tag at line 1, column 25 is missing its required argument 'name'. +read-only-schema location extend interface Animal @contact SchemaError: Directive @contact at line 1, column 25 is applied to INTERFACE, but it's declared on SCHEMA. Directive @contact at line 1, column 25 is missing its required argument 'name'. +read-only-schema location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. read-only-schema kind extend interface Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. read-only-schema kind extend input Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. read-only-schema kind extend enum Dog { COMPAT_Z } BUILT Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. @@ -793,9 +793,9 @@ read-only-schema kind extend union Dog = Cat BUILT Type 'Dog' is defined as an o read-only-schema kind extend scalar Dog @specifiedBy(url: "https://example.com") BUILT Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. read-only-schema undeclared extend type Dog @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. read-only-schema repeat extend type Dog { name: String! @tag(name: "public") } SchemaError: Type 'Dog' declares field 'name' more than once at line 1, column 19. -read-only-schema location extend type Dog @tag SchemaError: Directive @tag at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -read-only-schema location extend type Dog @contact SchemaError: Directive @contact at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. -read-only-schema location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema location extend type Dog @tag SchemaError: Directive @tag at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @tag at line 1, column 17 is missing its required argument 'name'. +read-only-schema location extend type Dog @contact SchemaError: Directive @contact at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. Directive @contact at line 1, column 17 is missing its required argument 'name'. +read-only-schema location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 17 is missing its required argument 'url'. read-only-schema kind extend interface Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an interface. The extension is ignored. read-only-schema kind extend input Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an input object type. The extension is ignored. read-only-schema kind extend enum Cat { COMPAT_Z } BUILT Type 'Cat' is defined as an object type, but extended as an enum. The extension is ignored. @@ -803,9 +803,9 @@ read-only-schema kind extend union Cat = Dog BUILT Type 'Cat' is defined as an o read-only-schema kind extend scalar Cat @specifiedBy(url: "https://example.com") BUILT Type 'Cat' is defined as an object type, but extended as a scalar. The extension is ignored. read-only-schema undeclared extend type Cat @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. read-only-schema repeat extend type Cat { name: String! @tag(name: "public") } SchemaError: Type 'Cat' declares field 'name' more than once at line 1, column 19. -read-only-schema location extend type Cat @tag SchemaError: Directive @tag at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. -read-only-schema location extend type Cat @contact SchemaError: Directive @contact at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. -read-only-schema location extend type Cat @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +read-only-schema location extend type Cat @tag SchemaError: Directive @tag at line 1, column 17 is applied to OBJECT, but it's declared on FIELD_DEFINITION. Directive @tag at line 1, column 17 is missing its required argument 'name'. +read-only-schema location extend type Cat @contact SchemaError: Directive @contact at line 1, column 17 is applied to OBJECT, but it's declared on SCHEMA. Directive @contact at line 1, column 17 is missing its required argument 'name'. +read-only-schema location extend type Cat @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 17 is missing its required argument 'url'. read-only-schema kind extend type Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. read-only-schema kind extend interface Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. read-only-schema kind extend input Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. @@ -813,116 +813,116 @@ read-only-schema kind extend enum Pet { COMPAT_Z } BUILT Type 'Pet' is defined a read-only-schema kind extend scalar Pet @specifiedBy(url: "https://example.com") BUILT Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. read-only-schema undeclared extend union Pet @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. read-only-schema repeat extend union Pet = Dog SchemaError: Type 'Pet' declares member 'Dog' more than once at line 1, column 20. -read-only-schema location extend union Pet @tag SchemaError: Directive @tag at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. -read-only-schema location extend union Pet @contact SchemaError: Directive @contact at line 1, column 18 is applied to UNION, but it's declared on SCHEMA. -read-only-schema location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. +read-only-schema location extend union Pet @tag SchemaError: Directive @tag at line 1, column 18 is applied to UNION, but it's declared on FIELD_DEFINITION. Directive @tag at line 1, column 18 is missing its required argument 'name'. +read-only-schema location extend union Pet @contact SchemaError: Directive @contact at line 1, column 18 is applied to UNION, but it's declared on SCHEMA. Directive @contact at line 1, column 18 is missing its required argument 'name'. +read-only-schema location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. recursive-inputs seed BUILT -recursive-inputs proxy FieldResolverError: Field 'Query.describe' resolves to graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery.describe, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery, so every query of the field will fail. +recursive-inputs proxy FieldResolverError: Field 'Query.describe' resolves to graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery.describe, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery, so every query of the field will fail. Field 'Query.names' resolves to graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery.names, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.RecursiveInputsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. recursive-inputs kind extend type LimitUnit { compatZ: String } BUILT Type 'LimitUnit' is defined as an enum, but extended as an object type. The extension is ignored. recursive-inputs kind extend interface LimitUnit { compatZ: String } BUILT Type 'LimitUnit' is defined as an enum, but extended as an interface. The extension is ignored. recursive-inputs kind extend input LimitUnit { compatZ: String } BUILT Type 'LimitUnit' is defined as an enum, but extended as an input object type. The extension is ignored. recursive-inputs kind extend scalar LimitUnit @specifiedBy(url: "https://example.com") BUILT Type 'LimitUnit' is defined as an enum, but extended as a scalar. The extension is ignored. recursive-inputs undeclared extend enum LimitUnit @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. recursive-inputs repeat extend enum LimitUnit { ITEMS } SchemaError: Type 'LimitUnit' declares value 'ITEMS' more than once at line 1, column 25. -recursive-inputs location extend enum LimitUnit @limit SchemaError: Directive @limit at line 1, column 23 is applied to ENUM, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. -recursive-inputs location extend enum LimitUnit @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to ENUM, but it's declared on SCALAR. +recursive-inputs location extend enum LimitUnit @limit SchemaError: Directive @limit at line 1, column 23 is applied to ENUM, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. Directive @limit at line 1, column 23 is missing its required argument 'range'. +recursive-inputs location extend enum LimitUnit @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to ENUM, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 23 is missing its required argument 'url'. recursive-inputs kind extend type RangeInput { compatZ: String } BUILT Type 'RangeInput' is defined as an input object type, but extended as an object type. The extension is ignored. recursive-inputs kind extend interface RangeInput { compatZ: String } BUILT Type 'RangeInput' is defined as an input object type, but extended as an interface. The extension is ignored. recursive-inputs kind extend enum RangeInput { COMPAT_Z } BUILT Type 'RangeInput' is defined as an input object type, but extended as an enum. The extension is ignored. recursive-inputs kind extend scalar RangeInput @specifiedBy(url: "https://example.com") BUILT Type 'RangeInput' is defined as an input object type, but extended as a scalar. The extension is ignored. recursive-inputs undeclared extend input RangeInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. recursive-inputs repeat extend input RangeInput { min: Int! } SchemaError: Type 'RangeInput' declares field 'min' more than once at line 1, column 27. -recursive-inputs location extend input RangeInput @limit SchemaError: Directive @limit at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. -recursive-inputs location extend input RangeInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +recursive-inputs location extend input RangeInput @limit SchemaError: Directive @limit at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. Directive @limit at line 1, column 25 is missing its required argument 'range'. +recursive-inputs location extend input RangeInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. recursive-inputs kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. recursive-inputs kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. recursive-inputs kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. recursive-inputs kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. recursive-inputs undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. recursive-inputs repeat extend type Query { describe(filter: TreeFilter!): String! @limit(range: {min : 0, max : 5}, labels: ["a", "b"]) } SchemaError: Type 'Query' declares field 'describe' more than once at line 1, column 21. -recursive-inputs location extend type Query @limit SchemaError: Directive @limit at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. -recursive-inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +recursive-inputs location extend type Query @limit SchemaError: Directive @limit at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. Directive @limit at line 1, column 19 is missing its required argument 'range'. +recursive-inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. recursive-inputs kind extend type TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an object type. The extension is ignored. recursive-inputs kind extend interface TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an interface. The extension is ignored. recursive-inputs kind extend enum TreeFilter { COMPAT_Z } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an enum. The extension is ignored. recursive-inputs kind extend scalar TreeFilter @specifiedBy(url: "https://example.com") BUILT Type 'TreeFilter' is defined as an input object type, but extended as a scalar. The extension is ignored. recursive-inputs undeclared extend input TreeFilter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. recursive-inputs repeat extend input TreeFilter { name: String } SchemaError: Type 'TreeFilter' declares field 'name' more than once at line 1, column 27. -recursive-inputs location extend input TreeFilter @limit SchemaError: Directive @limit at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. -recursive-inputs location extend input TreeFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +recursive-inputs location extend input TreeFilter @limit SchemaError: Directive @limit at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. Directive @limit at line 1, column 25 is missing its required argument 'range'. +recursive-inputs location extend input TreeFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. recursive-inputs kind extend type ChildFilter { compatZ: String } BUILT Type 'ChildFilter' is defined as an input object type, but extended as an object type. The extension is ignored. recursive-inputs kind extend interface ChildFilter { compatZ: String } BUILT Type 'ChildFilter' is defined as an input object type, but extended as an interface. The extension is ignored. recursive-inputs kind extend enum ChildFilter { COMPAT_Z } BUILT Type 'ChildFilter' is defined as an input object type, but extended as an enum. The extension is ignored. recursive-inputs kind extend scalar ChildFilter @specifiedBy(url: "https://example.com") BUILT Type 'ChildFilter' is defined as an input object type, but extended as a scalar. The extension is ignored. recursive-inputs undeclared extend input ChildFilter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. recursive-inputs repeat extend input ChildFilter { parent: TreeFilter } SchemaError: Type 'ChildFilter' declares field 'parent' more than once at line 1, column 28. -recursive-inputs location extend input ChildFilter @limit SchemaError: Directive @limit at line 1, column 26 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. -recursive-inputs location extend input ChildFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 26 is applied to INPUT_OBJECT, but it's declared on SCALAR. +recursive-inputs location extend input ChildFilter @limit SchemaError: Directive @limit at line 1, column 26 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION. Directive @limit at line 1, column 26 is missing its required argument 'range'. +recursive-inputs location extend input ChildFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 26 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 26 is missing its required argument 'url'. scalar-args seed BUILT -scalar-args proxy FieldResolverError: Field 'Query.tag' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.tag, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. +scalar-args proxy FieldResolverError: Field 'Query.tag' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.tag, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.tags' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.tags, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.id' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.id, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.nestedSets' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.nestedSets, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.nestedLists' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.nestedLists, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.tokenInput' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.tokenInput, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.markedTokens' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.markedTokens, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.optionalTypedToken' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.optionalTypedToken, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. Field 'Query.optionalIdToken' resolves to graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery.optionalIdToken, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarArgsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. scalar-args kind extend type Tag { compatZ: String } BUILT Type 'Tag' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-args kind extend interface Tag { compatZ: String } BUILT Type 'Tag' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-args kind extend input Tag { compatZ: String } BUILT Type 'Tag' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-args kind extend enum Tag { COMPAT_Z } BUILT Type 'Tag' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-args undeclared extend scalar Tag @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-args argval extend scalar Tag @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar Tag @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar Tag @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar Tag @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar Tag @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar Tag @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-args kind extend type Token { compatZ: String } BUILT Type 'Token' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-args kind extend interface Token { compatZ: String } BUILT Type 'Token' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-args kind extend input Token { compatZ: String } BUILT Type 'Token' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-args kind extend enum Token { COMPAT_Z } BUILT Type 'Token' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-args undeclared extend scalar Token @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-args argval extend scalar Token @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar Token @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar Token @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar Token @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar Token @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar Token @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-args kind extend type TypedToken { compatZ: String } BUILT Type 'TypedToken' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-args kind extend interface TypedToken { compatZ: String } BUILT Type 'TypedToken' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-args kind extend input TypedToken { compatZ: String } BUILT Type 'TypedToken' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-args kind extend enum TypedToken { COMPAT_Z } BUILT Type 'TypedToken' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-args undeclared extend scalar TypedToken @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-args argval extend scalar TypedToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar TypedToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar TypedToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar TypedToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar TypedToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar TypedToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-args kind extend type WrappedToken { compatZ: String } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-args kind extend interface WrappedToken { compatZ: String } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-args kind extend input WrappedToken { compatZ: String } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-args kind extend enum WrappedToken { COMPAT_Z } BUILT Type 'WrappedToken' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-args undeclared extend scalar WrappedToken @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-args argval extend scalar WrappedToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar WrappedToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar WrappedToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar WrappedToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar WrappedToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar WrappedToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-args kind extend type IdToken { compatZ: String } BUILT Type 'IdToken' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-args kind extend interface IdToken { compatZ: String } BUILT Type 'IdToken' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-args kind extend input IdToken { compatZ: String } BUILT Type 'IdToken' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-args kind extend enum IdToken { COMPAT_Z } BUILT Type 'IdToken' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-args undeclared extend scalar IdToken @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-args argval extend scalar IdToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar IdToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-args argval extend scalar IdToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-args argval extend scalar IdToken @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar IdToken @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-args argval extend scalar IdToken @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-args kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. scalar-args kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. scalar-args kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. scalar-args kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. scalar-args undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. scalar-args repeat extend type Query { tag(tag: Tag!): String! } SchemaError: Type 'Query' declares field 'tag' more than once at line 1, column 21. -scalar-args location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +scalar-args location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. scalar-args kind extend type TokenInput { compatZ: String } BUILT Type 'TokenInput' is defined as an input object type, but extended as an object type. The extension is ignored. scalar-args kind extend interface TokenInput { compatZ: String } BUILT Type 'TokenInput' is defined as an input object type, but extended as an interface. The extension is ignored. scalar-args kind extend enum TokenInput { COMPAT_Z } BUILT Type 'TokenInput' is defined as an input object type, but extended as an enum. The extension is ignored. scalar-args kind extend scalar TokenInput @specifiedBy(url: "https://example.com") BUILT Type 'TokenInput' is defined as an input object type, but extended as a scalar. The extension is ignored. scalar-args undeclared extend input TokenInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. scalar-args repeat extend input TokenInput { token: Token } SchemaError: Type 'TokenInput' declares field 'token' more than once at line 1, column 27. -scalar-args location extend input TokenInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +scalar-args location extend input TokenInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. scalar-args kind extend type MarkedTokensInput { compatZ: String } BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as an object type. The extension is ignored. scalar-args kind extend interface MarkedTokensInput { compatZ: String } BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as an interface. The extension is ignored. scalar-args kind extend enum MarkedTokensInput { COMPAT_Z } BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as an enum. The extension is ignored. scalar-args kind extend scalar MarkedTokensInput @specifiedBy(url: "https://example.com") BUILT Type 'MarkedTokensInput' is defined as an input object type, but extended as a scalar. The extension is ignored. scalar-args undeclared extend input MarkedTokensInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. scalar-args repeat extend input MarkedTokensInput { typed: TypedToken } SchemaError: Type 'MarkedTokensInput' declares field 'typed' more than once at line 1, column 34. -scalar-args location extend input MarkedTokensInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 32 is applied to INPUT_OBJECT, but it's declared on SCALAR. +scalar-args location extend input MarkedTokensInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 32 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 32 is missing its required argument 'url'. scalar-directives seed BUILT -scalar-directives proxy FieldResolverError: Field 'Query.today' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.today, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. +scalar-directives proxy FieldResolverError: Field 'Query.today' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.today, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. Field 'Query.now' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.now, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. Field 'Query.shift' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.shift, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. Field 'Query.price' resolves to graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery.price, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ScalarDirectivesQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. scalar-directives kind extend type Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-directives kind extend interface Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-directives kind extend input Date { compatZ: String } BUILT Type 'Date' is defined as a scalar, but extended as an input object type. The extension is ignored. @@ -942,29 +942,29 @@ scalar-directives kind extend interface DateTime { compatZ: String } BUILT Type scalar-directives kind extend input DateTime { compatZ: String } BUILT Type 'DateTime' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-directives kind extend enum DateTime { COMPAT_Z } BUILT Type 'DateTime' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-directives undeclared extend scalar DateTime @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-directives argval extend scalar DateTime @since(date: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @since(date: 5) InvalidSchemaException: invalid schema: Invalid argument 'date' for applied directive of name 'since' scalar-directives argval extend scalar DateTime @since(date: "x") BUILT scalar-directives repeat-directive extend scalar DateTime @since @since SchemaError: Directive @since at line 1, column 31 isn't repeatable but is applied more than once. -scalar-directives argval extend scalar DateTime @unit(name: 5) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar DateTime @unit(name: NOPE) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar DateTime @unit(name: null) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar DateTime @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar DateTime @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar DateTime @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar DateTime @unit(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'unit' +scalar-directives argval extend scalar DateTime @unit(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'unit' +scalar-directives argval extend scalar DateTime @unit(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'unit' +scalar-directives argval extend scalar DateTime @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-directives argval extend scalar DateTime @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-directives argval extend scalar DateTime @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-directives kind extend type Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an object type. The extension is ignored. scalar-directives kind extend interface Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an interface. The extension is ignored. scalar-directives kind extend input Money { compatZ: String } BUILT Type 'Money' is defined as a scalar, but extended as an input object type. The extension is ignored. scalar-directives kind extend enum Money { COMPAT_Z } BUILT Type 'Money' is defined as a scalar, but extended as an enum. The extension is ignored. scalar-directives undeclared extend scalar Money @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. -scalar-directives argval extend scalar Money @since(date: 5) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @since(date: 5) InvalidSchemaException: invalid schema: Invalid argument 'date' for applied directive of name 'since' scalar-directives argval extend scalar Money @since(date: "x") BUILT scalar-directives repeat-directive extend scalar Money @since @since SchemaError: Directive @since at line 1, column 28 isn't repeatable but is applied more than once. -scalar-directives argval extend scalar Money @unit(name: 5) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar Money @unit(name: NOPE) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar Money @unit(name: null) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar Money @specifiedBy(url: 5) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar Money @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: -scalar-directives argval extend scalar Money @specifiedBy(url: null) InvalidSchemaException: invalid schema: +scalar-directives argval extend scalar Money @unit(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'unit' +scalar-directives argval extend scalar Money @unit(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'unit' +scalar-directives argval extend scalar Money @unit(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'unit' +scalar-directives argval extend scalar Money @specifiedBy(url: 5) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-directives argval extend scalar Money @specifiedBy(url: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' +scalar-directives argval extend scalar Money @specifiedBy(url: null) InvalidSchemaException: invalid schema: Invalid argument 'url' for applied directive of name 'specifiedBy' scalar-directives kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. scalar-directives kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. scalar-directives kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -972,10 +972,10 @@ scalar-directives kind extend scalar Query @specifiedBy(url: "https://example.co scalar-directives undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. scalar-directives repeat extend type Query { today: Date @since(date: "2021-01-01") } SchemaError: Type 'Query' declares field 'today' more than once at line 1, column 21. scalar-directives location extend type Query @since SchemaError: Directive @since at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR | FIELD_DEFINITION. -scalar-directives location extend type Query @unit SchemaError: Directive @unit at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. -scalar-directives location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +scalar-directives location extend type Query @unit SchemaError: Directive @unit at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @unit at line 1, column 19 is missing its required argument 'name'. +scalar-directives location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. sourceless seed BUILT -sourceless proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. +sourceless proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. Field 'Folder.images' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessFolderResolver.images, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessFolderResolver, so every query of the field will fail. Field 'Image.imageBlob' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver.imageBlob, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver, so every query of the field will fail. Field 'Image.thumbnail' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver.thumbnail, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver, so every query of the field will fail. Field 'Image.owner' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver.owner, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver, so every query of the field will fail. Field 'Image.locale' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver.locale, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver, so every query of the field will fail. Field 'Image.signature' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver.signature, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver, so every query of the field will fail. Field 'Image.caption' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver.caption, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessImageResolver, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. sourceless kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. sourceless kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -983,7 +983,7 @@ sourceless kind extend union Query = Folder BUILT Type 'Query' is defined as an sourceless kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. sourceless repeat extend type Query { folder: Folder! } SchemaError: Type 'Query' declares field 'folder' more than once at line 1, column 21. -sourceless location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. sourceless kind extend interface Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. sourceless kind extend input Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless kind extend enum Folder { COMPAT_Z } BUILT Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. @@ -991,7 +991,7 @@ sourceless kind extend union Folder = Image BUILT Type 'Folder' is defined as an sourceless kind extend scalar Folder @specifiedBy(url: "https://example.com") BUILT Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless undeclared extend type Folder @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. sourceless repeat extend type Folder { supportedFileTypes: [String!]! } SchemaError: Type 'Folder' declares field 'supportedFileTypes' more than once at line 1, column 22. -sourceless location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +sourceless location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. sourceless kind extend interface Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. sourceless kind extend input Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless kind extend enum Image { COMPAT_Z } BUILT Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. @@ -999,35 +999,35 @@ sourceless kind extend union Image = Folder BUILT Type 'Image' is defined as an sourceless kind extend scalar Image @specifiedBy(url: "https://example.com") BUILT Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless undeclared extend type Image @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. sourceless repeat extend type Image { name: String! } SchemaError: Type 'Image' declares field 'name' more than once at line 1, column 21. -sourceless location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. -sourceless-misbound seed FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound proxy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound kind extend interface Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. -sourceless-misbound kind extend input Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. -sourceless-misbound kind extend enum Query { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. -sourceless-misbound kind extend union Query = Folder FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. -sourceless-misbound kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. -sourceless-misbound undeclared extend type Query @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound repeat extend type Query { folder: Folder! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound location extend type Query @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound kind extend interface Folder { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. -sourceless-misbound kind extend input Folder { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. -sourceless-misbound kind extend enum Folder { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. -sourceless-misbound kind extend union Folder = Image FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as a union. The extension is ignored. -sourceless-misbound kind extend scalar Folder @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. -sourceless-misbound undeclared extend type Folder @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound repeat extend type Folder { images: [Image!]! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound location extend type Folder @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound kind extend interface Image { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. -sourceless-misbound kind extend input Image { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. -sourceless-misbound kind extend enum Image { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. -sourceless-misbound kind extend union Image = Folder FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as a union. The extension is ignored. -sourceless-misbound kind extend scalar Image @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. -sourceless-misbound undeclared extend type Image @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound repeat extend type Image { name: String! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: -sourceless-misbound location extend type Image @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: +sourceless location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. +sourceless-misbound seed FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound proxy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound kind extend interface Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-misbound kind extend input Query { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-misbound kind extend enum Query { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-misbound kind extend union Query = Folder FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Query' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-misbound kind extend scalar Query @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-misbound undeclared extend type Query @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound repeat extend type Query { folder: Folder! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound location extend type Query @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound kind extend interface Folder { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-misbound kind extend input Folder { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-misbound kind extend enum Folder { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-misbound kind extend union Folder = Image FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Folder' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-misbound kind extend scalar Folder @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-misbound undeclared extend type Folder @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound repeat extend type Folder { images: [Image!]! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound location extend type Folder @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound kind extend interface Image { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. +sourceless-misbound kind extend input Image { compatZ: String } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. +sourceless-misbound kind extend enum Image { COMPAT_Z } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. +sourceless-misbound kind extend union Image = Folder FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Image' is defined as an object type, but extended as a union. The extension is ignored. +sourceless-misbound kind extend scalar Image @specifiedBy(url: "https://example.com") FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. +sourceless-misbound undeclared extend type Image @compatUndeclared FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound repeat extend type Image { name: String! } FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) +sourceless-misbound location extend type Image @specifiedBy FieldResolverError: No method found as defined in schema compat/scenarios/sourceless-misbound/schema.graphqls:11 with any of the following signatures (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext]), in priority order: graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(graphql.kickstart.tools.compat.scenarios.SourcelessImage, ~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.thumbnail(~size) graphql.kickstart.tools.compat.scenarios.SourcelessImage.getThumbnail(~size) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, ) graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, ) sourceless-shadowed seed BUILT -sourceless-shadowed proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. +sourceless-shadowed proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. Field 'Folder.images' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessFolderResolver.images, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessFolderResolver, so every query of the field will fail. Field 'Image.title' resolves to graphql.kickstart.tools.compat.scenarios.ShadowedImageResolver.title, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.ShadowedImageResolver, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. sourceless-shadowed kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. sourceless-shadowed kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless-shadowed kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1035,7 +1035,7 @@ sourceless-shadowed kind extend union Query = Folder BUILT Type 'Query' is defin sourceless-shadowed kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless-shadowed undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. sourceless-shadowed repeat extend type Query { folder: Folder! } SchemaError: Type 'Query' declares field 'folder' more than once at line 1, column 21. -sourceless-shadowed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless-shadowed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. sourceless-shadowed kind extend interface Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. sourceless-shadowed kind extend input Folder { compatZ: String } BUILT Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless-shadowed kind extend enum Folder { COMPAT_Z } BUILT Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1043,7 +1043,7 @@ sourceless-shadowed kind extend union Folder = Image BUILT Type 'Folder' is defi sourceless-shadowed kind extend scalar Folder @specifiedBy(url: "https://example.com") BUILT Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless-shadowed undeclared extend type Folder @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. sourceless-shadowed repeat extend type Folder { images: [Image!]! } SchemaError: Type 'Folder' declares field 'images' more than once at line 1, column 22. -sourceless-shadowed location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +sourceless-shadowed location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. sourceless-shadowed kind extend interface Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. sourceless-shadowed kind extend input Image { compatZ: String } BUILT Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless-shadowed kind extend enum Image { COMPAT_Z } BUILT Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1051,9 +1051,9 @@ sourceless-shadowed kind extend union Image = Folder BUILT Type 'Image' is defin sourceless-shadowed kind extend scalar Image @specifiedBy(url: "https://example.com") BUILT Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless-shadowed undeclared extend type Image @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. sourceless-shadowed repeat extend type Image { name: String! } SchemaError: Type 'Image' declares field 'name' more than once at line 1, column 21. -sourceless-shadowed location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +sourceless-shadowed location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. sourceless-unimplemented seed BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. -sourceless-unimplemented proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented proxy FieldResolverError: Field 'Query.folder' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessQuery.folder, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessQuery, so every query of the field will fail. Field 'Folder.images' resolves to graphql.kickstart.tools.compat.scenarios.SourcelessFolderResolver.images, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.SourcelessFolderResolver, so every query of the field will fail. Field 'Image.imageBlob' resolves to graphql.kickstart.tools.compat.scenarios.HelperImageResolver.imageBlob, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.HelperImageResolver, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. sourceless-unimplemented kind extend interface Query { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. sourceless-unimplemented kind extend input Query { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless-unimplemented kind extend enum Query { COMPAT_Z } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1061,7 +1061,7 @@ sourceless-unimplemented kind extend union Query = Folder BUILT Missing resolver sourceless-unimplemented kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless-unimplemented undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. sourceless-unimplemented repeat extend type Query { folder: Folder! } SchemaError: Type 'Query' declares field 'folder' more than once at line 1, column 21. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. -sourceless-unimplemented location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. sourceless-unimplemented kind extend interface Folder { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as an interface. The extension is ignored. sourceless-unimplemented kind extend input Folder { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless-unimplemented kind extend enum Folder { COMPAT_Z } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1069,7 +1069,7 @@ sourceless-unimplemented kind extend union Folder = Image BUILT Missing resolver sourceless-unimplemented kind extend scalar Folder @specifiedBy(url: "https://example.com") BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Folder' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless-unimplemented undeclared extend type Folder @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. sourceless-unimplemented repeat extend type Folder { images: [Image!]! } SchemaError: Type 'Folder' declares field 'images' more than once at line 1, column 22. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. -sourceless-unimplemented location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented location extend type Folder @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. sourceless-unimplemented kind extend interface Image { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as an interface. The extension is ignored. sourceless-unimplemented kind extend input Image { compatZ: String } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as an input object type. The extension is ignored. sourceless-unimplemented kind extend enum Image { COMPAT_Z } BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1077,9 +1077,9 @@ sourceless-unimplemented kind extend union Image = Folder BUILT Missing resolver sourceless-unimplemented kind extend scalar Image @specifiedBy(url: "https://example.com") BUILT Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. Type 'Image' is defined as an object type, but extended as a scalar. The extension is ignored. sourceless-unimplemented undeclared extend type Image @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. sourceless-unimplemented repeat extend type Image { name: String! } SchemaError: Type 'Image' declares field 'name' more than once at line 1, column 21. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. -sourceless-unimplemented location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. +sourceless-unimplemented location extend type Image @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Missing resolver for field: FieldDefinition{name='preview', type=TypeName{name='String'}, inputValueDefinitions=[], directives=[]} Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production. type-extensions seed BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions proxy FieldResolverError: Field 'Query.node' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.node, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions proxy FieldResolverError: Field 'Query.node' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.node, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. Field 'Query.search' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.search, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. Field 'Query.colors' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.colors, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. Field 'Query.shades' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.shades, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend interface Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions kind extend input Query { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions kind extend enum Query { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1087,13 +1087,13 @@ type-extensions kind extend union Query = Article BUILT Schema type was defined type-extensions kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend type Query { node(id: ID!): Node } SchemaError: Type 'Query' declares field 'node' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Query @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Query @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Query @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Query @owner(team: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Query @owner(team: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Query @owner(team: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @owner(team: 5) InvalidSchemaException: invalid schema: Invalid argument 'team' for applied directive of name 'owner' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @owner(team: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'team' for applied directive of name 'owner' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Query @owner(team: null) InvalidSchemaException: invalid schema: Invalid argument 'team' for applied directive of name 'owner' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend type Node { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as an object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend input Node { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as an input object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend enum Node { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as an enum. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. @@ -1101,11 +1101,11 @@ type-extensions kind extend union Node = Article BUILT Schema type was defined b type-extensions kind extend scalar Node @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Node' is defined as an interface, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions undeclared extend interface Node @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend interface Node { "The base id" id: ID! } SchemaError: Type 'Node' declares field 'id' more than once at line 1, column 25. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend interface Node @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend interface Node @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend interface Node @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend interface Node @owner SchemaError: Directive @owner at line 1, column 23 is applied to INTERFACE, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend interface Node @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to INTERFACE, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend interface Node @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend interface Node @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend interface Node @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend interface Node @owner SchemaError: Directive @owner at line 1, column 23 is applied to INTERFACE, but it's declared on OBJECT. Directive @owner at line 1, column 23 is missing its required argument 'team'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend interface Node @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 23 is applied to INTERFACE, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 23 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend interface Article { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as an interface. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend input Article { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as an input object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend enum Article { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as an enum. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. @@ -1113,13 +1113,13 @@ type-extensions kind extend union Article = Video BUILT Schema type was defined type-extensions kind extend scalar Article @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Article' is defined as an object type, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions undeclared extend type Article @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend type Article { id: ID! } SchemaError: Type 'Article' declares field 'id' more than once at line 1, column 23. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Article @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Article @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Article @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Article @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions argval extend type Article @owner(team: 5) SchemaError: Directive @owner at line 1, column 21 isn't repeatable but is applied more than once. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions argval extend type Article @owner(team: NOPE) SchemaError: Directive @owner at line 1, column 21 isn't repeatable but is applied more than once. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions argval extend type Article @owner(team: null) SchemaError: Directive @owner at line 1, column 21 isn't repeatable but is applied more than once. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend type Article @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Article @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend interface Video { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions kind extend input Video { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions kind extend enum Video { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1127,13 +1127,13 @@ type-extensions kind extend union Video = Article BUILT Schema type was defined type-extensions kind extend scalar Video @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Video' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions undeclared extend type Video @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend type Video { id: ID! } SchemaError: Type 'Video' declares field 'id' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Video @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Video @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Video @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Video @owner(team: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Video @owner(team: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend type Video @owner(team: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend type Video @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @owner(team: 5) InvalidSchemaException: invalid schema: Invalid argument 'team' for applied directive of name 'owner' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @owner(team: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'team' for applied directive of name 'owner' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend type Video @owner(team: null) InvalidSchemaException: invalid schema: Invalid argument 'team' for applied directive of name 'owner' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend type Video @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend type SearchResult { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an object type. The extension is ignored. type-extensions kind extend interface SearchResult { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an interface. The extension is ignored. type-extensions kind extend input SearchResult { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as an input object type. The extension is ignored. @@ -1141,11 +1141,11 @@ type-extensions kind extend enum SearchResult { COMPAT_Z } BUILT Schema type was type-extensions kind extend scalar SearchResult @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'SearchResult' is defined as a union, but extended as a scalar. The extension is ignored. type-extensions undeclared extend union SearchResult @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend union SearchResult = Article SchemaError: Type 'SearchResult' declares member 'Article' more than once at line 1, column 29. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend union SearchResult @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend union SearchResult @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend union SearchResult @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend union SearchResult @owner SchemaError: Directive @owner at line 1, column 27 is applied to UNION, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend union SearchResult @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to UNION, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend union SearchResult @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend union SearchResult @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend union SearchResult @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend union SearchResult @owner SchemaError: Directive @owner at line 1, column 27 is applied to UNION, but it's declared on OBJECT. Directive @owner at line 1, column 27 is missing its required argument 'team'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend union SearchResult @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 27 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend type Color { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as an object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend interface Color { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as an interface. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend input Color { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as an input object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. @@ -1153,11 +1153,11 @@ type-extensions kind extend union Color = Article BUILT Schema type was defined type-extensions kind extend scalar Color @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Color' is defined as an enum, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions undeclared extend enum Color @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend enum Color { RED } SchemaError: Type 'Color' declares value 'RED' more than once at line 1, column 21. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend enum Color @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend enum Color @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend enum Color @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend enum Color @owner SchemaError: Directive @owner at line 1, column 19 is applied to ENUM, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend enum Color @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend enum Color @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend enum Color @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend enum Color @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend enum Color @owner SchemaError: Directive @owner at line 1, column 19 is applied to ENUM, but it's declared on OBJECT. Directive @owner at line 1, column 19 is missing its required argument 'team'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend enum Color @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend type Filter { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as an object type. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend interface Filter { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as an interface. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend enum Filter { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as an enum. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. @@ -1165,11 +1165,11 @@ type-extensions kind extend union Filter = Article BUILT Schema type was defined type-extensions kind extend scalar Filter @specifiedBy(url: "https://example.com") BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Filter' is defined as an input object type, but extended as a scalar. The extension is ignored. Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions undeclared extend input Filter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions repeat extend input Filter { term: String } SchemaError: Type 'Filter' declares field 'term' more than once at line 1, column 23. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend input Filter @tag(name: 5) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend input Filter @tag(name: NOPE) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions argval extend input Filter @tag(name: null) InvalidSchemaException: invalid schema: Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend input Filter @owner SchemaError: Directive @owner at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on OBJECT. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. -type-extensions location extend input Filter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on SCALAR. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend input Filter @tag(name: 5) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend input Filter @tag(name: NOPE) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions argval extend input Filter @tag(name: null) InvalidSchemaException: invalid schema: Invalid argument 'name' for applied directive of name 'tag' Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend input Filter @owner SchemaError: Directive @owner at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on OBJECT. Directive @owner at line 1, column 21 is missing its required argument 'team'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. +type-extensions location extend input Filter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions kind extend interface Note { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions kind extend input Note { compatZ: String } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions kind extend enum Note { COMPAT_Z } BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. Type 'Note' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1185,23 +1185,23 @@ type-extensions argval extend type Note @owner(team: NOPE) BUILT Schema type was type-extensions argval extend type Note @owner(team: null) BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions location extend type Note @specifiedBy BUILT Schema type was defined but can never be accessed, and can be safely deleted: Note Type 'Note' is defined as an object type, but extended as a union. The extension is ignored. type-extensions-input-order seed BUILT -type-extensions-input-order proxy FieldResolverError: Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsInputOrderQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsInputOrderQuery, so every query of the field will fail. +type-extensions-input-order proxy FieldResolverError: Field 'Query.count' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsInputOrderQuery.count, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsInputOrderQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. type-extensions-input-order kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-input-order kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-input-order kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. type-extensions-input-order kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions-input-order undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-input-order repeat extend type Query { count(filter: Filter): Int! } SchemaError: Type 'Query' declares field 'count' more than once at line 1, column 21. -type-extensions-input-order location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-input-order location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. type-extensions-input-order kind extend type Filter { compatZ: String } BUILT Type 'Filter' is defined as an input object type, but extended as an object type. The extension is ignored. type-extensions-input-order kind extend interface Filter { compatZ: String } BUILT Type 'Filter' is defined as an input object type, but extended as an interface. The extension is ignored. type-extensions-input-order kind extend enum Filter { COMPAT_Z } BUILT Type 'Filter' is defined as an input object type, but extended as an enum. The extension is ignored. type-extensions-input-order kind extend scalar Filter @specifiedBy(url: "https://example.com") BUILT Type 'Filter' is defined as an input object type, but extended as a scalar. The extension is ignored. type-extensions-input-order undeclared extend input Filter @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-input-order repeat extend input Filter { term: String } SchemaError: Type 'Filter' declares field 'term' more than once at line 1, column 23. -type-extensions-input-order location extend input Filter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on SCALAR. +type-extensions-input-order location extend input Filter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 21 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 21 is missing its required argument 'url'. type-extensions-repeated-fields seed SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. -type-extensions-repeated-fields proxy FieldResolverError: Field 'Query.typeAndExtension' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery.typeAndExtension, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery, so every query of the field will fail. +type-extensions-repeated-fields proxy FieldResolverError: Field 'Query.typeAndExtension' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery.typeAndExtension, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery, so every query of the field will fail. Field 'Query.twoExtensions' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery.twoExtensions, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery, so every query of the field will fail. Field 'Query.oneDefinition' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery.oneDefinition, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery, so every query of the field will fail. Field 'Query.echo' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery.echo, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsRepeatedFieldsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. type-extensions-repeated-fields kind extend interface Query { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-repeated-fields kind extend input Query { compatZ: String } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-repeated-fields kind extend enum Query { COMPAT_Z } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1259,7 +1259,7 @@ type-extensions-repeated-fields undeclared extend input InputOneDefinition @comp type-extensions-repeated-fields repeat extend input InputOneDefinition { "The first" id: ID } SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. type-extensions-repeated-fields location extend input InputOneDefinition @specifiedBy SchemaError: Type 'InputTypeAndExtension' declares field 'id' more than once at line 49, column 5 in compat/scenarios/type-extensions-repeated-fields/schema.graphqls. type-extensions-sealed seed BUILT -type-extensions-sealed proxy FieldResolverError: Field 'Query.pets' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery.pets, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery, so every query of the field will fail. +type-extensions-sealed proxy FieldResolverError: Field 'Query.pets' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery.pets, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery, so every query of the field will fail. Field 'Query.animals' resolves to graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery.animals, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.TypeExtensionsSealedQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. type-extensions-sealed kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-sealed kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-sealed kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1267,7 +1267,7 @@ type-extensions-sealed kind extend union Query = Dog BUILT Type 'Query' is defin type-extensions-sealed kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend type Query { pets: [Pet!]! } SchemaError: Type 'Query' declares field 'pets' more than once at line 1, column 21. -type-extensions-sealed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. type-extensions-sealed kind extend type Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an object type. The extension is ignored. type-extensions-sealed kind extend interface Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an interface. The extension is ignored. type-extensions-sealed kind extend input Pet { compatZ: String } BUILT Type 'Pet' is defined as a union, but extended as an input object type. The extension is ignored. @@ -1275,7 +1275,7 @@ type-extensions-sealed kind extend enum Pet { COMPAT_Z } BUILT Type 'Pet' is def type-extensions-sealed kind extend scalar Pet @specifiedBy(url: "https://example.com") BUILT Type 'Pet' is defined as a union, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend union Pet @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend union Pet = Dog SchemaError: Type 'Pet' declares member 'Dog' more than once at line 1, column 20. -type-extensions-sealed location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. +type-extensions-sealed location extend union Pet @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 18 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 18 is missing its required argument 'url'. type-extensions-sealed kind extend interface Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-sealed kind extend input Dog { compatZ: String } BUILT Type 'Dog' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-sealed kind extend enum Dog { COMPAT_Z } BUILT Type 'Dog' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1283,7 +1283,7 @@ type-extensions-sealed kind extend union Dog = Cat BUILT Type 'Dog' is defined a type-extensions-sealed kind extend scalar Dog @specifiedBy(url: "https://example.com") BUILT Type 'Dog' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend type Dog @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend type Dog { name: String } SchemaError: Type 'Dog' declares field 'name' more than once at line 1, column 19. -type-extensions-sealed location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed location extend type Dog @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 17 is missing its required argument 'url'. type-extensions-sealed kind extend interface Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-sealed kind extend input Cat { compatZ: String } BUILT Type 'Cat' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-sealed kind extend enum Cat { COMPAT_Z } BUILT Type 'Cat' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1291,7 +1291,7 @@ type-extensions-sealed kind extend union Cat = Dog BUILT Type 'Cat' is defined a type-extensions-sealed kind extend scalar Cat @specifiedBy(url: "https://example.com") BUILT Type 'Cat' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend type Cat @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend type Cat { lives: Int } SchemaError: Type 'Cat' declares field 'lives' more than once at line 1, column 19. -type-extensions-sealed location extend type Cat @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed location extend type Cat @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 17 is missing its required argument 'url'. type-extensions-sealed kind extend type Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an object type. The extension is ignored. type-extensions-sealed kind extend input Animal { compatZ: String } BUILT Type 'Animal' is defined as an interface, but extended as an input object type. The extension is ignored. type-extensions-sealed kind extend enum Animal { COMPAT_Z } BUILT Type 'Animal' is defined as an interface, but extended as an enum. The extension is ignored. @@ -1299,7 +1299,7 @@ type-extensions-sealed kind extend union Animal = Dog BUILT Type 'Animal' is def type-extensions-sealed kind extend scalar Animal @specifiedBy(url: "https://example.com") BUILT Type 'Animal' is defined as an interface, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend interface Animal @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend interface Animal { name: String } SchemaError: Type 'Animal' declares field 'name' more than once at line 1, column 27. -type-extensions-sealed location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. +type-extensions-sealed location extend interface Animal @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INTERFACE, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. type-extensions-sealed kind extend interface Cow { compatZ: String } BUILT Type 'Cow' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-sealed kind extend input Cow { compatZ: String } BUILT Type 'Cow' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-sealed kind extend enum Cow { COMPAT_Z } BUILT Type 'Cow' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1307,7 +1307,7 @@ type-extensions-sealed kind extend union Cow = Dog BUILT Type 'Cow' is defined a type-extensions-sealed kind extend scalar Cow @specifiedBy(url: "https://example.com") BUILT Type 'Cow' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend type Cow @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend type Cow { name: String } SchemaError: Type 'Cow' declares field 'name' more than once at line 1, column 19. -type-extensions-sealed location extend type Cow @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed location extend type Cow @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 17 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 17 is missing its required argument 'url'. type-extensions-sealed kind extend interface Horse { compatZ: String } BUILT Type 'Horse' is defined as an object type, but extended as an interface. The extension is ignored. type-extensions-sealed kind extend input Horse { compatZ: String } BUILT Type 'Horse' is defined as an object type, but extended as an input object type. The extension is ignored. type-extensions-sealed kind extend enum Horse { COMPAT_Z } BUILT Type 'Horse' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1315,46 +1315,46 @@ type-extensions-sealed kind extend union Horse = Dog BUILT Type 'Horse' is defin type-extensions-sealed kind extend scalar Horse @specifiedBy(url: "https://example.com") BUILT Type 'Horse' is defined as an object type, but extended as a scalar. The extension is ignored. type-extensions-sealed undeclared extend type Horse @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. type-extensions-sealed repeat extend type Horse { name: String } SchemaError: Type 'Horse' declares field 'name' more than once at line 1, column 21. -type-extensions-sealed location extend type Horse @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +type-extensions-sealed location extend type Horse @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. unmapped-inputs seed BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. -unmapped-inputs proxy FieldResolverError: Field 'Query.ignored' resolves to graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery.ignored, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery, so every query of the field will fail. +unmapped-inputs proxy FieldResolverError: Field 'Query.ignored' resolves to graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery.ignored, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery, so every query of the field will fail. Field 'Query.typo' resolves to graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery.typo, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.UnmappedInputsQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. unmapped-inputs kind extend interface Query { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. unmapped-inputs kind extend input Query { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. unmapped-inputs kind extend enum Query { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. unmapped-inputs kind extend scalar Query @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'Query' is defined as an object type, but extended as a scalar. The extension is ignored. unmapped-inputs undeclared extend type Query @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. unmapped-inputs repeat extend type Query { ignored(input: IgnoredInput!): String } SchemaError: Type 'Query' declares field 'ignored' more than once at line 1, column 21. -unmapped-inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +unmapped-inputs location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. unmapped-inputs kind extend type IgnoredInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as an object type. The extension is ignored. unmapped-inputs kind extend interface IgnoredInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as an interface. The extension is ignored. unmapped-inputs kind extend enum IgnoredInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as an enum. The extension is ignored. unmapped-inputs kind extend scalar IgnoredInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'IgnoredInput' is defined as an input object type, but extended as a scalar. The extension is ignored. unmapped-inputs undeclared extend input IgnoredInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. unmapped-inputs repeat extend input IgnoredInput { inner: InnerInput } SchemaError: Type 'IgnoredInput' declares field 'inner' more than once at line 1, column 29. -unmapped-inputs location extend input IgnoredInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs location extend input IgnoredInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 27 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 27 is missing its required argument 'url'. unmapped-inputs kind extend type InnerInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as an object type. The extension is ignored. unmapped-inputs kind extend interface InnerInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as an interface. The extension is ignored. unmapped-inputs kind extend enum InnerInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as an enum. The extension is ignored. unmapped-inputs kind extend scalar InnerInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'InnerInput' is defined as an input object type, but extended as a scalar. The extension is ignored. unmapped-inputs undeclared extend input InnerInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. unmapped-inputs repeat extend input InnerInput { name: String } SchemaError: Type 'InnerInput' declares field 'name' more than once at line 1, column 27. -unmapped-inputs location extend input InnerInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs location extend input InnerInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. unmapped-inputs kind extend type TypoInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as an object type. The extension is ignored. unmapped-inputs kind extend interface TypoInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as an interface. The extension is ignored. unmapped-inputs kind extend enum TypoInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as an enum. The extension is ignored. unmapped-inputs kind extend scalar TypoInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'TypoInput' is defined as an input object type, but extended as a scalar. The extension is ignored. unmapped-inputs undeclared extend input TypoInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. unmapped-inputs repeat extend input TypoInput { item: ItemInput } SchemaError: Type 'TypoInput' declares field 'item' more than once at line 1, column 26. -unmapped-inputs location extend input TypoInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs location extend input TypoInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 24 is missing its required argument 'url'. unmapped-inputs kind extend type ItemInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as an object type. The extension is ignored. unmapped-inputs kind extend interface ItemInput { compatZ: String } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as an interface. The extension is ignored. unmapped-inputs kind extend enum ItemInput { COMPAT_Z } BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as an enum. The extension is ignored. unmapped-inputs kind extend scalar ItemInput @specifiedBy(url: "https://example.com") BUILT Input field 'ItemInput.name' has no matching property in graphql.kickstart.tools.compat.scenarios.ItemInput. Converting argument 'input' of field 'Query.typo' fails whenever the field is sent. Known properties: nmae. Rename the property or map it with @JsonProperty("name"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class. Type 'ItemInput' is defined as an input object type, but extended as a scalar. The extension is ignored. unmapped-inputs undeclared extend input ItemInput @compatUndeclared SchemaError: Found applied directive compatUndeclared without corresponding directive definition. unmapped-inputs repeat extend input ItemInput { name: String } SchemaError: Type 'ItemInput' declares field 'name' more than once at line 1, column 26. -unmapped-inputs location extend input ItemInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. +unmapped-inputs location extend input ItemInput @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 24 is missing its required argument 'url'. wiring-shapes seed BUILT -wiring-shapes proxy FieldResolverError: Field 'Query.trees' resolves to graphql.kickstart.tools.compat.scenarios.WiringShapesQuery.trees, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.WiringShapesQuery, so every query of the field will fail. +wiring-shapes proxy FieldResolverError: Field 'Query.trees' resolves to graphql.kickstart.tools.compat.scenarios.WiringShapesQuery.trees, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.WiringShapesQuery, so every query of the field will fail. Field 'Query.person' resolves to graphql.kickstart.tools.compat.scenarios.WiringShapesQuery.person, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.WiringShapesQuery, so every query of the field will fail. Field 'Query.someone' resolves to graphql.kickstart.tools.compat.scenarios.WiringShapesQuery.someone, but the resolver is a jdk.proxyN.$ProxyN, which isn't a graphql.kickstart.tools.compat.scenarios.WiringShapesQuery, so every query of the field will fail. This happens with JDK dynamic proxies, which only implement interfaces. Use class-based proxies instead, e.g. proxyTargetClass = true in Spring. wiring-shapes kind extend interface Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an interface. The extension is ignored. wiring-shapes kind extend input Query { compatZ: String } BUILT Type 'Query' is defined as an object type, but extended as an input object type. The extension is ignored. wiring-shapes kind extend enum Query { COMPAT_Z } BUILT Type 'Query' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1365,7 +1365,7 @@ wiring-shapes repeat extend type Query { trees(filter: TreeFilter): Int } Schema wiring-shapes location extend type Query @inspect SchemaError: Directive @inspect at line 1, column 19 is applied to OBJECT, but it's declared on INPUT_FIELD_DEFINITION. wiring-shapes location extend type Query @required SchemaError: Directive @required at line 1, column 19 is applied to OBJECT, but it's declared on FIELD_DEFINITION. wiring-shapes repeat-directive extend type Query @described @described SchemaError: Directive @described at line 1, column 30 isn't repeatable but is applied more than once. -wiring-shapes location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. +wiring-shapes location extend type Query @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. wiring-shapes kind extend type TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an object type. The extension is ignored. wiring-shapes kind extend interface TreeFilter { compatZ: String } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an interface. The extension is ignored. wiring-shapes kind extend enum TreeFilter { COMPAT_Z } BUILT Type 'TreeFilter' is defined as an input object type, but extended as an enum. The extension is ignored. @@ -1376,7 +1376,7 @@ wiring-shapes repeat extend input TreeFilter { name: String } SchemaError: Type wiring-shapes location extend input TreeFilter @inspect SchemaError: Directive @inspect at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on INPUT_FIELD_DEFINITION. wiring-shapes location extend input TreeFilter @required SchemaError: Directive @required at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on FIELD_DEFINITION. wiring-shapes repeat-directive extend input TreeFilter @described @described SchemaError: Directive @described at line 1, column 25 isn't repeatable but is applied more than once. -wiring-shapes location extend input TreeFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. +wiring-shapes location extend input TreeFilter @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 25 is applied to INPUT_OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 25 is missing its required argument 'url'. wiring-shapes kind extend type Named { compatZ: String } BUILT Type 'Named' is defined as an interface, but extended as an object type. The extension is ignored. wiring-shapes kind extend input Named { compatZ: String } BUILT Type 'Named' is defined as an interface, but extended as an input object type. The extension is ignored. wiring-shapes kind extend enum Named { COMPAT_Z } BUILT Type 'Named' is defined as an interface, but extended as an enum. The extension is ignored. @@ -1387,7 +1387,7 @@ wiring-shapes repeat extend interface Named { name: String } SchemaError: Type ' wiring-shapes location extend interface Named @inspect SchemaError: Directive @inspect at line 1, column 24 is applied to INTERFACE, but it's declared on INPUT_FIELD_DEFINITION. wiring-shapes location extend interface Named @required SchemaError: Directive @required at line 1, column 24 is applied to INTERFACE, but it's declared on FIELD_DEFINITION. wiring-shapes repeat-directive extend interface Named @described @described SchemaError: Directive @described at line 1, column 24 isn't repeatable but is applied more than once. -wiring-shapes location extend interface Named @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INTERFACE, but it's declared on SCALAR. +wiring-shapes location extend interface Named @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 24 is applied to INTERFACE, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 24 is missing its required argument 'url'. wiring-shapes kind extend interface Person { compatZ: String } BUILT Type 'Person' is defined as an object type, but extended as an interface. The extension is ignored. wiring-shapes kind extend input Person { compatZ: String } BUILT Type 'Person' is defined as an object type, but extended as an input object type. The extension is ignored. wiring-shapes kind extend enum Person { COMPAT_Z } BUILT Type 'Person' is defined as an object type, but extended as an enum. The extension is ignored. @@ -1397,7 +1397,7 @@ wiring-shapes repeat extend type Person { name: String } SchemaError: Type 'Pers wiring-shapes location extend type Person @inspect SchemaError: Directive @inspect at line 1, column 20 is applied to OBJECT, but it's declared on INPUT_FIELD_DEFINITION. wiring-shapes location extend type Person @required SchemaError: Directive @required at line 1, column 20 is applied to OBJECT, but it's declared on FIELD_DEFINITION. wiring-shapes repeat-directive extend type Person @described @described SchemaError: Directive @described at line 1, column 20 isn't repeatable but is applied more than once. -wiring-shapes location extend type Person @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. +wiring-shapes location extend type Person @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 20 is applied to OBJECT, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 20 is missing its required argument 'url'. wiring-shapes kind extend type Someone { compatZ: String } BUILT Type 'Someone' is defined as a union, but extended as an object type. The extension is ignored. wiring-shapes kind extend interface Someone { compatZ: String } BUILT Type 'Someone' is defined as a union, but extended as an interface. The extension is ignored. wiring-shapes kind extend input Someone { compatZ: String } BUILT Type 'Someone' is defined as a union, but extended as an input object type. The extension is ignored. @@ -1408,7 +1408,7 @@ wiring-shapes repeat extend union Someone = Person SchemaError: Type 'Someone' d wiring-shapes location extend union Someone @inspect SchemaError: Directive @inspect at line 1, column 22 is applied to UNION, but it's declared on INPUT_FIELD_DEFINITION. wiring-shapes location extend union Someone @required SchemaError: Directive @required at line 1, column 22 is applied to UNION, but it's declared on FIELD_DEFINITION. wiring-shapes repeat-directive extend union Someone @described @described SchemaError: Directive @described at line 1, column 22 isn't repeatable but is applied more than once. -wiring-shapes location extend union Someone @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to UNION, but it's declared on SCALAR. +wiring-shapes location extend union Someone @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 22 is applied to UNION, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 22 is missing its required argument 'url'. wiring-shapes kind extend type State { compatZ: String } BUILT Type 'State' is defined as an enum, but extended as an object type. The extension is ignored. wiring-shapes kind extend interface State { compatZ: String } BUILT Type 'State' is defined as an enum, but extended as an interface. The extension is ignored. wiring-shapes kind extend input State { compatZ: String } BUILT Type 'State' is defined as an enum, but extended as an input object type. The extension is ignored. @@ -1419,4 +1419,4 @@ wiring-shapes repeat extend enum State { ALIVE } SchemaError: Type 'State' decla wiring-shapes location extend enum State @inspect SchemaError: Directive @inspect at line 1, column 19 is applied to ENUM, but it's declared on INPUT_FIELD_DEFINITION. wiring-shapes location extend enum State @required SchemaError: Directive @required at line 1, column 19 is applied to ENUM, but it's declared on FIELD_DEFINITION. wiring-shapes repeat-directive extend enum State @described @described SchemaError: Directive @described at line 1, column 19 isn't repeatable but is applied more than once. -wiring-shapes location extend enum State @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. +wiring-shapes location extend enum State @specifiedBy SchemaError: Directive @specifiedBy at line 1, column 19 is applied to ENUM, but it's declared on SCALAR. Directive @specifiedBy at line 1, column 19 is missing its required argument 'url'. From 137ca1c515639f15eab22865df09eca1d867757a Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:24:45 -0500 Subject: [PATCH 29/64] Let each quoted name of a seed or proxy error come from any WARN A proxy error lists every field it can't call, and the last minor warned once per field. --- .../graphql/kickstart/tools/compat/CompatTest.kt | 11 ++++++----- .../kotlin/graphql/kickstart/tools/compat/Variants.kt | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt index 4611de5e..5f38897b 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -43,8 +43,9 @@ class CompatTest { fun repeatsSeedBreak(key: CaseKey) = key != key.seed && outcomes[key.seed]?.error == outcomes.getValue(key).error fun warnedOnRelease(key: CaseKey): Boolean { val ownWarnings = released.getValue(key).warnings - if (key == key.seed) emptySet() else released.getValue(key.seed).warnings.toSet() - val names = warnNames.getValue(key).ifEmpty { namesIn(outcomes.getValue(key).error!!) } - return ownWarnings.any { warning -> names.all { alternatives -> alternatives.any { warning.names(it) } } } + val names = warnNames.getValue(key) + if (names.isEmpty()) return namesIn(outcomes.getValue(key).error!!).all { name -> ownWarnings.any { it.names(name) } } + return ownWarnings.any { warning -> names.all { alternatives -> alternatives.any(warning::names) } } } fun isAccepted(key: CaseKey) = accepted.any { it.matches(key) } @@ -128,9 +129,9 @@ private fun list(keys: List, detail: (CaseKey) -> String? = { null }) = keys.take(SHOWN).joinToString("\n") { key -> " $key" + detail(key)?.let { "\n $it" }.orEmpty() } + if (keys.size > SHOWN) "\n and ${keys.size - SHOWN} more" else "" -// an error without a snippet to name the type and item names them itself, in quotes, or not at all -private fun namesIn(error: String): List> = - Regex("(? = + Regex("(?>, val build: () -> Unit) From bd13cb747fcb18a04584b9339e76313ad40c2a32 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:29:35 -0500 Subject: [PATCH 30/64] Name what the WARN rule and the module setup do instead of commenting --- .../kickstart/tools/compat/CompatTest.kt | 20 ++++++++++--------- .../kickstart/tools/compat/Variants.kt | 20 ++++++++----------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt index 5f38897b..4636b741 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -14,10 +14,7 @@ import java.io.File class CompatTest { @Test fun `cases that built on the last release still build`() { - // the tests run in the library's module, which neither reads logback's nor exports the scenarios to kotlin-reflect - val module = CompatTest::class.java.module - listOf("ch.qos.logback.classic", "ch.qos.logback.core").forEach { ModuleLayer.boot().findModule(it).ifPresent(module::addReads) } - ModuleLayer.boot().findModule("kotlin.reflect").ifPresent { module.addExports(Scenario::class.java.packageName, it) } + readLogbackAndExportScenariosToKotlinReflect() if (SCENARIOS.isEmpty()) return fail("No scenarios in ${Scenario::class.java.packageName}, so nothing is checked.") val variants = SCENARIOS.flatMap(::variants) val outcomes = runAll(variants) @@ -37,14 +34,14 @@ class CompatTest { val acceptedFile = File(dir, "accepted.txt") val accepted = readAccepted(acceptedFile) val major = version.major > release.major - val warnNames = variants.associate { it.key to it.warnNames } + val warnMustNameOneOfEach = variants.associate { it.key to it.warnMustNameOneOfEach } fun builtWithItsSeedOnRelease(key: CaseKey) = released[key.seed]?.built == true && released.getValue(key).built fun repeatsSeedBreak(key: CaseKey) = key != key.seed && outcomes[key.seed]?.error == outcomes.getValue(key).error fun warnedOnRelease(key: CaseKey): Boolean { val ownWarnings = released.getValue(key).warnings - if (key == key.seed) emptySet() else released.getValue(key.seed).warnings.toSet() - val names = warnNames.getValue(key) - if (names.isEmpty()) return namesIn(outcomes.getValue(key).error!!).all { name -> ownWarnings.any { it.names(name) } } + val names = warnMustNameOneOfEach.getValue(key) + if (names.isEmpty()) return quotedNamesOrWholeMessage(outcomes.getValue(key).error!!).all { name -> ownWarnings.any { it.names(name) } } return ownWarnings.any { warning -> names.all { alternatives -> alternatives.any(warning::names) } } } fun isAccepted(key: CaseKey) = accepted.any { it.matches(key) } @@ -129,12 +126,17 @@ private fun list(keys: List, detail: (CaseKey) -> String? = { null }) = keys.take(SHOWN).joinToString("\n") { key -> " $key" + detail(key)?.let { "\n $it" }.orEmpty() } + if (keys.size > SHOWN) "\n and ${keys.size - SHOWN} more" else "" -// the library's errors quote the types and items they name; an error that quotes none has to be in a WARN whole -private fun namesIn(error: String): List = +private fun quotedNamesOrWholeMessage(error: String): List = Regex("(?): Map { val logger = LoggerFactory.getLogger("graphql.kickstart.tools") as Logger val appender = ListAppender().apply { start() } diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt index 287a85f0..ed0a7998 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/Variants.kt @@ -25,26 +25,22 @@ data class CaseKey(val scenario: String, val operator: String, val snippet: Stri override fun toString() = listOf(scenario, operator, snippet).filter { it.isNotEmpty() }.joinToString(" | ") } -/** - * [warnNames] is what a release's WARN has to name to count as a warning about this case: one name out of each set. Seed - * and proxy cases have none, because only their error says what broke, so the WARNs have to name what the error quotes. - */ -class Variant(val key: CaseKey, val warnNames: List>, val build: () -> Unit) +class Variant(val key: CaseKey, val warnMustNameOneOfEach: List>, val build: () -> Unit) fun variants(scenario: Scenario): List { fun variant( operator: String, snippet: String = "", - warnNames: List> = emptyList(), + warnMustNameOneOfEach: List> = emptyList(), resolvers: () -> List> = { scenario.resolvers } - ) = Variant(CaseKey(scenario.name, operator, snippet), warnNames) { + ) = Variant(CaseKey(scenario.name, operator, snippet), warnMustNameOneOfEach) { val builder = scenario.parser(resolvers()) if (snippet.isNotEmpty()) builder.schemaString(snippet) scenario.schema(builder.build()) } return listOf(variant("seed"), variant("proxy") { scenario.resolvers.map { ProxyFactory(it).proxy as GraphQLResolver<*> } }) + - snippets(scenario).map { (key, warnNames) -> variant(key.first, key.second, warnNames) } + snippets(scenario).map { (key, warnMustNameOneOfEach) -> variant(key.first, key.second, warnMustNameOneOfEach) } } private val KINDS: Map, String> = mapOf( @@ -70,12 +66,12 @@ private fun snippets(scenario: Scenario): Map, List) = snippets.putIfAbsent(operator to snippet, warnNames.toList()) - // a WARN about a directive in an extension may point at the application instead of naming the type + fun add(operator: String, snippet: String, vararg warnMustNameOneOfEach: Set) = + snippets.putIfAbsent(operator to snippet, warnMustNameOneOfEach.toList()) fun addDirective(operator: String, directive: String, applications: String) { val snippet = "extend $kind ${type.name} $applications" - val positions = Regex("@$directive\\b").findAll(snippet).map { "line 1, column ${it.range.first + 1}" } - add(operator, snippet, setOf(directive), setOf(type.name) + positions) + val applicationPositions = Regex("@$directive\\b").findAll(snippet).map { "line 1, column ${it.range.first + 1}" } + add(operator, snippet, setOf(directive), setOf(type.name) + applicationPositions) } for (other in KINDS.values - kind) { From d22571e5c1bc1577af060d5548af2ee5b516e5f0 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:29:35 -0500 Subject: [PATCH 31/64] Quote the scenario classes by their new package and describe accepted.txt The probe prints graphql.kickstart.tools.compat.scenarios.* since the move, so the feature pages quote that. A repeated directive's error names the directive and its line, not the type. The rule table says what CompatTest checks: input that built keeps building. --- .../skills/verify-tools/features/arguments-and-inputs.md | 8 ++++---- .../verify-tools/features/context-and-environment.md | 6 +++--- .claude/skills/verify-tools/features/generic-wrappers.md | 9 +++++---- .../features/optional-data-fetcher-results.md | 3 ++- .claude/skills/verify-tools/features/proxies.md | 4 ++-- .claude/skills/verify-tools/features/schema-building.md | 6 ++++-- .claude/skills/verify-tools/features/type-extensions.md | 4 +++- AGENTS.md | 7 +++++-- 8 files changed, 28 insertions(+), 19 deletions(-) diff --git a/.claude/skills/verify-tools/features/arguments-and-inputs.md b/.claude/skills/verify-tools/features/arguments-and-inputs.md index de820272..87b9acca 100644 --- a/.claude/skills/verify-tools/features/arguments-and-inputs.md +++ b/.claude/skills/verify-tools/features/arguments-and-inputs.md @@ -44,10 +44,10 @@ from an explicit `null` (`Optional.empty()`). `Validation error (WrongType@[search])` and names `POETRY`. - **Unmapped input fields.** `run unmapped-inputs`. Exit `0`. `probe.log` has exactly one `UnmappedInputFieldChecker` WARN, starting `Input field 'ItemInput.name' has no matching property in - scenarios.ItemInput` and listing `Known properties: nmae`. There is no WARN for `InnerInput.legacy`. - `01-ignored.json` has `data.ignored = "a"`. `02-typo.json` has one error containing - `Unrecognized property "name" (class scenarios.ItemInput)` (`Unrecognized field` before Jackson 3, in 14.x), which shows - the reported field really fails. + graphql.kickstart.tools.compat.scenarios.ItemInput` and listing `Known properties: nmae`. There is no WARN for + `InnerInput.legacy`. `01-ignored.json` has `data.ignored = "a"`. `02-typo.json` has one error containing + `Unrecognized property "name" (class graphql.kickstart.tools.compat.scenarios.ItemInput)` (`Unrecognized field` before + Jackson 3, in 14.x), which shows the reported field really fails. - **Type variable parameters.** `run generic-input-resolver`. Exit `0`. `summary.txt` shows `errors=0` for both operations. `02-generic.json` has `data.generic = "generic got GreetingInput(name=a)"`, and `01-plain.json` has diff --git a/.claude/skills/verify-tools/features/context-and-environment.md b/.claude/skills/verify-tools/features/context-and-environment.md index 41266e4f..b61fc427 100644 --- a/.claude/skills/verify-tools/features/context-and-environment.md +++ b/.claude/skills/verify-tools/features/context-and-environment.md @@ -24,7 +24,7 @@ Any other trailing parameter type fails the build with "No method found". - **Invalid.** `run context-and-environment-invalid`. Exit `2`. `build-error.txt` starts with `graphql.kickstart.tools.resolver.FieldResolverError: No method found ... (optionally followed by any of [interface graphql.schema.DataFetchingEnvironment, class graphql.GraphQLContext, class - scenarios.AppContext])`. + graphql.kickstart.tools.compat.scenarios.AppContext])`. - **Misbound.** `run context-misbound`. Exit `2`, no operations run, and `probe.log` is empty. `build-error.txt` starts with `graphql.kickstart.tools.resolver.FieldResolverError: Field 'Query.users' has no parameter for its argument 'first: Int' in graphql.kickstart.tools.compat.scenarios.ContextMisboundQuery.users, so the DataFetchingEnvironment @@ -43,8 +43,8 @@ Any other trailing parameter type fails the build with "No method found". operation is not implemented: Schema resolver not implemented"}`. - `run sourceless-misbound`: exit `2`. `thumbnail(GraphQLContext, env)` for `thumbnail(size: Int)` still fails the build. The signatures listed for `compat/scenarios/sourceless-misbound/schema.graphqls:11` end with - `scenarios.MisboundImageResolver.thumbnail(~size, )` and - `scenarios.MisboundImageResolver.getThumbnail(~size, )`. + `graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.thumbnail(~size, )` and + `graphql.kickstart.tools.compat.scenarios.MisboundImageResolver.getThumbnail(~size, )`. ## Gotchas diff --git a/.claude/skills/verify-tools/features/generic-wrappers.md b/.claude/skills/verify-tools/features/generic-wrappers.md index 88211778..ef2c57d8 100644 --- a/.claude/skills/verify-tools/features/generic-wrappers.md +++ b/.claude/skills/verify-tools/features/generic-wrappers.md @@ -46,13 +46,14 @@ the lists, and combines the futures below the outermost value into one, so one f ## Gotchas - Before #903 (commit a4736c9a) `nested-wrappers` still exits `0`. `02`, `07`, `08` and `10` have an error per element, - `Expected source object to be an instance of '' but instead got 'scenarios.Try$Success'`, and `04`, `06`, `09` - and `11` the same with `'java.util.concurrent.CompletableFuture'`. `03-payload-strings.json` has + `Expected source object to be an instance of '' but instead got + 'graphql.kickstart.tools.compat.scenarios.Try$Success'`, and `04`, `06`, `09` and `11` the same with + `'java.util.concurrent.CompletableFuture'`. `03-payload-strings.json` has `["Success(value=a)", "Success(value=b)"]` and `05-item-names.json` has `java.util.concurrent.CompletableFuture@[Completed normally]` strings, both with `errors=0`. - Before #903 `nested-wrappers-suspend` fails the build (exit `2`) with `SchemaClassScannerError: Two different classes used - for type Item`, naming `java.util.concurrent.CompletableFuture` for `nullableItems` and - `scenarios.NestedItem` for `nonNullItems`. + for type Item`, naming `java.util.concurrent.CompletableFuture` for + `nullableItems` and `graphql.kickstart.tools.compat.scenarios.NestedItem` for `nonNullItems`. - Before #903 `nested-wrappers-unboxer` had `errors=0` for `01` to `09`, because the app's `ValueUnboxer` did the unwrapping. `10` and `11` were `THREW java.lang.IllegalStateException` in `summary.txt`, with `{"threw": ...}` in the JSON, because the failed element's exception left `execute`. Now they return `errors=1` like `nested-wrappers`. diff --git a/.claude/skills/verify-tools/features/optional-data-fetcher-results.md b/.claude/skills/verify-tools/features/optional-data-fetcher-results.md index cf89577f..ff197951 100644 --- a/.claude/skills/verify-tools/features/optional-data-fetcher-results.md +++ b/.claude/skills/verify-tools/features/optional-data-fetcher-results.md @@ -29,7 +29,8 @@ the field resolves its data and the query keeps its errors. An empty `Optional` ## Gotchas - Before the fix (master 3f022b91) `optional-results` still exits `0`. `01` has - `data.optionalResult = {"data": "scenarios.OptionalResultsPayload@"}` with no error, and `02` has + `data.optionalResult = {"data": "graphql.kickstart.tools.compat.scenarios.OptionalResultsPayload@"}` with no + error, and `02` has `"DataFetcherResult{data=a, errors=[], localContext=null, extensions=null}"`. `optional-results-mixed` exits `2` with `Two different classes used for type Payload`, `optional-results-list` exits `2` with `Java class is not a List or generic type information was lost`, and `optional-results-nested` exits `0` with the same `Payload@` string. diff --git a/.claude/skills/verify-tools/features/proxies.md b/.claude/skills/verify-tools/features/proxies.md index f3a6c0f9..88670c84 100644 --- a/.claude/skills/verify-tools/features/proxies.md +++ b/.claude/skills/verify-tools/features/proxies.md @@ -32,8 +32,8 @@ interfaces, so it can't call a field that resolves to the target's own method or - Before #913 (commit f4800425) `jdk-proxy` builds with exit `0`. `01-query.json` has `data = {"test": null, "count": null, "total": null}` and three errors, `object of type jdk.proxy2.$ProxyN is not an - instance of scenarios.ProxiedQuery` for `test` and `total`, and `Can not get final int field scenarios.ProxiedQuery.count` - for `count`. From #853 on, `probe.log` has one `SchemaClassScanner` WARN per field. Before it, `probe.log` is empty. + instance of graphql.kickstart.tools.compat.scenarios.ProxiedQuery` for `test` and `total`, and `Can not get final int + field graphql.kickstart.tools.compat.scenarios.ProxiedQuery.count` for `count`. From #853 on, `probe.log` has one `SchemaClassScanner` WARN per field. Before it, `probe.log` is empty. - The proxy number in `jdk.proxy2.$ProxyN` varies between runs. - CGLIB can't override `final` members, so the resolver and its members must be `open`. A final getter is called on the proxy itself and reads the proxy's empty field, like `count` does. diff --git a/.claude/skills/verify-tools/features/schema-building.md b/.claude/skills/verify-tools/features/schema-building.md index 7e388f79..d794262f 100644 --- a/.claude/skills/verify-tools/features/schema-building.md +++ b/.claude/skills/verify-tools/features/schema-building.md @@ -35,8 +35,10 @@ signature it tried. Types no root can reach get a warning and are dropped from t - **Missing resolver.** `run bookstore-missing-resolver`. Exit `2`. `summary.txt` has `schema build: FAILED graphql.kickstart.tools.resolver.FieldResolverError: No method or field found as defined in schema compat/scenarios/bookstore-missing-resolver/extension.graphqls:2`. The 8 listed signatures start with - `scenarios.AuthorResolver.isbn(scenarios.Book)`, have `scenarios.Book.isbn` sixth, and end with - `scenarios.AuthorResolver.getIsbn()`. `build-error.txt` has the stack trace. + `graphql.kickstart.tools.compat.scenarios.AuthorResolver.isbn(graphql.kickstart.tools.compat.scenarios.Book)`, have + `graphql.kickstart.tools.compat.scenarios.Book.isbn` sixth, and end with + `graphql.kickstart.tools.compat.scenarios.AuthorResolver.getIsbn()`. `build-error.txt` has the + stack trace. - **Read-only schema.** `run read-only-schema`. Exit `0` and all three operations have `errors=0`. `01-interface.json` has `data.animal = {"__typename": "Cat", "name": "Tom", "lives": 9}`, `02-union.json` lists `Dog` Rex then `Cat` Tom, and `03-no-mutation.json` has `mutationType: null`. `schema.graphqls` diff --git a/.claude/skills/verify-tools/features/type-extensions.md b/.claude/skills/verify-tools/features/type-extensions.md index c6300561..29f876b9 100644 --- a/.claude/skills/verify-tools/features/type-extensions.md +++ b/.claude/skills/verify-tools/features/type-extensions.md @@ -3,7 +3,9 @@ `extend type`, `extend interface`, `extend union`, `extend enum`, `extend input` and `extend scalar` add to the type they extend: fields, interfaces, members, values and directives are merged into one graphql-java type, base first. Where a type and its extensions declare a field, enum value or union member twice, or apply a non-repeatable directive again, the build -fails with a `SchemaError` that names the type, the item and its line. An extension of a different kind than its type is +fails with a `SchemaError`. For a field, value or member it names the type, the item and its line. For a directive it names +only the directive and its line, as in `Directive @once at line 1, column 25 isn't repeatable but is applied more than +once.` An extension of a different kind than its type is ignored with a WARN. A union, enum, interface or scalar that only has extensions is built from them. ## Sub-features diff --git a/AGENTS.md b/AGENTS.md index 3fb4a472..18397be8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,7 +52,10 @@ page. `github-build.sh` and `.github/workflows/release.yml` do the version bump, After the release is published, record what it builds, so `CompatTest` checks later changes against it. Check out the release tag in a worktree, run `mvn -B -ntp clean test -Dtest=CompatTest -Dcompat.capture`, and open a PR with the `src/test/resources/compat//` it writes: `cases.tsv` and an empty `accepted.txt`. A later break that the release -notes list goes into that `accepted.txt` as a regex for the case, a tab, and the issue. +notes list goes into that `accepted.txt` as one line: the case as `CompatTest` lists it, a tab, and why, naming the issue +(`#N`) or the release notes (`X.Y.Z release notes`). Start the case with `re:` to give a regex instead. A line that matches +no failing case fails the test. So does a case that built on the release and isn't generated any more, because a scenario +was renamed, removed or edited. Then capture the release again as the failure says, or list the case. ## Rules that need judgment @@ -115,4 +118,4 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | A build you trust starts from an empty `target/`, so no class from an earlier build ships | `clean` in `probe.sh install`, docs only for your own `mvn` runs | | Agent worktrees and local settings stay out of commits | `.gitignore` | | Agent rules live in one committed file | This file. `CLAUDE.md` imports it | -| Invalid input that used to build logs a WARN until the next major | `CompatTest`, against the last release's results in `src/test/resources/compat` | +| Invalid input that built on the last release keeps building until the next major | `CompatTest`, against the last release's results in `src/test/resources/compat` | From bec860eeff4a7354da08e7cf07a09422ed3b0c88 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:23:19 -0500 Subject: [PATCH 32/64] Run the return value check on properties and typed Maps Today's property and Map results go in as known findings, so the check passes and a fix has to delete them. --- .../verify-return-value-unwrapping/SKILL.md | 68 +++++--- src/test/resources/returnvalue/Check.java | 154 ++++++++++++++---- src/test/resources/returnvalue/Fixtures.java | 8 + .../resources/returnvalue/known-findings.txt | 5 + 4 files changed, 183 insertions(+), 52 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index c9ed81c9..0b09844a 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -1,15 +1,15 @@ --- name: verify-return-value-unwrapping -description: Exhaustively check, up to a bound, that a resolver method's return value reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to ReturnValueUnwrapper, TypeClassMatcher's unwrapping, GenericTypeResolver.resolve, the data fetchers in MethodFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. +description: Exhaustively check, up to a bound, that the value of a resolver method, public field or typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to ReturnValueUnwrapper, TypeClassMatcher's unwrapping, GenericTypeResolver.resolve, the data fetchers in MethodFieldResolver, PropertyFieldResolver or MapFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. --- # Verify return value unwrapping ## The property -A user writes a resolver method whose return type nests containers, such as -`CompletableFuture>>`. If the schema build accepts that method, then graphql-java must get -exactly the value the method returned, with every container removed. Futures are waited on and generic wrappers go +A user writes a resolver method, a public field or a `Map` whose type nests containers, such as +`CompletableFuture>>`. If the schema build accepts it, then graphql-java must get +exactly the value it returned, with every container removed. Futures are waited on and generic wrappers go through their transformers. List order and nulls are kept. A failed future or a throwing transformer fails the field. A `Future` that isn't a `CompletionStage` fails the field with the "can't wait on" error. @@ -36,10 +36,19 @@ The leaf is `Payload` (an object type), `String`, or `Object` for a union `Item implements `Future`, so only the declared type tells a leaf from a future. Each return type runs with an all-nullable and an all-non-null GraphQL type. -For each combination the check compiles a Java resolver class with that return type at runtime. It builds the schema -through the public `SchemaParser` API, which rejects about a quarter of the combinations, such as `Optional` below the top -level. For every accepted one it executes the query once for each value that makes at most `--budget` (default 2) -non-default choices. When the return type holds futures, it runs each value three ways: futures already completed, +Each return type runs as three kinds of resolver, each compiled as a Java class at runtime: + +| Kind | Generated resolver | Data fetcher | +|---|---|---| +| `method` | `public field()` on the query resolver | `MethodFieldResolver` | +| `property` | `public field;` on the query resolver, which is also what a Kotlin `@JvmField` compiles to | `PropertyFieldResolver` | +| `map` | `extends HashMap>`, bound to `type Holder` and returned by `Query.holder` | `MapFieldResolver` | + +The check builds each schema through the public `SchemaParser` API, which rejects about a fifth of the combinations, such as +`Optional` below the top level. For every accepted one it executes the query once for each value that makes at most +`--budget` (default 2) non-default choices. Properties and Maps use `--property-budget` (default 1), only the nullable +GraphQL type and only the first-created-first completion order, because what they add is how the value is read, and the +methods already cover the rest. When the return type holds futures, it runs each value three ways: futures already completed, and pending futures completed after the data fetcher returns, first-created first and last-created first. The expected result is what graphql-java returns when a plain data fetcher on the same schema returns the plain value, @@ -47,7 +56,7 @@ or throws the failure. So graphql-java's own null handling and error format appl holds several failures, any one of them failing the field counts as correct. `ReturnValueUnwrappingTest` compiles `Check.java` and `Fixtures.java` at test time and runs the check, so `mvn verify` -runs it at the default bounds on every build. About 172,000 executions run in about 15 seconds. +runs it at the default bounds on every build. About 226,000 executions run in about 18 seconds on JDK 17. ## Run @@ -67,7 +76,7 @@ as `-Dunwrapping.args`, and prints the report. On a failure it also prints the p | 2 | `MODEL ERROR`: the checkout or the check didn't compile, or the build rejected a return type the check must exercise, so a pass would prove nothing | | 3 | `STALE`: a known finding no longer fails. Delete its line from `known-findings.txt` | -Options: `--depth N`, `--budget N`, `--show N` (counterexamples printed, default 15), and `--rejected`, which lists +Options: `--depth N`, `--budget N`, `--property-budget N`, `--show N` (counterexamples printed, default 15), and `--rejected`, which lists every combination the schema build rejected, with the build's error. A depth below 3 can't build the `mustAccept` return types, so it ends in `MODEL ERROR`. @@ -81,7 +90,8 @@ public List> field() for field: [Payload] (21 failing execut got: {errors=[{message=Exception while fetching data (/field[1]/data) : Expected source object to be an instance of 'unwrapcheck.Fixtures$Payload' but instead got 'java.util.concurrent.FutureTask', ... ``` -The first line is the resolver method and the field's GraphQL type. `returns` is the value the method returned. +The first line is the resolver and the field's GraphQL type. A property prints as `public List> field;` +and a Map as `extends HashMap>> for Holder.field: [Payload]`. `returns` is the value the method returned. `Later(CompletableFuture(x))` means a `Later` whose transformer returns a `CompletableFuture` of `x`. Only the first failing value per return type is shown. Rerun with a higher `--show` to see more return types. @@ -96,7 +106,8 @@ A real bug versus a modeling error: - **Modeling error.** The check's own idea of the value is wrong. For example, a new container variant builds a value that its declared type doesn't allow, or the error message the check expects for a `FutureTask` (in `build`, case `FUTURE_TASK`) differs from a message the library changed on purpose. Confirm against the library's own tests in - `src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt` before you edit the check. + `src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt` before you edit the check. Properties and Maps + are expected to fail a `FutureTask` with the method's wording, naming the generated class and `field`. - **`MODEL ERROR` about rejected return types.** A change made the build reject a return type in `mustAccept` in `Check.java`. That's either a regression in the build, which you report, or an intended change, after which you swap in another accepted return type of the same kind. @@ -104,14 +115,23 @@ A real bug versus a modeling error: ## Known findings `src/test/resources/returnvalue/known-findings.txt` lists the return types that break the property at the sync commit, one per line as -` # `. They still -print as `KNOWN` with a counterexample on every run, and the check passes apart from them. A new break inside a known -pattern is hidden, so after a change to the code a known finding covers, read its counterexample. - -At the sync commit there are none. The check found two bugs when it was written, and both are fixed. One was a -`DataFetcherResult` inside an `Optional` (#939). The other was a wrapper whose transformer returns a future, directly around -a declared future (#938). A `withTransformer` registration keeps that #938 behavior, which is why `Later` is registered -through `withCompletionStageTransformer`. +` # `. The regex is matched against the kind and the short return type, such as +`property List>`, so a pattern without a kind covers all three. The first matching line wins. +Matching return types still print as `KNOWN` with a counterexample on every run, and the check passes apart from them. A +new break inside a known pattern is hidden, so after a change to the code a known finding covers, read its +counterexample. + +At the sync commit, methods have none. Properties and Maps hand their value to graphql-java as it is. graphql-java awaits +only a top-level `CompletionStage`, reads a `DataFetcherResult` only at the top or inside that future, and unboxes any +`Optional`. So every nested future, +every generic wrapper, every `DataFetcherResult` graphql-java can't reach, and a `FutureTask` behind a declared `Future` +fail for them. The five lines cover exactly those 2,850 return types. A String field gets the container's `toString`, such +as `CompletableFuture@5a7cb161[Completed normally]`, with no error. + +The check found two method bugs when it was written, and both are fixed. One was a `DataFetcherResult` inside an +`Optional` (#939). The other was a wrapper whose transformer returns a future, directly around a declared future (#938). A +`withTransformer` registration keeps that #938 behavior, which is why `Later` is registered through +`withCompletionStageTransformer`. When a fix lands, the check exits 3. Delete the line then, so that a regression shows up as `FAIL`. @@ -126,10 +146,12 @@ When a fix lands, the check exits 3. Delete the line then, so that a regression - Lists of more than 2 elements, more than 2 non-default choices per value, more than 3 containers, and completion orders other than the two listed. A pass says nothing beyond those bounds. - Which return types the schema build should reject. The check only exercises what the build accepts. +- Untyped Maps, whose value type is `Object`, properties with a getter (those run as methods), and properties and Maps on + a type below the root other than `Holder`. `ResolverCompatibilityTest` pins untyped Maps and Kotlin `@JvmField`s. ## Coverage and sync -Last confirmed to describe the code at commit `cd3233ca` (master, 2026-10-30). It covers: +Last confirmed to describe the code at commit `af9ba4ad` (agent-friendly, 2026-11-04). It covers: | File | What | |---|---| @@ -138,11 +160,13 @@ Last confirmed to describe the code at commit `cd3233ca` (master, 2026-10-30). I | `src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt` | `resolve`, `resolveTypeVariables` | | `src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt` | `createDataFetcher` (`valueClass`, the unwrapper), `returnType`, `returnValueMatch`, `LightMethodFieldResolverDataFetcher` | | `src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt` | `GenericWrapper` and the default wrappers in `build()` | +| `src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt` | all of it | +| `src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt` | all of it, for Map subclasses with a typed value | To see whether a change needs another look: ```bash -git log --oneline cd3233ca..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt +git log --oneline af9ba4ad..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt ``` Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java index c801ac13..b7d9a5bd 100644 --- a/src/test/resources/returnvalue/Check.java +++ b/src/test/resources/returnvalue/Check.java @@ -30,10 +30,12 @@ import java.io.ByteArrayOutputStream; import java.io.OutputStream; import java.io.PrintStream; +import java.lang.reflect.Field; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; @@ -48,6 +50,7 @@ import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import java.util.function.Consumer; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -96,6 +99,22 @@ enum Leaf { } } + enum Kind { + METHOD("method", List.of(Nullability.values()), List.of(Timing.values())), + PROPERTY("property", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)), + MAP("map", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)); + + final String label; + final List nullabilities; + final List timings; + + Kind(String label, List nullabilities, List timings) { + this.label = label; + this.nullabilities = nullabilities; + this.timings = timings; + } + } + enum Nullability {NULLABLE, NON_NULL} enum Variant {VALUE, NULL, EMPTY, FAILED, FUTURE_TASK, WITH_ERROR, FUTURE_ITEM} @@ -115,12 +134,14 @@ enum Timing { static final class Case { final List shape; final Leaf leaf; + final Kind kind; final Nullability nullability; final String className; - Case(List shape, Leaf leaf, Nullability nullability, String className) { + Case(List shape, Leaf leaf, Kind kind, Nullability nullability, String className) { this.shape = shape; this.leaf = leaf; + this.kind = kind; this.nullability = nullability; this.className = className; } @@ -147,8 +168,28 @@ String shortJavaType() { return javaType().replace("unwrapcheck.Fixtures.", "").replaceAll("[a-z.]+\\.(?=[A-Z])", ""); } + String label() { + return kind.label + " " + shortJavaType(); + } + String describe() { - return "public " + shortJavaType() + " field() for field: " + graphQLType(); + switch (kind) { + case METHOD: + return "public " + shortJavaType() + " field() for field: " + graphQLType(); + case PROPERTY: + return "public " + shortJavaType() + " field; for field: " + graphQLType(); + default: + return "extends HashMap for Holder.field: " + graphQLType(); + } + } + + String parentType() { + return kind == Kind.MAP ? "Holder" : "Query"; + } + + String query() { + String field = "field" + leaf.selection; + return "query { " + (kind == Kind.MAP ? "holder { " + field + " }" : field) + " }"; } } @@ -249,6 +290,7 @@ static final class Violation { public static boolean check(String[] args, String classpath, PrintStream out) throws Exception { int depth = intArg(args, "--depth", 3); int budget = intArg(args, "--budget", 2); + int propertyBudget = intArg(args, "--property-budget", 1); long started = System.nanoTime(); List cases = cases(depth); @@ -260,9 +302,11 @@ public static boolean check(String[] args, String classpath, PrintStream out) th Set accepted = new LinkedHashSet<>(); Map> violations = new LinkedHashMap<>(); for (Case testCase : cases) { + Class generated = resolvers.get(testCase.className); + Object instance = generated.getDeclaredConstructor().newInstance(); GraphQLSchema schema; try { - schema = schema(testCase, resolvers.get(testCase.className).getDeclaredConstructor().newInstance()); + schema = schema(testCase, instance); } catch (RuntimeException e) { rejected++; if (flag(args, "--rejected")) { @@ -270,16 +314,16 @@ public static boolean check(String[] args, String classpath, PrintStream out) th } continue; } - accepted.add(testCase.javaType() + " " + testCase.graphQLType()); + accepted.add(testCase.kind.label + " " + testCase.javaType() + " " + testCase.graphQLType()); GraphQL actual = GraphQL.newGraphQL(schema).build(); - GraphQL oracle = GraphQL.newGraphQL(oracleSchema(schema)).build(); - String query = "query { field" + testCase.leaf.selection + " }"; - List timings = testCase.shape.stream().anyMatch(Container::isFuture) && !blocked ? List.of(Timing.values()) : List.of(Timing.DONE); + GraphQL oracle = GraphQL.newGraphQL(oracleSchema(schema, testCase.parentType())).build(); + Consumer returning = returning(testCase, generated, instance); + List timings = testCase.shape.stream().anyMatch(Container::isFuture) && !blocked ? testCase.kind.timings : List.of(Timing.DONE); plans: - for (Plan plan : plansWithinBudget(testCase, 0, budget)) { + for (Plan plan : plansWithinBudget(testCase, 0, testCase.kind == Kind.METHOD ? budget : propertyBudget)) { for (Timing timing : timings) { runs++; - Violation violation = run(testCase, plan, timing, actual, oracle, query); + Violation violation = run(testCase, plan, timing, actual, oracle, returning); if (violation != null) { violations.computeIfAbsent(testCase, c -> new ArrayList<>()).add(violation); if (violation.actual.equals(BLOCKED)) { @@ -291,9 +335,14 @@ public static boolean check(String[] args, String classpath, PrintStream out) th } } - List missing = mustAccept.stream().filter(it -> !accepted.contains(it)).collect(Collectors.toList()); - out.printf("depth %d, budget %d: %d return types, %d rejected by the schema build, %d accepted, %d executions, %.1fs%n", - depth, budget, cases.size(), rejected, accepted.size(), runs, (System.nanoTime() - started) / 1e9); + List missing = Arrays.stream(Kind.values()) + .flatMap(kind -> mustAccept.stream() + .filter(it -> kind.nullabilities.contains(Nullability.NON_NULL) || !it.endsWith("!")) + .map(it -> kind.label + " " + it)) + .filter(it -> !accepted.contains(it)) + .collect(Collectors.toList()); + out.printf("depth %d, budget %d (%d for properties and Maps): %d return types, %d rejected by the schema build, %d accepted, %d executions, %.1fs%n", + depth, budget, propertyBudget, cases.size(), rejected, accepted.size(), runs, (System.nanoTime() - started) / 1e9); if (blocked) { out.println("A data fetcher blocked on a pending future, so later return types ran with completed futures only."); } @@ -303,7 +352,7 @@ public static boolean check(String[] args, String classpath, PrintStream out) th known.keySet().forEach(pattern -> knownFailing.put(pattern, new ArrayList<>())); List> unknown = new ArrayList<>(); violations.forEach((testCase, list) -> { - String pattern = known.keySet().stream().filter(it -> Pattern.compile(it).matcher(testCase.shortJavaType()).find()).findFirst().orElse(null); + String pattern = known.keySet().stream().filter(it -> Pattern.compile(it).matcher(testCase.label()).find()).findFirst().orElse(null); if (pattern == null) { unknown.add(list); } else { @@ -344,7 +393,7 @@ private static Map knownFindings(String path) throws Exception { if (!line.isBlank() && !line.startsWith("#")) { int separator = line.indexOf(" # "); if (separator < 0) { - throw new IllegalArgumentException("A known finding is \" # \", not: " + line); + throw new IllegalArgumentException("A known finding is \">> # \", not: " + line); } known.put(line.substring(0, separator).trim(), line.substring(separator + 3).trim()); } @@ -381,9 +430,11 @@ static List cases(int depth) { List cases = new ArrayList<>(); for (int i = 0; i < shapes.size(); i++) { for (Leaf leaf : Leaf.values()) { - String className = "unwrapcheck.gen.R" + i + "_" + leaf.ordinal(); - for (Nullability nullability : Nullability.values()) { - cases.add(new Case(shapes.get(i), leaf, nullability, className)); + for (Kind kind : Kind.values()) { + String className = "unwrapcheck.gen.R" + i + "_" + leaf.ordinal() + "_" + kind.ordinal(); + for (Nullability nullability : kind.nullabilities) { + cases.add(new Case(shapes.get(i), leaf, kind, nullability, className)); + } } } } @@ -514,7 +565,7 @@ private static DataFetcherResult result(Object data, String error) { return builder.build(); } - static Violation run(Case testCase, Plan plan, Timing timing, GraphQL actual, GraphQL oracle, String query) { + static Violation run(Case testCase, Plan plan, Timing timing, GraphQL actual, GraphQL oracle, Consumer returning) { Context context = new Context(timing, testCase.className + ".field"); Built built = build(testCase, plan, 0, context); if (timing == Timing.PENDING_REVERSED) { @@ -522,7 +573,8 @@ static Violation run(Case testCase, Plan plan, Timing timing, GraphQL actual, Gr } String got; - Fixtures.nextReturnValue = built.returned; + String query = testCase.query(); + returning.accept(built.returned); java.util.concurrent.Future> fetch = fetching.submit(() -> actual.executeAsync(ExecutionInput.newExecutionInput().query(query).build())); CompletableFuture result; try { @@ -555,9 +607,40 @@ static Violation run(Case testCase, Plan plan, Timing timing, GraphQL actual, Gr return acceptable.contains(got) ? null : new Violation(testCase, built.text, timing, String.join("\n or ", acceptable), got); } - static GraphQLSchema schema(Case testCase, Object resolver) { - String sdl = "type Query { field: " + testCase.graphQLType() + " }\n"; - SchemaParserBuilder parser = SchemaParser.newParser().resolvers((GraphQLResolver) resolver).options(options); + static Consumer returning(Case testCase, Class generated, Object instance) throws Exception { + switch (testCase.kind) { + case METHOD: + return value -> Fixtures.nextReturnValue = value; + case PROPERTY: { + Field field = generated.getField("field"); + return value -> { + try { + field.set(instance, value); + } catch (IllegalAccessException e) { + throw new IllegalStateException(e); + } + }; + } + default: + return value -> { + @SuppressWarnings("unchecked") + Map holder = (Map) instance; + holder.put("field", value); + Fixtures.nextReturnValue = holder; + }; + } + } + + static GraphQLSchema schema(Case testCase, Object generated) { + SchemaParserBuilder parser = SchemaParser.newParser().options(options); + String sdl; + if (testCase.kind == Kind.MAP) { + sdl = "type Query { holder: Holder }\ntype Holder { field: " + testCase.graphQLType() + " }\n"; + parser.resolvers(new Fixtures.HolderQuery()).dictionary("Holder", generated.getClass()); + } else { + sdl = "type Query { field: " + testCase.graphQLType() + " }\n"; + parser.resolvers((GraphQLResolver) generated); + } if (testCase.leaf != Leaf.STRING) { sdl += "type Payload { data: String }\n"; } @@ -568,7 +651,7 @@ static GraphQLSchema schema(Case testCase, Object resolver) { return parser.schemaString(sdl).build().makeExecutableSchema(); } - static GraphQLSchema oracleSchema(GraphQLSchema schema) { + static GraphQLSchema oracleSchema(GraphQLSchema schema, String parentType) { DataFetcher plain = environment -> { if (oracleFailure != null) { throw new IllegalStateException(oracleFailure); @@ -576,19 +659,30 @@ static GraphQLSchema oracleSchema(GraphQLSchema schema) { return oracleValue; }; return schema.transform(builder -> builder.codeRegistry( - schema.getCodeRegistry().transform(registry -> registry.dataFetcher(FieldCoordinates.coordinates("Query", "field"), plain)))); + schema.getCodeRegistry().transform(registry -> registry.dataFetcher(FieldCoordinates.coordinates(parentType, "field"), plain)))); } static Map> compile(List cases, String classpath) throws Exception { Map sources = new LinkedHashMap<>(); for (Case testCase : cases) { String simpleName = testCase.className.substring(testCase.className.lastIndexOf('.') + 1); - sources.putIfAbsent(testCase.className, - "package unwrapcheck.gen;\n" - + "public class " + simpleName + " implements graphql.kickstart.tools.GraphQLQueryResolver {\n" - + " @SuppressWarnings(\"unchecked\")\n" - + " public " + testCase.javaType() + " field() { return (" + testCase.javaType() + ") unwrapcheck.Fixtures.nextReturnValue; }\n" - + "}\n"); + String type = testCase.javaType(); + String body; + switch (testCase.kind) { + case METHOD: + body = " implements graphql.kickstart.tools.GraphQLQueryResolver {\n" + + " @SuppressWarnings(\"unchecked\")\n" + + " public " + type + " field() { return (" + type + ") unwrapcheck.Fixtures.nextReturnValue; }\n"; + break; + case PROPERTY: + body = " implements graphql.kickstart.tools.GraphQLQueryResolver {\n" + + " public " + type + " field;\n"; + break; + default: + body = " extends java.util.HashMap {\n"; + break; + } + sources.putIfAbsent(testCase.className, "package unwrapcheck.gen;\npublic class " + simpleName + body + "}\n"); } JavaCompiler javac = ToolProvider.getSystemJavaCompiler(); diff --git a/src/test/resources/returnvalue/Fixtures.java b/src/test/resources/returnvalue/Fixtures.java index aea82b7d..2584abde 100644 --- a/src/test/resources/returnvalue/Fixtures.java +++ b/src/test/resources/returnvalue/Fixtures.java @@ -1,5 +1,7 @@ package unwrapcheck; +import graphql.kickstart.tools.GraphQLQueryResolver; + import java.util.List; import java.util.Objects; import java.util.concurrent.CompletableFuture; @@ -13,6 +15,12 @@ public final class Fixtures { private Fixtures() { } + public static final class HolderQuery implements GraphQLQueryResolver { + public Object holder() { + return nextReturnValue; + } + } + public static final class Payload { private final String data; diff --git a/src/test/resources/returnvalue/known-findings.txt b/src/test/resources/returnvalue/known-findings.txt index e69de29b..d38532fc 100644 --- a/src/test/resources/returnvalue/known-findings.txt +++ b/src/test/resources/returnvalue/known-findings.txt @@ -0,0 +1,5 @@ +^(property|map) \w+<.*Future<.*String>+$ # properties and Maps don't await a future below the top level, so a String field returns the future's toString with no error +^(property|map) \w+<.*Future<.*(Payload|Object)>+$ # properties and Maps don't await a future below the top level, so an object or union field fails +^(property|map) Future< # properties and Maps don't check a declared Future, so a FutureTask fails with "Expected source object" or returns its toString, not the "can't wait on" error +^(property|map) .*\b(Page|Later|Try)< # properties and Maps don't run generic wrapper transformers, so the field fails or a String field returns the wrapper's toString +^(property|map) ((\w+<){2,}|(List|Optional|DataFetcherResult)<)DataFetcherResult< # properties and Maps leave a DataFetcherResult below a list, an Optional or another DataFetcherResult to graphql-java, which only reads one at the top or under a top-level future From dd2c07d4ac714ecfc19e71c0eb06ea95e136d09b Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:23:19 -0500 Subject: [PATCH 33/64] Pin resolver binding and unwrapping in ResolverCompatibilityTest --- .../kickstart/tools/RawGenericFixtures.java | 9 + .../tools/ResolverCompatibilityTest.kt | 425 ++++++++++++++++++ 2 files changed, 434 insertions(+) create mode 100644 src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt diff --git a/src/test/kotlin/graphql/kickstart/tools/RawGenericFixtures.java b/src/test/kotlin/graphql/kickstart/tools/RawGenericFixtures.java index d01b3076..37d23d98 100644 --- a/src/test/kotlin/graphql/kickstart/tools/RawGenericFixtures.java +++ b/src/test/kotlin/graphql/kickstart/tools/RawGenericFixtures.java @@ -1,6 +1,7 @@ package graphql.kickstart.tools; import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; // Raw types can't be expressed in Kotlin, so these fixtures must stay in Java. @@ -14,6 +15,14 @@ public Tree tree() { } } + public static class RawOptionalResolver implements GraphQLQueryResolver { + + @SuppressWarnings({"rawtypes", "unused"}) + public String raw(Optional value) { + return String.valueOf(value); + } + } + public static class Tree { private final T value; diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt new file mode 100644 index 00000000..a5434df7 --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt @@ -0,0 +1,425 @@ +package graphql.kickstart.tools + +import graphql.ExecutionInput +import graphql.ExecutionResult +import graphql.GraphQL +import graphql.GraphQLContext +import graphql.execution.DataFetcherResult +import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper +import graphql.schema.DataFetchingEnvironment +import kotlinx.coroutines.flow.toList +import kotlinx.coroutines.reactive.asFlow +import kotlinx.coroutines.reactive.publish +import kotlinx.coroutines.runBlocking +import org.junit.Assert.fail +import org.junit.Test +import org.reactivestreams.Publisher +import java.util.* +import java.util.concurrent.CompletableFuture +import java.util.concurrent.CompletableFuture.completedFuture +import java.util.concurrent.CompletableFuture.supplyAsync +import java.util.concurrent.Future +import java.util.concurrent.FutureTask + +class ResolverCompatibilityTest { + + @Test + fun `property and Map fields return what a method returns, apart from the known findings`() { + val wrong = Kind.entries.flatMap { kind -> + shapes.mapNotNull { shape -> + val got = holderField(kind, shape) + val expected = if (kind == Kind.UNTYPED_MAP) rawValueResults.getValue(shape.name) else shape.expected(kind) + val known = knownFindings[kind to shape.name] + when { + got == (known ?: expected) -> null + known != null && got == expected -> "$kind ${shape.name} now returns what a method returns. Delete its known finding." + else -> "$kind ${shape.name}\n expected: ${known ?: expected}\n got: $got" + } + } + } + if (wrong.isNotEmpty()) { + fail(wrong.joinToString("\n")) + } + } + + @Test + fun `arguments follow the source parameter in declaration order`() { + val result = execute( + """ + type Query { foo: Foo } + type Foo { name: String joined(first: String!, second: String!, count: Int!): String } + """, + "{ foo { joined(first: \"x\", second: \"y\", count: 3) } }", + object : GraphQLQueryResolver { + fun foo() = Foo("a") + }, + object : GraphQLResolver { + fun joined(foo: Foo, first: String, second: String, count: Int, env: DataFetchingEnvironment) = + "${foo.name} $first $second $count ${env.field.name}" + } + ) + + assertEquals(result, "{foo={joined=a x y 3 joined}}") + } + + @Test + fun `trailing parameters bind the GraphQLContext, the context class and the environment, repeated and in any order`() { + val schema = "type Query { extras(first: String!): String }" + val options = SchemaParserOptions.newOptions().contextClass(AppContext::class).build() + + assertEquals( + execute(schema, "{ extras(first: \"x\") }", ContextResolver(), options = options, context = mapOf(AppContext::class.java to AppContext("ann"), "key" to "k")), + "{extras=x extras ann k true}" + ) + assertEquals( + execute(schema, "{ extras(first: \"x\") }", ContextResolver(), options = options), + "{extras=null}\nerror: Exception while fetching data (/extras) : Resolver method 'ContextResolver.extras' has a parameter of the context class " + + "'AppContext', but the GraphQLContext has no value for it. Put it in the GraphQLContext under the class key when building the " + + "ExecutionInput, for example graphQLContext(mapOf(AppContext::class.java to context))." + ) + } + + @Test + fun `a context class of DataFetchingEnvironment is looked up in the GraphQLContext`() { + val result = execute( + "type Query { environment: String }", + "{ environment }", + EnvironmentResolver(), + options = SchemaParserOptions.newOptions().contextClass(DataFetchingEnvironment::class).build() + ) + + assertEquals( + result, + "{environment=null}\nerror: Exception while fetching data (/environment) : Resolver method 'EnvironmentResolver.environment' has a parameter " + + "of the context class 'graphql.schema.DataFetchingEnvironment', but the GraphQLContext has no value for it. Put it in the GraphQLContext " + + "under the class key when building the ExecutionInput, for example graphQLContext(mapOf(DataFetchingEnvironment::class.java to context))." + ) + } + + @Test + fun `omitted arguments reach primitive parameters as their default and type variables as their bound class`() { + val result = execute( + "type Query { primitives(i: Int, b: Boolean, d: Float, boxed: Int): String echo(value: Int!): String }", + "{ primitives echo(value: 3) }", + PrimitivesResolver() + ) + + assertEquals(result, "{primitives=0 false 0.0 null, echo=3 Long}") + } + + @Test + fun `Optional arguments are empty when null, and null when omitted with omission detection`() { + val schema = "type Query { raw(value: String): String typed(value: String): String }" + val query = "{ givenRaw: raw(value: \"x\") nullRaw: raw(value: null) omittedRaw: raw given: typed(value: \"x\") null: typed(value: null) omitted: typed }" + val typed = object : GraphQLQueryResolver { + fun typed(value: Optional?) = value.toString() + } + val detecting = SchemaParserOptions.newOptions().inputArgumentOptionalDetectOmission(true).build() + + assertEquals( + execute(schema, query, RawGenericFixtures.RawOptionalResolver(), typed), + "{givenRaw=Optional[x], nullRaw=Optional.empty, omittedRaw=Optional.empty, given=Optional[x], null=Optional.empty, omitted=Optional.empty}" + ) + assertEquals( + execute(schema, query, RawGenericFixtures.RawOptionalResolver(), typed, options = detecting), + "{givenRaw=Optional[x], nullRaw=Optional.empty, omittedRaw=null, given=Optional[x], null=Optional.empty, omitted=null}" + ) + } + + @Test + fun `lists of concrete scalars skip conversion only for a List parameter`() { + val result = execute( + "type Query { numbers(list: [Int!]!, collection: [Int!]!, set: [Int!]!): String }", + "{ numbers(list: [1], collection: [2], set: [3]) }", + object : GraphQLQueryResolver { + fun numbers(list: List, collection: Collection, set: Set) = + listOf>(list, collection, set).joinToString(" ") { it.first()!!.javaClass.simpleName } + } + ) + + assertEquals(result, "{numbers=Integer Long Long}") + } + + @Test + fun `a source of another class fails the field`() { + val result = execute( + "type Query { holder: Holder } type Holder { name: String tag: String extra: String }", + "{ holder { name tag extra } }", + object : GraphQLQueryResolver { + fun holder(): Any = Impostor() + }, + object : GraphQLResolver { + fun extra(holder: Holder) = holder.name + }, + dictionary = listOf(Holder::class.java) + ) + + assertEquals( + result, + """ + {holder={name=null, tag=null, extra=null}} + error: Exception while fetching data (/holder/name) : Expected source object to be an instance of 'Holder' but instead got 'Impostor' + error: Exception while fetching data (/holder/tag) : Expected source object to be an instance of 'Holder' but instead got 'Impostor' + error: Exception while fetching data (/holder/extra) : Source type (Impostor) is not expected type (Holder)! + """.trimIndent() + ) + } + + @Test + fun `the outermost wrapper is picked by the value's class and a nested one by the declared type`() { + val result = execute( + "type Query { top: String nested: [String] }", + "{ top nested }", + object : GraphQLQueryResolver { + fun top(): Box = SpecialBox("a") + fun nested(): List> = listOf(SpecialBox("b")) + }, + options = SchemaParserOptions.newOptions().genericWrappers(boxWrapper, specialBoxWrapper).build() + ) + + assertEquals(result, "{top=a special, nested=[b]}") + } + + @Test + fun `a value of two unrelated wrapper types gets the transformer registered last, whatever the declared type`() { + val result = execute( + "type Query { left: String right: String }", + "{ left right }", + object : GraphQLQueryResolver { + fun left(): Left = Both("l", "r") + fun right(): Right = Both("l", "r") + }, + options = SchemaParserOptions.newOptions().genericWrappers(leftWrapper, rightWrapper).build() + ) + + assertEquals(result, "{left=r, right=r}") + } + + @Test + fun `suspend functions await nested futures, and fail on a future at the top`() { + val result = execute("type Query { futures: [String] future: String }", "{ futures future }", SuspendResolver()) + + assertEquals( + result, + "{futures=[futures, b], future=null}\nerror: Exception while fetching data (/future) : Suspend function 'SuspendResolver.future' resolved to " + + "a CompletableFuture, which graphql-java can't wait on. Return its value instead." + ) + } + + @Test + fun `subscription events reach graphql-java as they are, so a future event prints as a string`() { + val schema = SchemaParser.newParser() + .schemaString("type Query { unused: String } type Subscription { events: String futureEvents: String }") + .resolvers( + object : GraphQLQueryResolver { + fun unused(): String? = null + }, + object : GraphQLSubscriptionResolver { + fun events(): Publisher = publish { + send("a") + send("b") + } + + fun futureEvents(): Publisher> = publish { + send(completedFuture("a")) + } + }) + .build() + .makeExecutableSchema() + val gql = GraphQL.newGraphQL(schema).build() + + fun events(query: String) = runBlocking { gql.execute(query).getData>()!!.asFlow().toList() }.map { it.render() } + + assertEquals(events("subscription { events }"), listOf("{events=a}", "{events=b}")) + assertEquals(events("subscription { futureEvents }"), listOf("{futureEvents=CompletableFuture@...[Completed normally]}")) + } + + private fun execute( + schema: String, + query: String, + vararg resolvers: GraphQLResolver<*>, + options: SchemaParserOptions = SchemaParserOptions.newOptions().build(), + dictionary: List> = listOf(), + context: Map = mapOf() + ): String = GraphQL.newGraphQL( + SchemaParser.newParser().schemaString(schema).resolvers(*resolvers).options(options).dictionary(dictionary).build().makeExecutableSchema() + ).build().execute(ExecutionInput.newExecutionInput(query).graphQLContext(context)).render() + + private fun holderField(kind: Kind, shape: Shape): String { + val holder = kind.holder(shape) + val parser = SchemaParser.newParser() + .schemaString("type Query { holder: Holder } type Holder { ${shape.name}: ${shape.type} }" + if (shape.selection.isEmpty()) "" else " type Foo { name: String }") + .resolvers(object : GraphQLQueryResolver { + fun holder(): Any = holder + }) + .dictionary("Holder", holder.javaClass) + .options(SchemaParserOptions.newOptions().genericWrappers(boxWrapper).build()) + if (kind == Kind.UNTYPED_MAP && shape.selection.isNotEmpty()) { + parser.dictionary(Foo::class) + } + val schema = try { + parser.build().makeExecutableSchema() + } catch (e: RuntimeException) { + return "rejected: ${e.message!!.lines().first().substringAfterLast("): ")}" + } + val result = GraphQL.newGraphQL(schema).build().execute("{ holder { ${shape.name}${shape.selection} } }") + val value = result.getData?>>()!!["holder"]?.get(shape.name) + return (listOf("$value") + result.errors.map { "error: ${it.message}" }).joinToString("\n").normalized() + } + + private fun ExecutionResult.render() = (listOf("${getData()}") + errors.map { "error: ${it.message}" }).joinToString("\n").normalized() + + private fun String.normalized() = replace(Regex("@\\p{XDigit}+"), "@...") + .replace("${ResolverCompatibilityTest::class.java.name}$", "") + .replace("java.util.concurrent.", "") + + enum class Kind(val holder: (Shape) -> Any) { + METHOD({ MethodHolder() }), + JVM_FIELD({ JvmFieldHolder() }), + TYPED_MAP({ shape -> shape.typedMap(JvmFieldHolder()) }), + UNTYPED_MAP({ shape -> hashMapOf(shape.name to shape.value()) }) + } + + class Shape(val name: String, val type: String, private val expected: String, val typedMap: (JvmFieldHolder) -> Map) { + val selection = if (type.contains("Foo")) " { name }" else "" + + fun value(): Any? = JvmFieldHolder::class.java.getField(name).get(JvmFieldHolder()) + + fun expected(kind: Kind) = expected.replace("HOLDER", kind.holder(this).javaClass.simpleName) + } + + class Foo(val name: String) + + class JvmFieldHolder { + @JvmField val future: CompletableFuture = completedFuture(Foo("a")) + @JvmField val futureOfListOfFutures: CompletableFuture>> = completedFuture(listOf(completedFuture(Foo("a")), completedFuture(Foo("b")))) + @JvmField val optional: Optional = Optional.of(Foo("a")) + @JvmField val result: DataFetcherResult = DataFetcherResult.newResult().data(Foo("a")).build() + @JvmField val plainFuture: Future = FutureTask { Foo("a") }.apply { run() } + @JvmField val box: Box = Box(Foo("a")) + @JvmField val optionalResult: Optional> = Optional.of(DataFetcherResult.newResult().data(Foo("a")).build()) + @JvmField val listOfFutures: List> = listOf(completedFuture(Foo("a")), completedFuture(Foo("b"))) + @JvmField val listOfStringFutures: List> = listOf(completedFuture("a"), completedFuture("b")) + @JvmField val boxOfString: Box = Box("a") + @JvmField val listOfOptionals: List> = listOf(Optional.of("a"), Optional.empty()) + } + + class MethodHolder { + private val values = JvmFieldHolder() + + fun future() = values.future + fun futureOfListOfFutures() = values.futureOfListOfFutures + fun optional() = values.optional + fun result() = values.result + fun plainFuture() = values.plainFuture + fun box() = values.box + fun optionalResult() = values.optionalResult + fun listOfFutures() = values.listOfFutures + fun listOfStringFutures() = values.listOfStringFutures + fun boxOfString() = values.boxOfString + fun listOfOptionals() = values.listOfOptionals + } + + class FutureMap : HashMap>() + class FutureOfListOfFuturesMap : HashMap>>>() + class OptionalMap : HashMap>() + class ResultMap : HashMap>() + class PlainFutureMap : HashMap>() + class BoxMap : HashMap>() + class OptionalResultMap : HashMap>>() + class ListOfFuturesMap : HashMap>>() + class ListOfStringFuturesMap : HashMap>>() + class BoxOfStringMap : HashMap>() + class ListOfOptionalsMap : HashMap>>() + + open class Box(val content: T) + + class SpecialBox(content: T) : Box(content) + + interface Left { + val left: T + } + + interface Right { + val right: T + } + + class Both(override val left: T, override val right: T) : Left, Right + + class AppContext(val user: String) + + class ContextResolver : GraphQLQueryResolver { + fun extras(first: String, env: DataFetchingEnvironment, context: AppContext, graphQLContext: GraphQLContext, again: DataFetchingEnvironment) = + "$first ${env.field.name} ${context.user} ${graphQLContext.get("key")} ${again === env}" + } + + class EnvironmentResolver : GraphQLQueryResolver { + fun environment(env: DataFetchingEnvironment): String = env.field.name + } + + abstract class Echo { + fun echo(value: T) = "$value ${value!!::class.java.simpleName}" + } + + class PrimitivesResolver : Echo(), GraphQLQueryResolver { + fun primitives(i: Int, b: Boolean, d: Double, boxed: Int?) = "$i $b $d $boxed" + } + + class SuspendResolver : GraphQLQueryResolver { + suspend fun futures(env: DataFetchingEnvironment): List> = listOf(completedFuture(env.field.name), supplyAsync { "b" }) + suspend fun future(): CompletableFuture = completedFuture("a") + } + + class Holder(val name: String) { + @JvmField val tag = "t" + } + + class Impostor + + private companion object { + val boxWrapper = GenericWrapper.withTransformer(Box::class, 0, { box -> box.content }) + val specialBoxWrapper = GenericWrapper.withTransformer(SpecialBox::class, 0, { box -> "${box.content} special" }) + val leftWrapper = GenericWrapper.withTransformer(Left::class, 0, { wrapper -> wrapper.left }) + val rightWrapper = GenericWrapper.withTransformer(Right::class, 0, { wrapper -> wrapper.right }) + + val shapes = listOf( + Shape("future", "Foo", "{name=a}") { FutureMap().apply { put("future", it.future) } }, + Shape("futureOfListOfFutures", "[Foo]", "[{name=a}, {name=b}]") { FutureOfListOfFuturesMap().apply { put("futureOfListOfFutures", it.futureOfListOfFutures) } }, + Shape("optional", "Foo", "{name=a}") { OptionalMap().apply { put("optional", it.optional) } }, + Shape("result", "Foo", "{name=a}") { ResultMap().apply { put("result", it.result) } }, + Shape( + "plainFuture", "Foo", + "null\nerror: Exception while fetching data (/holder/plainFuture) : Resolver method 'HOLDER.plainFuture' resolved to a FutureTask, " + + "which graphql-java can't wait on. Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead." + ) { PlainFutureMap().apply { put("plainFuture", it.plainFuture) } }, + Shape("box", "Foo", "{name=a}") { BoxMap().apply { put("box", it.box) } }, + Shape("optionalResult", "Foo", "{name=a}") { OptionalResultMap().apply { put("optionalResult", it.optionalResult) } }, + Shape("listOfFutures", "[Foo]", "[{name=a}, {name=b}]") { ListOfFuturesMap().apply { put("listOfFutures", it.listOfFutures) } }, + Shape("listOfStringFutures", "[String]", "[a, b]") { ListOfStringFuturesMap().apply { put("listOfStringFutures", it.listOfStringFutures) } }, + Shape("boxOfString", "String", "a") { BoxOfStringMap().apply { put("boxOfString", it.boxOfString) } }, + Shape("listOfOptionals", "[String]", "rejected: java.util.Optional can only be used at the top level of a return type") { ListOfOptionalsMap().apply { put("listOfOptionals", it.listOfOptionals) } } + ) + + private fun notFoo(path: String, got: String) = + "error: Exception while fetching data (/holder/$path/name) : Expected source object to be an instance of 'Foo' but instead got '$got'" + + val rawValueResults = mapOf( + "future" to "{name=a}", + "futureOfListOfFutures" to "[{name=null}, {name=null}]\n${notFoo("futureOfListOfFutures[0]", "CompletableFuture")}\n${notFoo("futureOfListOfFutures[1]", "CompletableFuture")}", + "optional" to "{name=a}", + "result" to "{name=a}", + "plainFuture" to "{name=null}\n${notFoo("plainFuture", "FutureTask")}", + "box" to "{name=null}\n${notFoo("box", "Box")}", + "optionalResult" to "{name=null}\n${notFoo("optionalResult", "graphql.execution.DataFetcherResult")}", + "listOfFutures" to "[{name=null}, {name=null}]\n${notFoo("listOfFutures[0]", "CompletableFuture")}\n${notFoo("listOfFutures[1]", "CompletableFuture")}", + "listOfStringFutures" to "[CompletableFuture@...[Completed normally], CompletableFuture@...[Completed normally]]", + "boxOfString" to "Box@...", + "listOfOptionals" to "[a, null]" + ) + + val knownFindings = listOf(Kind.JVM_FIELD, Kind.TYPED_MAP).flatMap { kind -> + listOf("futureOfListOfFutures", "plainFuture", "box", "optionalResult", "listOfFutures", "listOfStringFutures", "boxOfString") + .map { (kind to it) to rawValueResults.getValue(it) } + }.toMap() + } +} From 594944b530596d4d979812899ebced532fc1dcb4 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:23:19 -0500 Subject: [PATCH 34/64] Add the resolver pins to the rule table --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 4714eb7a..2db66248 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -80,6 +80,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin |---|---| | A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | docs only | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | +| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists today's property and Map gaps as known findings, and fails once one is fixed until it's deleted | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | docs only | | Reuse an existing structure before you add a parallel one | docs only | From 897454dd38f900f1de875c6cdad03d944960a876 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 15:30:48 -0500 Subject: [PATCH 35/64] Merge each SDL type with its extensions once The scanner and the parser now see an SDL type only as a MergedType, built once in MergedDefinitions.kt. Each one merges its extensions' fields, interfaces, members, values and directives, base first, and keeps the definition and extensions themselves private. MergedType.prepare runs what every kind's builder needs: the repeated-declaration check, the name, definition and extensionDefinitions, the description and the SDL directives. The six create functions in SchemaParser only add members. withExtensions, extensionsOf, directivesOf and the TypeExtensions alias are gone, with all 18 calls of withExtensions. The lookups keep their shapes: byName is last-wins like before, baseObjects keeps every object definition, the specification scalars resolve first, and type errors search definitions before extensions. One helper in TypeClassDictionary owns "only input object types may share a class" for both the supplied dictionary and the scanned one, each with its own message. Co-Authored-By: Claude --- .../kickstart/tools/DictionaryTypeResolver.kt | 9 +- .../kickstart/tools/MergedDefinitions.kt | 261 ++++++++++++++++++ .../graphql/kickstart/tools/ScanDictionary.kt | 51 ++-- .../kickstart/tools/ScannedSchemaObjects.kt | 41 +-- .../kickstart/tools/SchemaClassScanner.kt | 200 ++++++-------- .../graphql/kickstart/tools/SchemaParser.kt | 171 +++--------- .../kickstart/tools/SchemaParserBuilder.kt | 2 +- .../graphql/kickstart/tools/SdlDirectives.kt | 3 - .../kickstart/tools/SealedSubclassMatcher.kt | 20 +- .../kickstart/tools/TypeClassMatcher.kt | 13 +- .../kickstart/tools/TypeReferenceErrors.kt | 53 ++-- .../graphql/kickstart/tools/util/Utils.kt | 8 - .../tools/NestedGenericWrapperTest.kt | 4 +- .../kickstart/tools/TypeClassMatcherTest.kt | 10 +- 14 files changed, 474 insertions(+), 372 deletions(-) create mode 100644 src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt diff --git a/src/main/kotlin/graphql/kickstart/tools/DictionaryTypeResolver.kt b/src/main/kotlin/graphql/kickstart/tools/DictionaryTypeResolver.kt index 40a52802..4faff924 100644 --- a/src/main/kotlin/graphql/kickstart/tools/DictionaryTypeResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/DictionaryTypeResolver.kt @@ -3,7 +3,6 @@ package graphql.kickstart.tools import graphql.TypeResolutionEnvironment import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.unwrap -import graphql.language.TypeDefinition import graphql.schema.GraphQLInterfaceType import graphql.schema.GraphQLObjectType import graphql.schema.GraphQLUnionType @@ -14,7 +13,7 @@ import java.lang.reflect.ParameterizedType * @author Andrew Potter */ internal abstract class DictionaryTypeResolver( - private val dictionary: Map> + private val dictionary: Map> ) : TypeResolver { // Raw class of each parameterized entry, e.g. Box for Box, unless several entries share it private val rawClassDictionary by lazy { @@ -25,7 +24,7 @@ internal abstract class DictionaryTypeResolver( .toMap() } - private fun getTypeDefinition(clazz: Class): TypeDefinition<*>? { + private fun getTypeDefinition(clazz: Class): MergedType<*>? { return dictionary[clazz] ?: (if (clazz.superclass == null) null else getTypeDefinition(clazz.superclass)) ?: clazz.interfaces.mapNotNull { getTypeDefinition(it) }.firstOrNull() @@ -45,7 +44,7 @@ internal abstract class DictionaryTypeResolver( } internal class InterfaceTypeResolver( - dictionary: Map>, + dictionary: Map>, private val thisInterface: GraphQLInterfaceType ) : DictionaryTypeResolver( dictionary @@ -54,7 +53,7 @@ internal class InterfaceTypeResolver( } internal class UnionTypeResolver( - dictionary: Map>, + dictionary: Map>, private val thisUnion: GraphQLUnionType ) : DictionaryTypeResolver( dictionary diff --git a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt new file mode 100644 index 00000000..19d6ce9d --- /dev/null +++ b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt @@ -0,0 +1,261 @@ +package graphql.kickstart.tools + +import graphql.Directives +import graphql.introspection.Introspection.DirectiveLocation +import graphql.kickstart.tools.util.describe +import graphql.kickstart.tools.util.getDocumentation +import graphql.kickstart.tools.util.unwrap +import graphql.language.* +import graphql.schema.* +import graphql.schema.idl.ScalarInfo + +/** + * The SDL types of a schema, each merged with its extensions. Outside this file the scanner and the parser only see + * [MergedType]s, so every reader of a type's fields, members, values or directives gets those of its extensions too. + */ +internal class MergedDefinitions(definitions: List>) { + val directiveDefinitions: List = definitions.filterIsInstance() + val rootInfo: RootTypeInfo = RootTypeInfo.fromSchemaDefinitions(definitions.filterIsInstance()) + + // includes the names of scalar extensions, even ignored ones + val scalarNames: Set = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.keys + definitions.filterIsInstance().map { it.name } + + private val typeDefinitions = definitions.filterIsInstance>() + private val baseTypeNames = typeDefinitions.filter { it !is SDLExtensionDefinition }.map { it.name }.toSet() + + // the first extension of an interface, union, enum or scalar without a definition stands in for it + private val loneExtensions = typeDefinitions + .filter { it is SDLExtensionDefinition && it !is ObjectTypeDefinition && it !is InputObjectTypeDefinition && it.name !in baseTypeNames } + .distinctBy { it.name } + .toSet() + + private val sources = typeDefinitions.filter { it !is SDLExtensionDefinition || it in loneExtensions } + + // the last definition of a name wins + private val sourcesByName = sources.associateBy { it.name } + + private val extensionsByName = typeDefinitions + .filter { it is SDLExtensionDefinition && it !in loneExtensions && !extendsOtherKind(it) } + .groupBy { it.name } + + // one type per definition, so a repeated definition of a name is a type of its own + private val typesBySource: Map, MergedType<*>> = sources.mapNotNull { source -> merge(source)?.let { source to it } }.toMap() + + private val specificationScalars: Map = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS + .mapValues { (name, definition) -> MergedType.Scalar(definition, extensionsByName[name].orEmpty().filterIsInstance()) } + + private val sourceOf: Map, TypeDefinition<*>> = + typesBySource.entries.associate { it.value to it.key } + specificationScalars.values.associateWith { ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.getValue(it.name) } + + val byName: Map> = sourcesByName.mapNotNull { (name, source) -> typesBySource[source]?.let { name to it } }.toMap() + + /** + * Every object type definition, including repeated ones that [byName] doesn't return. + */ + val baseObjects: List = typeDefinitions + .filter { it is ObjectTypeDefinition && it !is ObjectTypeExtensionDefinition } + .map { typesBySource.getValue(it) as MergedType.Object } + + val ignoredExtensionWarnings: List = typeDefinitions.filter(::extendsOtherKind).map { extension -> + "Type '${extension.name}' is defined as ${sourcesByName.getValue(extension.name).kind()}, but extended as ${extension.kind()}. The extension is ignored." + } + + /** + * Looks a name up like graphql-java, so the specification's scalars come first. + */ + fun resolve(name: String?): MergedType<*>? = specificationScalars[name] ?: byName[name] + + fun definitionsOf(types: Set>): Set> = types.mapNotNullTo(linkedSetOf()) { sourceOf[it] } + + /** + * Finds the field, argument or input field whose type is [typeName] itself, not another reference to the same name. The + * definitions of [types] are searched first, then the directive definitions, then every extension. + */ + fun findUsage(typeName: TypeName, types: Collection>): String? = + (types.mapNotNull { sourceOf[it] } + directiveDefinitions + extensionsByName.values.flatten()).asSequence().flatMap { definition -> + when (definition) { + is ObjectTypeDefinition -> fieldUsages(definition.name, definition.fieldDefinitions) + is InterfaceTypeDefinition -> fieldUsages(definition.name, definition.fieldDefinitions) + is InputObjectTypeDefinition -> definition.inputValueDefinitions.map { "input field '${definition.name}.${it.name}'" to it.type } + is DirectiveDefinition -> definition.inputValueDefinitions.map { "argument '${it.name}' of directive '@${definition.name}'" to it.type } + else -> emptyList() + } + }.find { (_, type) -> type.unwrap() === typeName }?.first + + private fun fieldUsages(typeName: String, fields: List): List>> = fields.flatMap { field -> + listOf("field '$typeName.${field.name}'" to field.type) + + field.inputValueDefinitions.map { "argument '${it.name}' of field '$typeName.${field.name}'" to it.type } + } + + private fun merge(source: TypeDefinition<*>): MergedType<*>? { + val extensions = extensionsByName[source.name].orEmpty() + return when (source) { + is ObjectTypeDefinition -> MergedType.Object(source, extensions.filterIsInstance()) + is InterfaceTypeDefinition -> MergedType.Interface(source, extensions.filterIsInstance()) + is UnionTypeDefinition -> MergedType.Union(source, extensions.filterIsInstance()) + is EnumTypeDefinition -> MergedType.Enum(source, extensions.filterIsInstance()) + is InputObjectTypeDefinition -> MergedType.Input(source, extensions.filterIsInstance()) + is ScalarTypeDefinition -> MergedType.Scalar(source, extensions.filterIsInstance()) + else -> null + } + } + + private fun extendsOtherKind(definition: TypeDefinition<*>): Boolean { + val type = sourcesByName[definition.name] + return definition is SDLExtensionDefinition && type != null && type.kind() != definition.kind() + } + + private fun TypeDefinition<*>.kind(): String = when (this) { + is ObjectTypeDefinition -> "an object type" + is InterfaceTypeDefinition -> "an interface" + is UnionTypeDefinition -> "a union" + is EnumTypeDefinition -> "an enum" + is InputObjectTypeDefinition -> "an input object type" + is ScalarTypeDefinition -> "a scalar" + else -> javaClass.simpleName + } +} + +internal class TypeBuildContext( + val options: SchemaParserOptions, + val directives: SdlDirectives, + val customScalars: CustomScalarMap, +) + +/** + * An SDL type merged with its extensions: the members of the type come first, then those of each extension in the order + * they're declared. Only this file sees the definitions themselves. + */ +internal sealed class MergedType>( + private val definition: TypeDefinition<*>, + extensions: List>, +) { + val name: String get() = definition.name + + val definitionClassName: String get() = definition.javaClass.simpleName + + protected val directives: List = definition.directives + extensions.flatMap { it.directives } + + protected abstract val location: DirectiveLocation + + protected abstract val declarations: List> + + protected abstract fun newBuilder(context: TypeBuildContext): B + + protected open fun fallbackDescription(context: TypeBuildContext): String? = null + + /** + * Starts the graphql-java type with what every kind gets: the check for repeated declarations, the name, the definitions, + * the description and the SDL directives. The caller adds the members. + */ + fun prepare(context: TypeBuildContext): B { + rejectRepeated() + val builder = newBuilder(context) + .name(name) + .description(getDocumentation(definition as AbstractNode<*>, context.options) ?: fallbackDescription(context)) + return with(context.directives) { builder.withSdlDirectives(directives, location) } + } + + private fun rejectRepeated() { + val noun = when (this) { + is Object, is Interface, is Input -> "field" + is Enum -> "value" + is Union -> "member" + is Scalar -> return + } + val names = mutableSetOf() + val repeat = declarations.firstOrNull { !names.add(it.name) } ?: return + throw SchemaError("Type '$name' declares $noun '${repeat.name}' more than once${repeat.sourceLocation.describe()}.") + } + + sealed interface Implementing { + val fields: List + val interfaces: List> + } + + class Object( + private val definition: ObjectTypeDefinition, + private val extensions: List, + ) : MergedType(definition, extensions), Implementing { + override val fields: List = definition.fieldDefinitions + extensions.flatMap { it.fieldDefinitions } + override val interfaces: List> = definition.implements + extensions.flatMap { it.implements } + override val location = DirectiveLocation.OBJECT + override val declarations get() = fields + override fun newBuilder(context: TypeBuildContext): GraphQLObjectType.Builder = + GraphQLObjectType.newObject().definition(definition).extensionDefinitions(extensions) + } + + class Interface( + private val definition: InterfaceTypeDefinition, + private val extensions: List, + ) : MergedType(definition, extensions), Implementing { + override val fields: List = definition.fieldDefinitions + extensions.flatMap { it.fieldDefinitions } + override val interfaces: List> = definition.implements + extensions.flatMap { it.implements } + override val location = DirectiveLocation.INTERFACE + override val declarations get() = fields + override fun newBuilder(context: TypeBuildContext): GraphQLInterfaceType.Builder = + GraphQLInterfaceType.newInterface().definition(definition).extensionDefinitions(extensions) + } + + class Union( + private val definition: UnionTypeDefinition, + private val extensions: List, + ) : MergedType(definition, extensions) { + val members: List> = definition.memberTypes + extensions.flatMap { it.memberTypes } + override val location = DirectiveLocation.UNION + override val declarations get() = members.map { it as TypeName } + override fun newBuilder(context: TypeBuildContext): GraphQLUnionType.Builder = + GraphQLUnionType.newUnionType().definition(definition).extensionDefinitions(extensions) + + /** + * The definition or extension that lists [member], as the SDL prints it. + */ + fun declarationOf(member: Type<*>): String = + (listOf(definition) + extensions).first { declaration -> declaration.memberTypes.any { it === member } }.toString() + } + + class Enum( + private val definition: EnumTypeDefinition, + private val extensions: List, + ) : MergedType(definition, extensions) { + val values: List = definition.enumValueDefinitions + extensions.flatMap { it.enumValueDefinitions } + override val location = DirectiveLocation.ENUM + override val declarations get() = values + override fun newBuilder(context: TypeBuildContext): GraphQLEnumType.Builder = + GraphQLEnumType.newEnum().definition(definition).extensionDefinitions(extensions) + } + + class Input( + private val definition: InputObjectTypeDefinition, + private val extensions: List, + ) : MergedType(definition, extensions) { + val fields: List = definition.inputValueDefinitions + extensions.flatMap { it.inputValueDefinitions } + override val location = DirectiveLocation.INPUT_OBJECT + override val declarations get() = fields + override fun newBuilder(context: TypeBuildContext): GraphQLInputObjectType.Builder = + GraphQLInputObjectType.newInputObject().definition(definition).extensionDefinitions(extensions) + } + + class Scalar( + private val definition: ScalarTypeDefinition, + private val extensions: List, + ) : MergedType(definition, extensions) { + override val location = DirectiveLocation.SCALAR + override val declarations = emptyList>() + + // like graphql-java, only the schema's directives are applied + override fun newBuilder(context: TypeBuildContext): GraphQLScalarType.Builder { + val provided = context.customScalars.getValue(name) + return GraphQLScalarType.newScalar(provided) + .definition(definition) + .extensionDefinitions(extensions) + .specifiedByUrl(specifiedByUrl() ?: provided.specifiedByUrl) + .clearDirectives() + } + + override fun fallbackDescription(context: TypeBuildContext): String? = context.customScalars.getValue(name).description + + private fun specifiedByUrl(): String? = + (directives.find { it.name == Directives.SpecifiedByDirective.name }?.getArgument("url")?.value as? StringValue)?.value + } +} diff --git a/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt b/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt index a4d5c764..7a76bdd7 100644 --- a/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt +++ b/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt @@ -2,7 +2,6 @@ package graphql.kickstart.tools import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.unwrap -import graphql.kickstart.tools.util.withExtensions import graphql.language.* import graphql.schema.idl.ScalarInfo import org.slf4j.Logger @@ -13,16 +12,14 @@ import java.lang.reflect.Method internal class ScanDictionary( private val options: SchemaParserOptions, private val log: Logger, - private val typeExtensions: TypeExtensions, - private val definitionsByName: Map>, + private val typesByName: Map>, private val typeClassMatcher: TypeClassMatcher, private val initialDictionary: Map, - private val enqueue: (ObjectTypeDefinition, JavaType) -> Unit, - private val handleFoundScalarType: (ScalarTypeDefinition) -> Unit, - private val dictionary: MutableMap, DictionaryEntry> = mutableMapOf(), -) : Map, ScanDictionary.EntryView> by dictionary { - private val interfaceDefinitionsByName = definitionsByName.values.filterIsInstance().associateBy { it.name } - private val enumsWithoutClass = mutableMapOf() + private val enqueue: (MergedType.Object, JavaType) -> Unit, + private val handleFoundScalarType: (MergedType.Scalar) -> Unit, + private val dictionary: MutableMap, DictionaryEntry> = mutableMapOf(), +) : Map, ScanDictionary.EntryView> by dictionary { + private val enumsWithoutClass = mutableMapOf() fun handleFoundType(match: TypeClassMatcher.Match) = when (match) { is TypeClassMatcher.ScalarMatch -> handleFoundScalarType(match.type) @@ -32,7 +29,7 @@ internal class ScanDictionary( /** * Enter a found type into the dictionary if it doesn't exist yet, add a reference pointing back to where it was discovered. */ - fun handleFoundType(type: TypeDefinition<*>, javaType: JavaType?, reference: Reference) { + fun handleFoundType(type: MergedType<*>, javaType: JavaType?, reference: Reference) { val realEntry = dictionary.getOrPut(type) { DictionaryEntry() } var typeWasSet = false @@ -62,14 +59,15 @@ internal class ScanDictionary( /** * Handle a newly found type, adding it to the list of actually used types and putting it in the scanning queue if it's an object type. */ - private fun handleNewType(graphQLType: TypeDefinition<*>, javaType: JavaType) { + private fun handleNewType(graphQLType: MergedType<*>, javaType: JavaType) { when (graphQLType) { - is ObjectTypeDefinition -> { + is MergedType.Object -> { enqueue(graphQLType, javaType) scanInterfacesOfType(graphQLType) } - is InputObjectTypeDefinition -> handleInputObjectFields(graphQLType, javaType) + is MergedType.Input -> handleInputObjectFields(graphQLType, javaType) + else -> {} } } @@ -77,10 +75,9 @@ internal class ScanDictionary( * Finds the types of the input object's fields through the properties of its class. A null [javaType] means the input object * has no known class, e.g. because it's only reachable through a Map. */ - private fun handleInputObjectFields(graphQLType: InputObjectTypeDefinition, javaType: JavaType?) { + private fun handleInputObjectFields(graphQLType: MergedType.Input, javaType: JavaType?) { val clazz = javaType?.unwrap() - graphQLType.withExtensions(typeExtensions) - .flatMap { it.inputValueDefinitions } + graphQLType.fields .forEach { inputValueDefinition -> val inputGraphQLType = inputValueDefinition.type.unwrap() if (ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.containsKey(inputGraphQLType.name)) { @@ -108,10 +105,10 @@ internal class ScanDictionary( * Without a Java property for an input field its type can still be built, as long as it doesn't need a class of its own. * At runtime the value is whatever the input object's class (or the Map) deserializes it into. */ - private fun handleInputValueWithoutJavaType(graphQLType: InputObjectTypeDefinition, inputValueDefinition: InputValueDefinition, inputGraphQLType: TypeName, clazz: Class<*>?) { - when (val definition = definitionsByName[inputGraphQLType.name]) { - is ScalarTypeDefinition -> handleFoundScalarType(definition) - is InputObjectTypeDefinition -> { + private fun handleInputValueWithoutJavaType(graphQLType: MergedType.Input, inputValueDefinition: InputValueDefinition, inputGraphQLType: TypeName, clazz: Class<*>?) { + when (val definition = typesByName[inputGraphQLType.name]) { + is MergedType.Scalar -> handleFoundScalarType(definition) + is MergedType.Input -> { val isNewType = !dictionary.containsKey(definition) // registered without a class, so a class found for it later still gets set and scanned handleFoundType(definition, null, InputObjectReference(inputValueDefinition)) @@ -120,7 +117,7 @@ internal class ScanDictionary( } } // the enum class may still be found through another field, so this is only reported once scanning is done - is EnumTypeDefinition -> enumsWithoutClass.putIfAbsent(definition, enumWithoutClassMessage(definition, graphQLType, inputValueDefinition, clazz)) + is MergedType.Enum -> enumsWithoutClass.putIfAbsent(definition, enumWithoutClassMessage(definition, graphQLType, inputValueDefinition, clazz)) // undefined types and output types are reported by the SchemaParser else -> {} } @@ -133,7 +130,7 @@ internal class ScanDictionary( private fun isLibraryClass(clazz: Class<*>) = listOf("java.", "kotlin.", JACKSON_PACKAGE_PREFIX).any { clazz.name.startsWith(it) } - private fun enumWithoutClassMessage(enumType: EnumTypeDefinition, graphQLType: InputObjectTypeDefinition, inputValueDefinition: InputValueDefinition, clazz: Class<*>?): String { + private fun enumWithoutClassMessage(enumType: MergedType.Enum, graphQLType: MergedType.Input, inputValueDefinition: InputValueDefinition, clazz: Class<*>?): String { val field = inputValueDefinition.name val reason = when { clazz == null -> "no class was found for input type '${graphQLType.name}'" @@ -150,10 +147,10 @@ internal class ScanDictionary( ?.let { throw SchemaClassScannerError(it.value) } } - fun scanInterfacesOfType(graphQLType: ObjectTypeDefinition) { - graphQLType.withExtensions(typeExtensions).flatMap { it.implements }.forEach { + fun scanInterfacesOfType(graphQLType: MergedType.Object) { + graphQLType.interfaces.forEach { if (it is TypeName) { - handleFoundType(interfaceDefinitionsByName[it.name] + handleFoundType(typesByName[it.name] as? MergedType.Interface ?: throw SchemaClassScannerError("Object type ${graphQLType.name} declared interface ${it.name}, but no interface with that name was found in the schema!"), null, InterfaceReference(graphQLType)) } } @@ -238,11 +235,11 @@ internal class ScanDictionary( override fun getDescription() = "unused type" } - private class InterfaceReference(private val type: ObjectTypeDefinition) : Reference() { + private class InterfaceReference(private val type: MergedType.Object) : Reference() { override fun getDescription() = "interface declarations of ${type.name}" } - class UnionMemberReference(private val union: UnionTypeDefinition) : Reference() { + class UnionMemberReference(private val union: MergedType.Union) : Reference() { override fun getDescription() = "member of union ${union.name}" } diff --git a/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt b/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt index 1a60dce9..a17009b1 100644 --- a/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt +++ b/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt @@ -2,11 +2,7 @@ package graphql.kickstart.tools import graphql.kickstart.tools.resolver.FieldResolver import graphql.kickstart.tools.util.JavaType -import graphql.language.EnumTypeDefinition import graphql.language.FieldDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.SDLNamedDefinition -import graphql.language.TypeDefinition import graphql.schema.GraphQLScalarType /** @@ -14,24 +10,33 @@ import graphql.schema.GraphQLScalarType */ internal data class ScannedSchemaObjects( val dictionary: TypeClassDictionary, - val definitions: Set>, - val typeExtensions: TypeExtensions, + val definitions: MergedDefinitions, + val types: Set>, val customScalars: CustomScalarMap, - val rootInfo: RootTypeInfo, - val fieldResolversByType: Map>, - val unusedDefinitions: Set>, - val directiveOnlyEnums: Set + val fieldResolversByType: Map>, + val unusedTypes: Set>, + val directiveOnlyEnums: Set ) -internal class TypeClassDictionary(val classByType: Map, JavaType>) { - val typeByClass: Map> = classByType.entries - .groupBy({ it.value }, { it.key }) - .mapValues { (javaType, types) -> - types.singleOrNull() ?: throw SchemaClassScannerError( - "Class '${javaType.typeName}' is used for types ${types.joinToString { "'${it.name}'" }}, but only input object types can share a class!" - ) +internal class TypeClassDictionary(val classByType: Map, JavaType>) { + val typeByClass: Map> + + init { + requireOnlyInputTypesShareAClass(classByType) { javaType, types -> + "Class '${javaType.typeName}' is used for types ${types.joinToString { "'${it.name}'" }}, but only input object types can share a class!" + } + typeByClass = classByType.entries.associate { it.value to it.key } + } + + companion object { + fun requireOnlyInputTypesShareAClass(classByType: Map, J>, message: (J, List>) -> String) { + classByType.entries + .filter { it.key !is MergedType.Input } + .groupBy({ it.value }, { it.key }) + .entries.firstOrNull { it.value.size > 1 } + ?.let { (javaType, types) -> throw SchemaClassScannerError(message(javaType, types)) } } + } } internal typealias CustomScalarMap = Map -internal typealias TypeExtensions = Map>> diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt index 42f312e2..aae163aa 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt @@ -25,14 +25,14 @@ import java.lang.reflect.Modifier */ internal class SchemaClassScanner( initialDictionary: Map>, - allDefinitions: List>, + private val definitions: MergedDefinitions, resolvers: List>, private val scalars: CustomScalarMap, private val options: SchemaParserOptions ) { private val log = LoggerFactory.getLogger(javaClass) - private val rootInfo = RootTypeInfo.fromSchemaDefinitions(allDefinitions.filterIsInstance()) + private val rootInfo = definitions.rootInfo private val queryResolvers = resolvers.filterIsInstance() private val mutationResolvers = resolvers.filterIsInstance() @@ -41,54 +41,32 @@ internal class SchemaClassScanner( private val resolverInfos = resolvers.asSequence().minus(queryResolvers).minus(mutationResolvers).minus(subscriptionResolvers).map { NormalResolverInfo(it, options) }.toList() private val initialDictionary = initialDictionary.mapValues { InitialDictionaryEntry(it.value) } - private val directiveDefinitions = allDefinitions.filterIsInstance() - private val scalarDefinitions = allDefinitions.filterIsInstance() - - private val typeDefinitions = allDefinitions.filterIsInstance>() - private val baseTypeNames = typeDefinitions.filter { it !is SDLExtensionDefinition }.map { it.name }.toSet() - - private val loneExtensions = typeDefinitions - .filter { it is SDLExtensionDefinition && it !is ObjectTypeDefinition && it !is InputObjectTypeDefinition && it.name !in baseTypeNames } - .distinctBy { it.name } - - private val definitionsByName = typeDefinitions.filter { it !is SDLExtensionDefinition || it in loneExtensions }.associateBy { it.name } - private val typeExtensions: TypeExtensions = typeDefinitions - .filter { it is SDLExtensionDefinition && it !in loneExtensions && !extendsOtherKind(it) } - .groupBy { it.name } - private val objectDefinitions = allDefinitions.filterIsInstance().filter { it !is ObjectTypeExtensionDefinition } - private val objectDefinitionsByName = objectDefinitions.associateBy { it.name } - - private val scalarNames = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.keys + scalarDefinitions.map { it.name } - private val fieldResolverScanner = FieldResolverScanner(options, scalarNames) - private val typeClassMatcher = TypeClassMatcher(definitionsByName) - private val unvalidatedTypes = mutableSetOf>() + private val directiveDefinitions = definitions.directiveDefinitions + private val typesByName = definitions.byName + private val objectTypesByName = definitions.baseObjects.associateBy { it.name } + + private val fieldResolverScanner = FieldResolverScanner(options, definitions.scalarNames) + private val typeClassMatcher = TypeClassMatcher(definitions) + private val unvalidatedTypes = mutableSetOf>() private val queue = linkedSetOf() - private val dictionary = ScanDictionary(options, log, typeExtensions, definitionsByName, typeClassMatcher, this.initialDictionary, ::enqueue, ::handleFoundScalarType) - private val sealedSubclassMatcher = SealedSubclassMatcher(dictionary, typeExtensions) + private val dictionary = ScanDictionary(options, log, typesByName, typeClassMatcher, this.initialDictionary, ::enqueue, ::handleFoundScalarType) + private val sealedSubclassMatcher = SealedSubclassMatcher(dictionary) - private val fieldResolversByType = mutableMapOf>() + private val fieldResolversByType = mutableMapOf>() private val notCallableOnResolver = mutableListOf() init { initialDictionary.forEach { (name, clazz) -> - if (!definitionsByName.containsKey(name)) { + if (!typesByName.containsKey(name)) { throw SchemaClassScannerError("Class in supplied dictionary '${clazz.name}' specified type name '$name', but a type definition with that name was not found!") } } - typeDefinitions.filter { extendsOtherKind(it) }.forEach { extension -> - val definition = definitionsByName.getValue(extension.name) - log.warn("Type '${extension.name}' is defined as ${definition.kind()}, but extended as ${extension.kind()}. The extension is ignored.") - } + definitions.ignoredExtensionWarnings.forEach { log.warn(it) } - initialDictionary - .filterKeys { definitionsByName[it] !is InputObjectTypeDefinition } - .entries.groupBy({ it.value }, { it.key }) - .forEach { (clazz, names) -> - if (names.size > 1) { - throw SchemaClassScannerError("Class in supplied dictionary '${clazz.name}' specified type names ${names.joinToString { "'$it'" }}, but only input object types can share a class!") - } - } + TypeClassDictionary.requireOnlyInputTypesShareAClass(initialDictionary.mapKeys { typesByName.getValue(it.key) }) { clazz, types -> + "Class in supplied dictionary '${clazz.name}' specified type names ${types.joinToString { "'${it.name}'" }}, but only input object types can share a class!" + } if (options.allowUnimplementedResolvers) { log.warn("Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved to query time instead of schema creation time. Make sure this is turned off in production.") @@ -101,7 +79,7 @@ internal class SchemaClassScanner( fun scanForClasses(): ScannedSchemaObjects { // Figure out what query, mutation and subscription types are called - val rootTypeHolder = RootTypesHolder(options, rootInfo, definitionsByName, queryResolvers, mutationResolvers, subscriptionResolvers) + val rootTypeHolder = RootTypesHolder(options, rootInfo, typesByName, queryResolvers, mutationResolvers, subscriptionResolvers) handleRootType(rootTypeHolder.query) handleRootType(rootTypeHolder.mutation) @@ -134,7 +112,7 @@ internal class SchemaClassScanner( if (options.includeUnusedTypes) { // One type at a time, since scanning it can discover other unused types along with their classes while (true) { - val unusedDefinition = (definitionsByName.values - (dictionary.keys.toSet() + unvalidatedTypes)) + val unusedDefinition = (typesByName.values - (dictionary.keys.toSet() + unvalidatedTypes)) .filter { definition -> definition.name != "PageInfo" } .firstOrNull { canIncludeUnusedType(it) } ?: break @@ -149,19 +127,19 @@ internal class SchemaClassScanner( return validateAndCreateResult(rootTypeHolder) } - private fun canIncludeUnusedType(definition: TypeDefinition<*>): Boolean = when (definition) { - is ObjectTypeDefinition, is InterfaceTypeDefinition, is UnionTypeDefinition -> true + private fun canIncludeUnusedType(definition: MergedType<*>): Boolean = when (definition) { + is MergedType.Object, is MergedType.Interface, is MergedType.Union -> true // Enums can't be built without a class, so the ones missing from the dictionary are only reported as unused - is EnumTypeDefinition -> initialDictionary.containsKey(definition.name) + is MergedType.Enum -> initialDictionary.containsKey(definition.name) else -> false } - private fun handleUnusedType(type: TypeDefinition<*>) { + private fun handleUnusedType(type: MergedType<*>) { val initialEntry = initialDictionary[type.name] when { initialEntry != null -> dictionary.handleFoundType(type, initialEntry.get(), DictionaryReference()) // Interfaces and unions are resolved through the classes of their implementations, so they don't need one - type is InterfaceTypeDefinition || type is UnionTypeDefinition -> dictionary.handleFoundType(type, null, UnusedTypeReference()) + type is MergedType.Interface || type is MergedType.Union -> dictionary.handleFoundType(type, null, UnusedTypeReference()) else -> throw SchemaClassScannerError("Object type '${type.name}' is unused and includeUnusedTypes is true. Please pass a class for type '${type.name}' in the parser's dictionary.") } } @@ -202,15 +180,15 @@ internal class SchemaClassScanner( private fun handleDirectiveInput(inputType: Type<*>) { val inputTypeName = inputType.unwrap().name - val typeDefinition = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS[inputTypeName] - ?: definitionsByName[inputTypeName] + val typeDefinition = definitions.resolve(inputTypeName) ?: error("No ${TypeDefinition::class.java.simpleName} for type name $inputTypeName") when (typeDefinition) { - is ScalarTypeDefinition -> handleFoundScalarType(typeDefinition) - is EnumTypeDefinition -> handleDirectiveEnum(typeDefinition) - is InputObjectTypeDefinition -> handleDictionaryTypes(listOf(typeDefinition)) { + is MergedType.Scalar -> handleFoundScalarType(typeDefinition) + is MergedType.Enum -> handleDirectiveEnum(typeDefinition) + is MergedType.Input -> handleDictionaryTypes(listOf(typeDefinition)) { "Input object type '${it.name}' is used in a directive, but no class could be found for that type name. Please pass a class for type '${it.name}' in the parser's dictionary." } + else -> {} } } @@ -219,7 +197,7 @@ internal class SchemaClassScanner( * it goes into [unvalidatedTypes] and, unless a field uses it too, is built with its value names as values, see * [validateAndCreateResult]. */ - private fun handleDirectiveEnum(type: EnumTypeDefinition) { + private fun handleDirectiveEnum(type: MergedType.Enum) { if (dictionary.containsKey(type)) { return } @@ -233,17 +211,16 @@ internal class SchemaClassScanner( } /** - * The names of the types used by the fields, arguments and input fields of [definitions], including fields added by extensions. + * The names of the types used by the fields, arguments and input fields of [types]. */ - private fun typeNamesUsedByFields(definitions: Set>): Set { - return definitions - .flatMap { it.withExtensions(typeExtensions) } - .flatMap { definition -> - when (definition) { - is ImplementingTypeDefinition<*> -> definition.fieldDefinitions.flatMap { field -> + private fun typeNamesUsedByFields(types: Set>): Set { + return types + .flatMap { type -> + when (type) { + is MergedType.Implementing -> type.fields.flatMap { field -> field.inputValueDefinitions.map { it.type } + field.type } - is InputObjectTypeDefinition -> definition.inputValueDefinitions.map { it.type } + is MergedType.Input -> type.fields.map { it.type } else -> emptyList() } } @@ -271,12 +248,12 @@ internal class SchemaClassScanner( it.value.javaType != null && it.value.typeClass() != Any::class.java && !Map::class.java.isAssignableFrom(it.value.typeClass()) - && it.key !is InputObjectTypeDefinition - && it.key !is UnionTypeDefinition + && it.key !is MergedType.Input + && it.key !is MergedType.Union }.mapValues { it.value.javaType!! } ) // SchemaParser builds the scalars, this only checks that each one was provided - val scalars = observedDefinitions.filterIsInstance() + val scalars = observedDefinitions.filterIsInstance() .filter { // Filter for any defined scalars OR scalars that aren't defined but also aren't standard scalars.containsKey(it.name) || !ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.containsKey(it.name) @@ -285,7 +262,7 @@ internal class SchemaClassScanner( ?: throw SchemaClassScannerError("Expected a user-defined GraphQL scalar type with name '${definition.name}' but found none!")) } - val unusedDefinitions = (definitionsByName.values - observedDefinitions).toSet() + val unusedDefinitions = (typesByName.values - observedDefinitions).toSet() unusedDefinitions .filter { definition -> definition.name != "PageInfo" } .forEach { definition -> @@ -304,15 +281,13 @@ internal class SchemaClassScanner( validateRootResolversWereUsed(rootTypeHolder.mutation, fieldResolvers) validateRootResolversWereUsed(rootTypeHolder.subscription, fieldResolvers) - val definitions = observedDefinitions + directiveDefinitions - // The enums in unvalidatedTypes come from directives without a class, so they can only be built when no field uses them. // A field hands the enum's values to user code even when the scanner found no class through it, e.g. an input field bound // to a Map or an unimplemented field's argument. val typeNamesUsedByFields = typeNamesUsedByFields(observedDefinitions) - val directiveOnlyEnums = unvalidatedTypes.filterIsInstance().filter { it.name !in typeNamesUsedByFields }.toSet() + val directiveOnlyEnums = unvalidatedTypes.filterIsInstance().filter { it.name !in typeNamesUsedByFields }.toSet() - return ScannedSchemaObjects(dictionary, definitions, typeExtensions, scalars, rootInfo, fieldResolversByType.toMap(), unusedDefinitions, directiveOnlyEnums) + return ScannedSchemaObjects(dictionary, definitions, observedDefinitions, scalars, fieldResolversByType.toMap(), unusedDefinitions, directiveOnlyEnums) } private fun validateRootResolversWereUsed(rootType: RootType?, fieldResolvers: List) { @@ -328,22 +303,20 @@ internal class SchemaClassScanner( } } - private fun getAllObjectTypesImplementingDiscoveredInterfaces(): List { - return dictionary.keys.filterIsInstance().map { iface -> - objectDefinitions.filter { obj -> - obj.withExtensions(typeExtensions).flatMap { it.implements }.filterIsInstance().any { it.name == iface.name } + private fun getAllObjectTypesImplementingDiscoveredInterfaces(): List { + return dictionary.keys.filterIsInstance().map { iface -> + definitions.baseObjects.filter { obj -> + obj.interfaces.filterIsInstance().any { it.name == iface.name } } }.flatten().distinctBy { it.name } } - private fun getAllObjectTypeMembersOfDiscoveredUnions(): List { - val unionTypeNames = dictionary.keys.filterIsInstance().map { union -> union.name }.toSet() - return dictionary.keys.filterIsInstance().map { union -> - union.withExtensions(typeExtensions).flatMap { definition -> - definition.memberTypes.filterIsInstance().filter { !unionTypeNames.contains(it.name) }.map { - objectDefinitionsByName[it.name] - ?: throw SchemaClassScannerError("No object type found with name '${it.name}' for union: $definition") - } + private fun getAllObjectTypeMembersOfDiscoveredUnions(): List { + val unionTypeNames = dictionary.keys.filterIsInstance().map { union -> union.name }.toSet() + return dictionary.keys.filterIsInstance().map { union -> + union.members.filterIsInstance().filter { !unionTypeNames.contains(it.name) }.map { + objectTypesByName[it.name] + ?: throw SchemaClassScannerError("No object type found with name '${it.name}' for union: ${union.declarationOf(it)}") } }.flatten().distinct() } @@ -352,10 +325,10 @@ internal class SchemaClassScanner( * Unions can list other unions as members. Returns whether any new unions were found. */ private fun handleNestedUnions(): Boolean { - val newUnions = dictionary.keys.filterIsInstance().flatMap { union -> - union.withExtensions(typeExtensions).flatMap { it.memberTypes }.filterIsInstance() - .map { definitionsByName[it.name] } - .filterIsInstance() + val newUnions = dictionary.keys.filterIsInstance().flatMap { union -> + union.members.filterIsInstance() + .map { typesByName[it.name] } + .filterIsInstance() .filter { !dictionary.containsKey(it) } .map { it to UnionMemberReference(union) } } @@ -369,10 +342,10 @@ internal class SchemaClassScanner( * union or interface may not be reachable from any object field. Returns whether any new types were found. */ private fun handleInterfaceFieldTypes(): Boolean { - val newTypes = dictionary.keys.filterIsInstance().flatMap { iface -> - iface.withExtensions(typeExtensions).flatMap { it.fieldDefinitions }.mapNotNull { field -> - val type = definitionsByName[field.type.unwrap().name] - if ((type is UnionTypeDefinition || type is InterfaceTypeDefinition) && !dictionary.containsKey(type)) { + val newTypes = dictionary.keys.filterIsInstance().flatMap { iface -> + iface.fields.mapNotNull { field -> + val type = typesByName[field.type.unwrap().name] + if ((type is MergedType.Union || type is MergedType.Interface) && !dictionary.containsKey(type)) { type to FieldTypeReference("${iface.name}.${field.name}") } else { null @@ -384,8 +357,8 @@ internal class SchemaClassScanner( return newTypes.isNotEmpty() } - private fun handleDictionaryTypes(types: List>, failureMessage: (TypeDefinition<*>) -> String) { - val typesWithoutClass = mutableListOf>() + private fun handleDictionaryTypes(types: List>, failureMessage: (MergedType<*>) -> String) { + val typesWithoutClass = mutableListOf>() types.forEach { type -> val dictionaryContainsType = dictionary.filter { it.key.name == type.name }.isNotEmpty() if (!unvalidatedTypes.contains(type) && !dictionaryContainsType) { @@ -398,7 +371,7 @@ internal class SchemaClassScanner( } } - val sealedMatches = typesWithoutClass.filterIsInstance().mapNotNull { sealedSubclassMatcher.sealedSubclassMatches(it).singleOrNull() } + val sealedMatches = typesWithoutClass.filterIsInstance().mapNotNull { sealedSubclassMatcher.sealedSubclassMatches(it).singleOrNull() } if (sealedMatches.isEmpty()) { typesWithoutClass.firstOrNull()?.let { throw SchemaClassScannerError(failureMessage(it) + sealedSubclassMatcher.sealedSubclassHint(it)) } } @@ -448,8 +421,8 @@ internal class SchemaClassScanner( private fun isResolverForSupertype(resolverInfo: NormalResolverInfo, dataClass: Class<*>) = resolverInfo.dataClassType != Any::class.java && resolverInfo.dataClassType.isAssignableFrom(dataClass) - private fun scanResolverInfoForPotentialMatches(type: ObjectTypeDefinition, resolverInfo: ResolverInfo) { - type.withExtensions(typeExtensions).flatMap { it.fieldDefinitions }.forEach { field -> + private fun scanResolverInfoForPotentialMatches(type: MergedType.Object, resolverInfo: ResolverInfo) { + type.fields.forEach { field -> val fieldResolver = fieldResolverScanner.findFieldResolver(field, resolverInfo) collectIfNotCallableOnResolver(type, fieldResolver) @@ -462,7 +435,7 @@ internal class SchemaClassScanner( } } - private fun collectIfNotCallableOnResolver(type: ObjectTypeDefinition, fieldResolver: FieldResolver) { + private fun collectIfNotCallableOnResolver(type: MergedType.Object, fieldResolver: FieldResolver) { val source = fieldResolver.search.source ?: return val member: Member = when (fieldResolver) { is MethodFieldResolver -> fieldResolver.method @@ -492,7 +465,7 @@ internal class SchemaClassScanner( ) } - private fun requireParameterForEachArgument(type: ObjectTypeDefinition, fieldResolver: FieldResolver) { + private fun requireParameterForEachArgument(type: MergedType.Object, fieldResolver: FieldResolver) { if (fieldResolver !is MethodFieldResolver) { return } @@ -512,37 +485,22 @@ internal class SchemaClassScanner( } } - private fun handleFoundScalarType(type: ScalarTypeDefinition) { + private fun handleFoundScalarType(type: MergedType.Scalar) { unvalidatedTypes.add(type) } - private fun extendsOtherKind(definition: TypeDefinition<*>): Boolean { - val type = definitionsByName[definition.name] - return definition is SDLExtensionDefinition && type != null && type.kind() != definition.kind() - } - - private fun TypeDefinition<*>.kind(): String = when (this) { - is ObjectTypeDefinition -> "an object type" - is InterfaceTypeDefinition -> "an interface" - is UnionTypeDefinition -> "a union" - is EnumTypeDefinition -> "an enum" - is InputObjectTypeDefinition -> "an input object type" - is ScalarTypeDefinition -> "a scalar" - else -> javaClass.simpleName - } - - private fun enqueue(graphQLType: ObjectTypeDefinition, javaType: JavaType) { + private fun enqueue(graphQLType: MergedType.Object, javaType: JavaType) { queue.add(QueueItem(graphQLType, javaType)) } - private data class QueueItem(val type: ObjectTypeDefinition, val clazz: JavaType) + private data class QueueItem(val type: MergedType.Object, val clazz: JavaType) private data class NotCallableOnResolver(val message: String, val isField: Boolean) private class RootTypesHolder( options: SchemaParserOptions, rootInfo: RootTypeInfo, - definitionsByName: Map>, + typesByName: Map>, queryResolvers: List, mutationResolvers: List, subscriptionResolvers: List @@ -551,9 +509,9 @@ internal class SchemaClassScanner( private val mutationName = rootInfo.getMutationName() private val subscriptionName = rootInfo.getSubscriptionName() - private val queryDefinition = definitionsByName[queryName] - private val mutationDefinition = definitionsByName[mutationName] - private val subscriptionDefinition = definitionsByName[subscriptionName] + private val queryDefinition = typesByName[queryName] + private val mutationDefinition = typesByName[mutationName] + private val subscriptionDefinition = typesByName[subscriptionName] private val queryResolverInfo = RootResolverInfo(queryResolvers, options) private val mutationResolverInfo = RootResolverInfo(mutationResolvers, options) @@ -563,7 +521,7 @@ internal class SchemaClassScanner( val mutation = createRootType("mutation", mutationDefinition, mutationName, rootInfo.isMutationRequired(), mutationResolvers, GraphQLMutationResolver::class.java, mutationResolverInfo) val subscription = createRootType("subscription", subscriptionDefinition, subscriptionName, rootInfo.isSubscriptionRequired(), subscriptionResolvers, GraphQLSubscriptionResolver::class.java, subscriptionResolverInfo) - private fun createRootType(name: String, type: TypeDefinition<*>?, typeName: String, required: Boolean, resolvers: List, resolverInterface: Class<*>, resolverInfo: RootResolverInfo): RootType? { + private fun createRootType(name: String, type: MergedType<*>?, typeName: String, required: Boolean, resolvers: List, resolverInterface: Class<*>, resolverInfo: RootResolverInfo): RootType? { if (type == null) { if (required) { throw SchemaClassScannerError("Type definition for root $name type '$typeName' not found!") @@ -572,8 +530,8 @@ internal class SchemaClassScanner( return null } - if (type !is ObjectTypeDefinition) { - throw SchemaClassScannerError("Expected root query type's type to be ${ObjectTypeDefinition::class.java.simpleName}, but it was ${type.javaClass.simpleName}") + if (type !is MergedType.Object) { + throw SchemaClassScannerError("Expected root query type's type to be ${ObjectTypeDefinition::class.java.simpleName}, but it was ${type.definitionClassName}") } // Find query resolver class @@ -585,7 +543,7 @@ internal class SchemaClassScanner( } } - internal class RootType(val name: String, val type: ObjectTypeDefinition, val resolvers: List, val resolverInterface: Class<*>, val resolverInfo: RootResolverInfo) + internal class RootType(val name: String, val type: MergedType.Object, val resolvers: List, val resolverInterface: Class<*>, val resolverInfo: RootResolverInfo) } internal class SchemaClassScannerError(message: String, throwable: Throwable? = null) : RuntimeException(message, throwable) diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt index a49b9aa1..501a41bc 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt @@ -1,24 +1,15 @@ package graphql.kickstart.tools -import graphql.Directives import graphql.introspection.Introspection import graphql.introspection.Introspection.DirectiveLocation.ARGUMENT_DEFINITION -import graphql.introspection.Introspection.DirectiveLocation.ENUM import graphql.introspection.Introspection.DirectiveLocation.ENUM_VALUE import graphql.introspection.Introspection.DirectiveLocation.FIELD_DEFINITION import graphql.introspection.Introspection.DirectiveLocation.INPUT_FIELD_DEFINITION -import graphql.introspection.Introspection.DirectiveLocation.INPUT_OBJECT -import graphql.introspection.Introspection.DirectiveLocation.INTERFACE -import graphql.introspection.Introspection.DirectiveLocation.OBJECT -import graphql.introspection.Introspection.DirectiveLocation.SCALAR -import graphql.introspection.Introspection.DirectiveLocation.UNION import graphql.kickstart.tools.directive.DirectiveWiringHelper import graphql.kickstart.tools.resolver.MethodFieldResolver import graphql.kickstart.tools.util.describe -import graphql.kickstart.tools.util.extensionsOf import graphql.kickstart.tools.util.getDocumentation import graphql.kickstart.tools.util.unwrap -import graphql.kickstart.tools.util.withExtensions import graphql.language.* import graphql.schema.* import graphql.schema.idl.RuntimeWiring @@ -45,21 +36,21 @@ class SchemaParser internal constructor( private val dictionary = scanResult.dictionary private val definitions = scanResult.definitions - private val typeExtensions = scanResult.typeExtensions + private val types = scanResult.types private val customScalars = scanResult.customScalars - private val rootInfo = scanResult.rootInfo + private val rootInfo = definitions.rootInfo private val fieldResolversByType = scanResult.fieldResolversByType - private val unusedDefinitions = scanResult.unusedDefinitions + private val unusedDefinitions = definitions.definitionsOf(scanResult.unusedTypes) private val directiveOnlyEnums = scanResult.directiveOnlyEnums - private val objectDefinitions = definitions.filterIsInstance() - private val inputObjectDefinitions = definitions.filterIsInstance() - private val enumDefinitions = definitions.filterIsInstance() - private val interfaceDefinitions = definitions.filterIsInstance() - private val directiveDefinitions = definitions.filterIsInstance() + private val objectDefinitions = types.filterIsInstance() + private val inputObjectDefinitions = types.filterIsInstance() + private val enumDefinitions = types.filterIsInstance() + private val interfaceDefinitions = types.filterIsInstance() + private val directiveDefinitions = definitions.directiveDefinitions - private val unionDefinitions = definitions.filterIsInstance() - private val scalarDefinitions = definitions.filterIsInstance().filter { it.name in customScalars }.associateBy { it.name } + private val unionDefinitions = types.filterIsInstance() + private val scalarDefinitions = types.filterIsInstance().filter { it.name in customScalars }.associateBy { it.name } private val permittedTypesForObject: Set = (objectDefinitions.map { it.name } + enumDefinitions.map { it.name } + @@ -67,12 +58,13 @@ class SchemaParser internal constructor( unionDefinitions.map { it.name }).toSet() private val permittedTypesForInputObject: Set = (inputObjectDefinitions.map { it.name } + enumDefinitions.map { it.name }).toSet() - private val typeReferenceErrors = TypeReferenceErrors(definitions, unusedDefinitions, typeExtensions) + private val typeReferenceErrors = TypeReferenceErrors(definitions, types, scanResult.unusedTypes) private val codeRegistryBuilder = GraphQLCodeRegistry.newCodeRegistry() private val directiveWiringHelper = DirectiveWiringHelper(runtimeWiring, codeRegistryBuilder) private lateinit var sdlDirectives: SdlDirectives + private lateinit var typeBuildContext: TypeBuildContext /** * Parses the given schema with respect to the given dictionary and returns GraphQL objects. @@ -86,6 +78,7 @@ class SchemaParser internal constructor( // type references, so that an input object used by a directive applied to it doesn't contain itself determineType(GraphQLInputType::class, it, permittedTypesForInputObject) as GraphQLInputType } + typeBuildContext = TypeBuildContext(options, sdlDirectives, customScalars) val scalars = scalarDefinitions.values.map { createScalar(it) } inputObjectDefinitions.forEach { if (inputObjects.none { io -> io.name == it.name }) { @@ -160,27 +153,17 @@ class SchemaParser internal constructor( @Suppress("unused") fun getUnusedDefinitions(): Set> = unusedDefinitions - private fun createObject(objectDefinition: ObjectTypeDefinition, interfaces: List, inputObjects: List): GraphQLObjectType { - val name = objectDefinition.name - val extensions = typeExtensions.extensionsOf(name) - val directives = sdlDirectives.directivesOf(objectDefinition, extensions) - val fieldDefinitions = objectDefinition.withExtensions(typeExtensions).flatMap { it.fieldDefinitions } - rejectRepeated(name, "field", fieldDefinitions) - val builder = GraphQLObjectType.newObject() - .name(name) - .definition(objectDefinition) - .extensionDefinitions(extensions) - .description(getDocumentation(objectDefinition, options)) - .withSdlDirectives(directives, OBJECT) + private fun createObject(objectDefinition: MergedType.Object, interfaces: List, inputObjects: List): GraphQLObjectType { + val builder = objectDefinition.prepare(typeBuildContext) .apply { - objectDefinition.withExtensions(typeExtensions).flatMap { it.implements }.forEach { implementsDefinition -> + objectDefinition.interfaces.forEach { implementsDefinition -> val interfaceName = (implementsDefinition as TypeName).name withInterface(interfaces.find { it.name == interfaceName } ?: throw SchemaError("Expected interface type with name '$interfaceName' but found none!")) } } .apply { - fieldDefinitions.forEach { fieldDefinition -> + objectDefinition.fields.forEach { fieldDefinition -> field { field -> createField(field, fieldDefinition, inputObjects) codeRegistryBuilder.dataFetcher( @@ -200,59 +183,38 @@ class SchemaParser internal constructor( return builder.build() } - private fun createInputObject(definition: InputObjectTypeDefinition, inputObjects: List, + private fun createInputObject(definition: MergedType.Input, inputObjects: List, inputObjectsInProgress: MutableSet): GraphQLInputObjectType { - val extensionDefinitions = typeExtensions.extensionsOf(definition.name) - val directives = sdlDirectives.directivesOf(definition, extensionDefinitions) - val inputValueDefinitions = definition.withExtensions(typeExtensions).flatMap { it.inputValueDefinitions } - rejectRepeated(definition.name, "field", inputValueDefinitions) - + val builder = definition.prepare(typeBuildContext) inputObjectsInProgress.add(definition.name) - val builder = GraphQLInputObjectType.newInputObject() - .name(definition.name) - .definition(definition) - .extensionDefinitions(extensionDefinitions) - .description(getDocumentation(definition, options)) - .withSdlDirectives(directives, INPUT_OBJECT) - .apply { - inputValueDefinitions.forEach { fieldDefinition -> - field( - GraphQLInputObjectField.newInputObjectField() - .name(fieldDefinition.name) - .definition(fieldDefinition) - .description(getDocumentation(fieldDefinition, options)) - .apply { fieldDefinition.defaultValue?.let { v -> defaultValueLiteral(v) } } - .apply { sdlDirectives.getDeprecated(fieldDefinition.directives)?.let { deprecate(it) } } - .type(determineInputType(fieldDefinition.type, inputObjects, inputObjectsInProgress)) - .withSdlDirectives(fieldDefinition.directives, INPUT_FIELD_DEFINITION) - .build() - ) - } - } + definition.fields.forEach { fieldDefinition -> + builder.field( + GraphQLInputObjectField.newInputObjectField() + .name(fieldDefinition.name) + .definition(fieldDefinition) + .description(getDocumentation(fieldDefinition, options)) + .apply { fieldDefinition.defaultValue?.let { v -> defaultValueLiteral(v) } } + .apply { sdlDirectives.getDeprecated(fieldDefinition.directives)?.let { deprecate(it) } } + .type(determineInputType(fieldDefinition.type, inputObjects, inputObjectsInProgress)) + .withSdlDirectives(fieldDefinition.directives, INPUT_FIELD_DEFINITION) + .build() + ) + } return builder.build() } - private fun createEnumObject(definition: EnumTypeDefinition): GraphQLEnumType { + private fun createEnumObject(definition: MergedType.Enum): GraphQLEnumType { val name = definition.name // enums only used by directives can do without a class, see SchemaClassScanner.handleDirectiveEnum val enumClass = dictionary.classByType[definition]?.unwrap() if (enumClass == null && definition !in directiveOnlyEnums) throw SchemaError("Expected enum with name '$name' but found none!") if (enumClass != null && !enumClass.isEnum) throw SchemaError("Type '$name' is declared as an enum in the GraphQL schema but is not a Java enum!") - val extensions = typeExtensions.extensionsOf(name) - val directives = sdlDirectives.directivesOf(definition, extensions) - val values = definition.withExtensions(typeExtensions).flatMap { it.enumValueDefinitions } - rejectRepeated(name, "value", values) - val builder = GraphQLEnumType.newEnum() - .name(name) - .definition(definition) - .extensionDefinitions(extensions) - .description(getDocumentation(definition, options)) - .withSdlDirectives(directives, ENUM) + val builder = definition.prepare(typeBuildContext) .apply { - values.forEach { valueDefinition -> + definition.values.forEach { valueDefinition -> val enumName = valueDefinition.name val enumValue = if (enumClass == null) { enumName @@ -277,41 +239,17 @@ class SchemaParser internal constructor( return builder.build() } - private fun createScalar(definition: ScalarTypeDefinition): GraphQLScalarType { - val name = definition.name - val provided = customScalars.getValue(name) - val extensions = typeExtensions.extensionsOf(name) - val directives = sdlDirectives.directivesOf(definition, extensions) - val builder = GraphQLScalarType.newScalar(provided) - .definition(definition) - .extensionDefinitions(extensions) - .description(getDocumentation(definition, options) ?: provided.description) - .specifiedByUrl(getSpecifiedByUrl(directives) ?: provided.specifiedByUrl) - // like graphql-java, only the schema's directives are applied - .clearDirectives() - .withSdlDirectives(directives, SCALAR) - - return builder.build() - } + private fun createScalar(definition: MergedType.Scalar): GraphQLScalarType = definition.prepare(typeBuildContext).build() - private fun createInterfaceObject(interfaceDefinition: InterfaceTypeDefinition, inputObjects: List): GraphQLInterfaceType { - val extensions = typeExtensions.extensionsOf(interfaceDefinition.name) - val directives = sdlDirectives.directivesOf(interfaceDefinition, extensions) - val fieldDefinitions = interfaceDefinition.withExtensions(typeExtensions).flatMap { it.fieldDefinitions } - rejectRepeated(interfaceDefinition.name, "field", fieldDefinitions) - val builder = GraphQLInterfaceType.newInterface() - .name(interfaceDefinition.name) - .definition(interfaceDefinition) - .extensionDefinitions(extensions) - .description(getDocumentation(interfaceDefinition, options)) - .withSdlDirectives(directives, INTERFACE) + private fun createInterfaceObject(interfaceDefinition: MergedType.Interface, inputObjects: List): GraphQLInterfaceType { + val builder = interfaceDefinition.prepare(typeBuildContext) .apply { - fieldDefinitions.forEach { fieldDefinition -> + interfaceDefinition.fields.forEach { fieldDefinition -> field { field -> createField(field, fieldDefinition, inputObjects) } } } .apply { - interfaceDefinition.withExtensions(typeExtensions).flatMap { it.implements }.forEach { implementsDefinition -> + interfaceDefinition.interfaces.forEach { implementsDefinition -> val interfaceName = (implementsDefinition as TypeName).name withInterface(GraphQLTypeReference(interfaceName)) } @@ -320,16 +258,8 @@ class SchemaParser internal constructor( return builder.build() } - private fun createUnionObject(definition: UnionTypeDefinition, types: List): GraphQLUnionType { - val extensions = typeExtensions.extensionsOf(definition.name) - val directives = sdlDirectives.directivesOf(definition, extensions) - rejectRepeated(definition.name, "member", definition.withExtensions(typeExtensions).flatMap { it.memberTypes }.map { it as TypeName }) - val builder = GraphQLUnionType.newUnionType() - .name(definition.name) - .definition(definition) - .extensionDefinitions(extensions) - .description(getDocumentation(definition, options)) - .withSdlDirectives(directives, UNION) + private fun createUnionObject(definition: MergedType.Union, types: List): GraphQLUnionType { + val builder = definition.prepare(typeBuildContext) .apply { getLeafUnionObjects(definition, types).forEach { possibleType(it) } } @@ -338,18 +268,18 @@ class SchemaParser internal constructor( } private fun getLeafUnionObjects( - definition: UnionTypeDefinition, + definition: MergedType.Union, types: List, - path: List = listOf(definition), + path: List = listOf(definition), ): List { val name = definition.name val leafObjects = mutableListOf() - definition.withExtensions(typeExtensions).flatMap { it.memberTypes }.forEach { + definition.members.forEach { val typeName = (it as TypeName).name // Is this a nested union? If so, expand - val nestedUnion: UnionTypeDefinition? = unionDefinitions.find { otherDefinition -> typeName == otherDefinition.name } + val nestedUnion: MergedType.Union? = unionDefinitions.find { otherDefinition -> typeName == otherDefinition.name } if (nestedUnion != null) { if (nestedUnion in path) { @@ -365,12 +295,6 @@ class SchemaParser internal constructor( return leafObjects } - private fun rejectRepeated(typeName: String, kind: String, declarations: List>) { - val names = mutableSetOf() - val repeat = declarations.firstOrNull { !names.add(it.name) } ?: return - throw SchemaError("Type '$typeName' declares $kind '${repeat.name}' more than once${repeat.sourceLocation.describe()}.") - } - private fun createField(field: GraphQLFieldDefinition.Builder, fieldDefinition: FieldDefinition, inputObjects: List): GraphQLFieldDefinition.Builder { return field .name(fieldDefinition.name) @@ -401,9 +325,6 @@ class SchemaParser internal constructor( private fun > B.withSdlDirectives(directives: List, location: Introspection.DirectiveLocation): B = with(sdlDirectives) { withSdlDirectives(directives, location) } - private fun getSpecifiedByUrl(directives: List): String? = - (directives.find { it.name == Directives.SpecifiedByDirective.name }?.getArgument("url")?.value as? StringValue)?.value - // custom scalars are in the dictionary, so they're referenced by name like the other types private fun scalarType(name: String?): GraphQLInputType? = scalarDefinitions[name]?.let { GraphQLTypeReference(it.name) } ?: GRAPHQL_SCALARS[name] diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaParserBuilder.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaParserBuilder.kt index 448228c2..35727c57 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaParserBuilder.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaParserBuilder.kt @@ -163,7 +163,7 @@ class SchemaParserBuilder { val definitions = appendDynamicDefinitions(parseDefinitions()) val customScalars = scalars.associateBy { it.name } - return SchemaClassScanner(dictionary.toMap(), definitions, resolvers, customScalars, options) + return SchemaClassScanner(dictionary.toMap(), MergedDefinitions(definitions), resolvers, customScalars, options) .scanForClasses() } diff --git a/src/main/kotlin/graphql/kickstart/tools/SdlDirectives.kt b/src/main/kotlin/graphql/kickstart/tools/SdlDirectives.kt index ee531bf3..92dbc42e 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SdlDirectives.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SdlDirectives.kt @@ -28,9 +28,6 @@ internal class SdlDirectives( createDirectives() } - fun directivesOf(definition: TypeDefinition<*>, extensions: List>): List = - definition.directives + extensions.flatMap { it.directives } - fun failOnProblems() { if (problems.isNotEmpty()) throw SchemaError(problems.joinToString("\n")) } diff --git a/src/main/kotlin/graphql/kickstart/tools/SealedSubclassMatcher.kt b/src/main/kotlin/graphql/kickstart/tools/SealedSubclassMatcher.kt index 671e940d..713999ae 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SealedSubclassMatcher.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SealedSubclassMatcher.kt @@ -3,21 +3,15 @@ package graphql.kickstart.tools import graphql.kickstart.tools.ScanDictionary.SealedSubclassReference import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.unwrap -import graphql.kickstart.tools.util.withExtensions -import graphql.language.InterfaceTypeDefinition -import graphql.language.ObjectTypeDefinition -import graphql.language.TypeDefinition import graphql.language.TypeName -import graphql.language.UnionTypeDefinition import org.apache.commons.lang3.reflect.TypeUtils import java.lang.reflect.ParameterizedType internal class SealedSubclassMatcher( - private val dictionary: Map, ScanDictionary.EntryView>, - private val typeExtensions: TypeExtensions, + private val dictionary: Map, ScanDictionary.EntryView>, ) { - fun sealedSubclassHint(type: TypeDefinition<*>): String { - if (type !is ObjectTypeDefinition) { + fun sealedSubclassHint(type: MergedType<*>): String { + if (type !is MergedType.Object) { return "" } @@ -35,7 +29,7 @@ internal class SealedSubclassMatcher( } } - fun sealedSubclassMatches(type: ObjectTypeDefinition): List = + fun sealedSubclassMatches(type: MergedType.Object): List = sealedTypesOf(type) .flatMap { sealedType -> sealedSubclasses(sealedType.unwrap()) @@ -44,12 +38,12 @@ internal class SealedSubclassMatcher( } .distinctBy { it.javaType.unwrap() } - private fun sealedTypesOf(type: ObjectTypeDefinition): List = + private fun sealedTypesOf(type: MergedType.Object): List = dictionary .filterKeys { definition -> when (definition) { - is UnionTypeDefinition -> definition.withExtensions(typeExtensions).flatMap { it.memberTypes }.filterIsInstance().any { it.name == type.name } - is InterfaceTypeDefinition -> type.withExtensions(typeExtensions).flatMap { it.implements }.filterIsInstance().any { it.name == definition.name } + is MergedType.Union -> definition.members.filterIsInstance().any { it.name == type.name } + is MergedType.Interface -> type.interfaces.filterIsInstance().any { it.name == definition.name } else -> false } } diff --git a/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt b/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt index fff48337..93cffe0e 100644 --- a/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt +++ b/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt @@ -6,7 +6,6 @@ import graphql.kickstart.tools.util.GraphQLLangType import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.isSubtypeOf import graphql.language.* -import graphql.schema.idl.ScalarInfo import graphql.schema.idl.TypeUtil import java.lang.reflect.ParameterizedType import java.util.* @@ -14,32 +13,30 @@ import java.util.* /** * @author Andrew Potter */ -internal class TypeClassMatcher(private val definitionsByName: Map>) { +internal class TypeClassMatcher(private val definitions: MergedDefinitions) { fun match(potentialMatch: PotentialMatch): Match { val unwrapping = potentialMatch.unwrapping return when (val graphQLType = unwrapping.graphQLType) { is TypeName -> { - val typeDefinition = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS[graphQLType.name] - ?: definitionsByName[graphQLType.name] + val typeDefinition = definitions.resolve(graphQLType.name) ?: throw potentialMatch.error("No ${TypeDefinition::class.java.simpleName} for type name ${graphQLType.name}") - if (typeDefinition is ScalarTypeDefinition) { + if (typeDefinition is MergedType.Scalar) { ScalarMatch(typeDefinition) } else { ValidMatch(typeDefinition, unwrapping.javaType, potentialMatch.reference) } } - is TypeDefinition<*> -> ValidMatch(graphQLType, unwrapping.javaType, potentialMatch.reference) else -> throw potentialMatch.error("Unknown type: ${unwrapping.javaType.javaClass.name}") } } internal sealed interface Match - internal data class ScalarMatch(val type: ScalarTypeDefinition) : Match + internal data class ScalarMatch(val type: MergedType.Scalar) : Match - internal data class ValidMatch(val type: TypeDefinition<*>, val javaType: JavaType, val reference: ScanDictionary.Reference) : Match + internal data class ValidMatch(val type: MergedType<*>, val javaType: JavaType, val reference: ScanDictionary.Reference) : Match internal enum class Location(val prettyName: String) { RETURN_TYPE("return type"), diff --git a/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt b/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt index 679cfbe5..7cb155e0 100644 --- a/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt +++ b/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt @@ -1,24 +1,23 @@ package graphql.kickstart.tools import graphql.kickstart.tools.util.describe -import graphql.kickstart.tools.util.unwrap -import graphql.language.* +import graphql.language.TypeName import graphql.schema.GraphQLInputType import kotlin.reflect.KClass internal class TypeReferenceErrors( - private val definitions: Set>, - private val unusedDefinitions: Set>, - private val typeExtensions: TypeExtensions, + private val definitions: MergedDefinitions, + private val types: Set>, + private val unusedTypes: Set>, ) { fun unexpectedTypeError(typeName: TypeName, expectedType: KClass<*>): SchemaError { val isInput = expectedType == GraphQLInputType::class - val definition = unusedDefinitions.find { it.name == typeName.name } - ?: definitions.filterIsInstance>().find { it.name == typeName.name } + val definition = unusedTypes.find { it.name == typeName.name } + ?: types.find { it.name == typeName.name } val outputOnlyKind = when (definition) { - is ObjectTypeDefinition -> "an object type" - is InterfaceTypeDefinition -> "an interface" - is UnionTypeDefinition -> "a union" + is MergedType.Object -> "an object type" + is MergedType.Interface -> "an interface" + is MergedType.Union -> "a union" else -> null } @@ -26,44 +25,28 @@ internal class TypeReferenceErrors( definition == null -> "is not defined in the schema." isInput && outputOnlyKind != null -> "is $outputOnlyKind, which can't be used as an input type. Input types are input objects, enums and scalars." - !isInput && definition is InputObjectTypeDefinition -> + !isInput && definition is MergedType.Input -> "is an input object type, which can't be used as an output type. Output types are object types, interfaces, unions, enums and scalars." - definition in unusedDefinitions -> + definition in unusedTypes -> "is defined in the schema, but was not reached while scanning the resolvers and the classes they use, so it wasn't built. " + unreachedTypeHint(definition) else -> "can't be used as ${if (isInput) "an input" else "an output"} type." } - val usage = findUsage(typeName)?.let { " used by $it" }.orEmpty() + val usage = definitions.findUsage(typeName, types)?.let { " used by $it" }.orEmpty() return SchemaError("Type '${typeName.name}'$usage${typeName.sourceLocation.describe()} $problem") } // what makes the scanner reach the type depends on its kind, see SchemaClassScanner.canIncludeUnusedType - private fun unreachedTypeHint(definition: TypeDefinition<*>): String = when (definition) { - is InterfaceTypeDefinition, is UnionTypeDefinition -> + private fun unreachedTypeHint(definition: MergedType<*>): String = when (definition) { + is MergedType.Interface, is MergedType.Union -> "Return it from a resolver method or one of those classes, or set SchemaParserOptions.includeUnusedTypes." - is EnumTypeDefinition -> + is MergedType.Enum -> "Use it in a resolver method or one of those classes, or set SchemaParserOptions.includeUnusedTypes and pass its enum class in the parser's dictionary." - is InputObjectTypeDefinition -> + is MergedType.Input -> "Use it in an argument of a resolver method, directly or through another input type. SchemaParserOptions.includeUnusedTypes doesn't include input types." - is ScalarTypeDefinition -> + is MergedType.Scalar -> "Use it in a resolver method or one of those classes. SchemaParserOptions.includeUnusedTypes doesn't include scalars." - else -> + is MergedType.Object -> "Return it from a resolver method or one of those classes, or set SchemaParserOptions.includeUnusedTypes and pass a class for it in the parser's dictionary." } - - // determineType only gets the type reference, so the definition using it is looked up for the error message - private fun findUsage(typeName: TypeName): String? = (definitions + typeExtensions.values.flatten()).asSequence().flatMap { definition -> - when (definition) { - is ObjectTypeDefinition -> fieldUsages(definition.name, definition.fieldDefinitions) - is InterfaceTypeDefinition -> fieldUsages(definition.name, definition.fieldDefinitions) - is InputObjectTypeDefinition -> definition.inputValueDefinitions.map { "input field '${definition.name}.${it.name}'" to it.type } - is DirectiveDefinition -> definition.inputValueDefinitions.map { "argument '${it.name}' of directive '@${definition.name}'" to it.type } - else -> emptyList() - } - }.find { (_, type) -> type.unwrap() === typeName }?.first - - private fun fieldUsages(typeName: String, fields: List): List>> = fields.flatMap { field -> - listOf("field '$typeName.${field.name}'" to field.type) + - field.inputValueDefinitions.map { "argument '${it.name}' of field '$typeName.${field.name}'" to it.type } - } } diff --git a/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt b/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt index 5c8c98fb..14c156ed 100644 --- a/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt +++ b/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt @@ -2,7 +2,6 @@ package graphql.kickstart.tools.util import graphql.kickstart.tools.GraphQLResolver import graphql.kickstart.tools.SchemaParserOptions -import graphql.kickstart.tools.TypeExtensions import graphql.language.* import graphql.schema.DataFetchingEnvironment import graphql.schema.idl.TypeUtil @@ -28,13 +27,6 @@ internal typealias GraphQLLangType = Type<*> internal fun Type<*>.unwrap(): TypeName = TypeUtil.unwrapAll(this) -internal inline fun > TypeExtensions.extensionsOf(name: String): List = - this[name].orEmpty().filterIsInstance() - -// Every extension class is a subclass of its type's class, e.g. UnionTypeExtensionDefinition of UnionTypeDefinition. -internal inline fun > T.withExtensions(typeExtensions: TypeExtensions): List = - listOf(this) + typeExtensions.extensionsOf(name) - internal fun JavaType.unwrap(): Class = if (this is ParameterizedType) { this.rawType as Class<*> diff --git a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt index d289a380..673542da 100644 --- a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt @@ -229,7 +229,7 @@ class NestedGenericWrapperTest { fun `resolves every return type the matcher accepts`() { val options = SchemaParserOptions.newOptions().genericWrappers(tryWrapper, pageWrapper).build() val typeResolver = GenericTypeResolver(Query::class.java, options) - val matcher = TypeClassMatcher(mapOf("Payload" to ObjectTypeDefinition("Payload"), "Leaf" to ScalarTypeDefinition("Leaf"))) + val matcher = TypeClassMatcher(MergedDefinitions(listOf(ObjectTypeDefinition("Payload"), ScalarTypeDefinition("Leaf")))) val method = Query::class.java.getMethod("listOfWrapped") val graphQLTypes = listOf(TypeName("Payload"), TypeName("Leaf")).flatMap { listOf(it, NonNullType(it), ListType(it), NonNullType(ListType(NonNullType(it))), ListType(ListType(it))) } val containers = listOf(List::class.java, CompletableFuture::class.java, Try::class.java, Page::class.java, DataFetcherResult::class.java, Optional::class.java, Future::class.java) @@ -273,7 +273,7 @@ class NestedGenericWrapperTest { @Test fun `rejects a DataFetcherResult or an Optional twice in one value`() { val typeResolver = GenericTypeResolver(Query::class.java, SchemaParserOptions.newOptions().build()) - val matcher = TypeClassMatcher(mapOf("Payload" to ObjectTypeDefinition("Payload"))) + val matcher = TypeClassMatcher(MergedDefinitions(listOf(ObjectTypeDefinition("Payload")))) val method = Query::class.java.getMethod("listOfWrapped") val result = DataFetcherResult::class.java val optional = Optional::class.java diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt index 06868a81..c8ce6299 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt @@ -28,13 +28,11 @@ class TypeClassMatcherTest { private val customType: Type<*> = TypeName("CustomType") private val unwrappedCustomType: Type<*> = TypeName("UnwrappedGenericCustomType") - private val customDefinition: TypeDefinition<*> = ObjectTypeDefinition("CustomType") - private val unwrappedCustomDefinition: TypeDefinition<*> = ObjectTypeDefinition("UnwrappedGenericCustomType") + private val definitions = MergedDefinitions(listOf(ObjectTypeDefinition("CustomType"), ObjectTypeDefinition("UnwrappedGenericCustomType"))) + private val customDefinition: MergedType<*> = definitions.byName.getValue("CustomType") + private val unwrappedCustomDefinition: MergedType<*> = definitions.byName.getValue("UnwrappedGenericCustomType") - private val matcher: TypeClassMatcher = TypeClassMatcher(mapOf( - "CustomType" to customDefinition, - "UnwrappedGenericCustomType" to unwrappedCustomDefinition - )) + private val matcher: TypeClassMatcher = TypeClassMatcher(definitions) private val options: SchemaParserOptions = SchemaParserOptions.newOptions().genericWrappers( GenericWrapper( From 1014255d337be4787d08a517553f66802b811be3 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:37:31 -0500 Subject: [PATCH 36/64] Fail the build when code reads an SDL type outside MergedDefinitions.kt Kotlin's internal is module-wide, so DefinitionsBoundaryTest checks the compiled classes with ArchUnit. Outside MergedDefinitions.kt no code may read the fields, interfaces, members, values, input fields or directives of a type definition, see a type extension class, or start a named-type builder. Only the directive wiring may transform a built type. TypeDefinitionFactory implementations such as the Relay factory get raw definitions by contract and stay allowed. Each violation names the method, the line and the MergedType member to use instead. It catches import aliases, qualified names, property syntax, Java files, generic receivers, with blocks, callable references, imported nested builders and typealiases. Reflection and getNamedChildren still get through. logback-test.xml keeps ArchUnit's class import at INFO. Co-Authored-By: Claude --- pom.xml | 10 ++ .../tools/DefinitionsBoundaryTest.kt | 108 ++++++++++++++++++ src/test/resources/logback-test.xml | 13 +++ 3 files changed, 131 insertions(+) create mode 100644 src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt create mode 100644 src/test/resources/logback-test.xml diff --git a/pom.xml b/pom.xml index 65cf1627..aacfbcd5 100644 --- a/pom.xml +++ b/pom.xml @@ -85,6 +85,11 @@ + + com.tngtech.archunit + archunit + 1.5.1 + ch.qos.logback logback-classic @@ -181,6 +186,11 @@ + + com.tngtech.archunit + archunit + test + ch.qos.logback logback-classic diff --git a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt new file mode 100644 index 00000000..4fbfa78a --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt @@ -0,0 +1,108 @@ +package graphql.kickstart.tools + +import com.tngtech.archunit.base.DescribedPredicate +import com.tngtech.archunit.core.domain.JavaAccess +import com.tngtech.archunit.core.domain.JavaClass +import com.tngtech.archunit.core.domain.JavaClasses +import com.tngtech.archunit.core.domain.JavaConstructorCall +import com.tngtech.archunit.core.domain.JavaConstructorReference +import com.tngtech.archunit.core.importer.ClassFileImporter +import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses +import graphql.language.TypeDefinition +import org.junit.Test +import java.nio.file.Paths + +/** + * Kotlin's internal is module-wide, so these rules keep the SDL type definitions and the named-type builders inside + * MergedDefinitions.kt. They read the compiled classes, so aliases, wildcard imports, Java files and lambdas count too. + */ +class DefinitionsBoundaryTest { + + companion object { + private val classes: JavaClasses = ClassFileImporter() + .importPath(Paths.get(MergedDefinitions::class.java.protectionDomain.codeSource.location.toURI())) + } + + private fun declaredOutside(vararg files: String) = object : DescribedPredicate("are declared outside ${files.joinToString()}") { + override fun test(javaClass: JavaClass) = javaClass.source.flatMap { it.fileName }.orElse("") !in files + } + + // a factory gets and returns raw definitions by contract, and the scanner only sees its output merged + private val typeDefinitionFactory = object : DescribedPredicate("implement TypeDefinitionFactory") { + override fun test(javaClass: JavaClass) = javaClass.isAssignableTo(TypeDefinitionFactory::class.java) + } + + private val mergedMembers = setOf( + "getFieldDefinitions", "getImplements", "getMemberTypes", "getEnumValueDefinitions", "getInputValueDefinitions", + "getDirectives", "getDirectivesByName", "hasDirective", + ) + + private val readsTypeMembers = object : DescribedPredicate>("reads the members or directives of an SDL type definition") { + override fun test(access: JavaAccess<*>) = + access.target.name in mergedMembers && access.target.owner.isAssignableTo(TypeDefinition::class.java) + } + + private val extensionClass = object : DescribedPredicate("are graphql-java type extension definitions") { + override fun test(javaClass: JavaClass) = + javaClass.packageName == "graphql.language" && + javaClass.simpleName.endsWith("ExtensionDefinition") && + javaClass.simpleName != "SchemaExtensionDefinition" + } + + private val namedTypes = setOf( + "graphql.schema.GraphQLObjectType", "graphql.schema.GraphQLInterfaceType", "graphql.schema.GraphQLUnionType", + "graphql.schema.GraphQLEnumType", "graphql.schema.GraphQLInputObjectType", "graphql.schema.GraphQLScalarType", + ) + private val builderFactories = setOf("newObject", "newInterface", "newUnionType", "newEnum", "newInputObject", "newScalar") + + private val startsNamedTypeBuilder = object : DescribedPredicate>("starts a builder for a graphql-java named type") { + override fun test(access: JavaAccess<*>): Boolean { + val owner = access.target.owner.name + val isFactory = access.target.name in builderFactories && owner in namedTypes + val isConstructor = (access is JavaConstructorCall || access is JavaConstructorReference) && + owner.substringBefore('$') in namedTypes && owner.endsWith("\$Builder") + return isFactory || isConstructor + } + } + + private val transformsNamedType = object : DescribedPredicate>("transforms a graphql-java named type") { + override fun test(access: JavaAccess<*>) = access.target.name == "transform" && access.target.owner.name in namedTypes + } + + @Test + fun `imports the compiled main classes`() { + assert(classes.size > 100) { "expected the compiled main classes, found ${classes.size}" } + } + + @Test + fun `only the merged definitions read the members and directives of SDL types`() { + noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(typeDefinitionFactory)) + .should().accessTargetWhere(readsTypeMembers) + .because("each type is merged with its extensions once in MergedDefinitions.kt. Take a MergedType and read MergedType.fields, interfaces, members or values, and let MergedType.prepare apply the directives") + .check(classes) + } + + @Test + fun `only the merged definitions see type extension classes`() { + noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(typeDefinitionFactory)) + .should().dependOnClassesThat(extensionClass) + .because("each type is merged with its extensions once in MergedDefinitions.kt. Take a MergedType instead of matching extension definitions") + .check(classes) + } + + @Test + fun `only the merged definitions start named-type builders`() { + noClasses().that(declaredOutside("MergedDefinitions.kt")) + .should().accessTargetWhere(startsNamedTypeBuilder) + .because("every named type starts from MergedType.prepare, which checks repeats and sets the name, definitions, description and directives") + .check(classes) + } + + @Test + fun `only the directive wiring transforms built named types`() { + noClasses().that(declaredOutside("MergedDefinitions.kt", "DirectiveWiringHelper.kt")) + .should().accessTargetWhere(transformsNamedType) + .because("transform copies a type that's already built. Start a new type from MergedType.prepare") + .check(classes) + } +} diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 00000000..dc6c51c2 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,13 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%kvp- %msg%n + + + + + + + + + From b1ee5fe688a5f7fa29126e887ce5918b8ed0be68 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:40:09 -0500 Subject: [PATCH 37/64] Check the shared type recipe on every kind of type TypeKindRecipeTest builds one type of each kind with a description, a directive on the definition and one on its extension, and checks the built description, definition, extension definitions and applied directives. It also checks that each kind with members rejects a member its extension repeats, with the exact error and source location. Its first test compares its cases with the leaves of MergedType, so a new kind without a case fails, after the compiler has already asked for it in every exhaustive when. Co-Authored-By: Claude --- .../kickstart/tools/TypeKindRecipeTest.kt | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt new file mode 100644 index 00000000..93ef6c97 --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt @@ -0,0 +1,136 @@ +package graphql.kickstart.tools + +import graphql.Scalars +import graphql.language.Node +import graphql.schema.* +import org.junit.Assert.assertThrows +import org.junit.Test +import kotlin.reflect.KClass + +/** + * Checks each step of MergedType.prepare on every kind of type, so a step that one kind skips fails here. + */ +class TypeKindRecipeTest { + + private val kinds: Map>, Kind> = mapOf( + MergedType.Object::class to Kind("Item", "ObjectTypeDefinition", Repeat("extend type Item { id: ID! }", "field", "id")), + MergedType.Interface::class to Kind("Node", "InterfaceTypeDefinition", Repeat("extend interface Node { id: ID! }", "field", "id")), + MergedType.Union::class to Kind("Result", "UnionTypeDefinition", Repeat("extend union Result = Item", "member", "Item")), + MergedType.Enum::class to Kind("Color", "EnumTypeDefinition", Repeat("extend enum Color { RED }", "value", "RED")), + MergedType.Input::class to Kind("Filter", "InputObjectTypeDefinition", Repeat("extend input Filter { id: ID }", "field", "id")), + MergedType.Scalar::class to Kind("Date", "ScalarTypeDefinition", repeat = null), + ) + + @Test + fun `every kind of type has a case`() { + fun leaves(kind: KClass>): List>> = + if (kind.isSealed) kind.sealedSubclasses.flatMap(::leaves) else listOf(kind) + + assertEquals(kinds.keys, leaves(MergedType::class).toSet()) + } + + @Test + fun `every kind of type gets the description, definitions and directives of its definition and extension`() { + val schema = parser(sdl).makeExecutableSchema().assertEveryFieldResolves() + + val built = kinds.values.map { kind -> + val type = schema.getType(kind.name) as GraphQLDirectiveContainer + listOf(type.description, type.definition?.javaClass?.simpleName, (type as GraphQLNamedType).extensionDefinitions().size, type.appliedDirectives.map { it.name }) + } + assertEquals(built, kinds.values.map { kind -> + listOf("${kind.name} description", kind.definitionClass, 1, listOf("a", "b")) + }) + } + + @Test + fun `every kind of type with members rejects a member that its extension repeats`() { + val repeating = kinds.values.filter { it.repeat != null } + val errors = repeating.map { kind -> + assertThrows(SchemaError::class.java) { parser(sdl + kind.repeat!!.extension).makeExecutableSchema() }.message + } + + // the extension is appended as the last line of the schema + assertEquals(errors, repeating.map { kind -> + val repeat = kind.repeat!! + val column = repeat.extension.indexOf(repeat.member, repeat.extension.indexOf(kind.name) + kind.name.length) + 1 + "Type '${kind.name}' declares ${repeat.noun} '${repeat.member}' more than once at line ${sdl.lines().size}, column $column." + }) + } + + private class Kind(val name: String, val definitionClass: String, val repeat: Repeat?) + + private class Repeat(val extension: String, val noun: String, val member: String) + + private val sdl = """ + |directive @a on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + |directive @b on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + | + |type Query { node: Node result: Result color: Color search(filter: Filter): String today: Date } + | + |"Item description" + |type Item implements Node @a { id: ID! } + |extend type Item @b { name: String } + |type Other { id: ID! } + | + |"Node description" + |interface Node @a { id: ID! } + |extend interface Node @b { name: String } + | + |"Result description" + |union Result @a = Item + |extend union Result @b = Other + | + |"Color description" + |enum Color @a { RED } + |extend enum Color @b { GREEN } + | + |"Filter description" + |input Filter @a { id: ID } + |extend input Filter @b { limit: Int } + | + |"Date description" + |scalar Date @a + |extend scalar Date @b + |""".trimMargin() + + private val date = GraphQLScalarType.newScalar().name("Date").description("provided").coercing(Scalars.GraphQLString.coercing).build() + + private fun parser(schema: String) = SchemaParser.newParser() + .schemaString(schema) + .resolvers(Query()) + .dictionary(Item::class, Other::class) + .scalars(date) + .build() + + private fun GraphQLNamedType.extensionDefinitions(): List> = when (this) { + is GraphQLObjectType -> extensionDefinitions + is GraphQLInterfaceType -> extensionDefinitions + is GraphQLUnionType -> extensionDefinitions + is GraphQLEnumType -> extensionDefinitions + is GraphQLInputObjectType -> extensionDefinitions + is GraphQLScalarType -> extensionDefinitions + else -> error("not a named type with extensions: $name") + } + + class Query : GraphQLQueryResolver { + fun node(): Entity = Item("1", "item") + fun result(): Outcome = Other("2") + fun color() = Color.GREEN + fun search(filter: Filter) = "${filter.id} ${filter.limit}" + fun today() = "2026-11-04" + } + + interface Entity { + val id: String + } + + interface Outcome + + class Item(override val id: String, val name: String?) : Entity, Outcome + + class Other(val id: String) : Outcome + + enum class Color { RED, GREEN } + + class Filter(val id: String?, val limit: Int?) +} From 48b5d507c85e9d101f242c9c923674620792fcf3 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:40:23 -0500 Subject: [PATCH 38/64] Name what enforces the merged-definitions rules in the rule table Co-Authored-By: Claude --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index f68d6de1..00cf1a57 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -83,7 +83,8 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | docs only | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | | One output has one builder. Don't add a second path that builds the same thing | docs only | -| Read an SDL type's members merged with its extensions, never from the raw definition | docs only | +| Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest` | +| Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | | Reuse an existing structure before you add a parallel one | docs only | | Argument conversion goes through one entry point | docs only | | An input field's Java type comes from the mapping Jackson uses, not from guessed getters | docs only | From a3125bf8af31b4f928859051c952f9a74de5452b Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:40:47 -0500 Subject: [PATCH 39/64] Say what the union declaration text is Co-Authored-By: Claude --- src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt index 19d6ce9d..1e28d443 100644 --- a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt +++ b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt @@ -208,7 +208,7 @@ internal sealed class MergedType GraphQLUnionType.newUnionType().definition(definition).extensionDefinitions(extensions) /** - * The definition or extension that lists [member], as the SDL prints it. + * The toString of the definition or extension that lists [member]. */ fun declarationOf(member: Type<*>): String = (listOf(definition) + extensions).first { declaration -> declaration.memberTypes.any { it === member } }.toString() From 98846412f3872236cd918cdee8cfee02f592151c Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:43:05 -0500 Subject: [PATCH 40/64] Keep logback's default console pattern in tests Co-Authored-By: Claude --- src/test/resources/logback-test.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml index dc6c51c2..75ea21c4 100644 --- a/src/test/resources/logback-test.xml +++ b/src/test/resources/logback-test.xml @@ -1,7 +1,7 @@ - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%kvp- %msg%n + %d{HH:mm:ss.SSS} [%thread] %level %logger -%kvp- %msg%n From 428bd5c84cefdee5bdc00e294d5f949992fcb260 Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:52:56 -0500 Subject: [PATCH 41/64] Refuse branch captures and re: lines that accept a whole corpus A capture taken at a -SNAPSHOT version records the branch, so the next run passes against its own breaks. Capturing now fails there, and the test fails while a capture exists for a version the pom says isn't released yet. A re: line in accepted.txt may match at most 20 cases, all in one scenario, so re:.* can't accept every break silently. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 +- .../kickstart/tools/compat/CompatTest.kt | 52 +++++++++++++++---- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3eabc4fd..7644763d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,7 +55,9 @@ After the release is published, record what it builds, so `CompatTest` checks la release tag in a worktree, run `mvn -B -ntp clean test -Dtest=CompatTest -Dcompat.capture`, and open a PR with the `src/test/resources/compat//` it writes: `cases.tsv` and an empty `accepted.txt`. A later break that the release notes list goes into that `accepted.txt` as one line: the case as `CompatTest` lists it, a tab, and why, naming the issue -(`#N`) or the release notes (`X.Y.Z release notes`). Start the case with `re:` to give a regex instead. A line that matches +(`#N`) or the release notes (`X.Y.Z release notes`). Start the case with `re:` to give a regex instead, matching at most 20 +cases, all in one scenario. Capturing fails at a `-SNAPSHOT` version, and so does the test while a capture exists for a version +the pom says isn't released yet, because a capture made on a branch hides the branch's breaks. A line that matches no failing case fails the test. So does a case that built on the release and isn't generated any more, because a scenario was renamed, removed or edited. Then capture the release again as the failure says, or list the case. diff --git a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt index 4636b741..6da48d4e 100644 --- a/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/compat/CompatTest.kt @@ -18,21 +18,32 @@ class CompatTest { if (SCENARIOS.isEmpty()) return fail("No scenarios in ${Scenario::class.java.packageName}, so nothing is checked.") val variants = SCENARIOS.flatMap(::variants) val outcomes = runAll(variants) - val version = pomVersion() + val pom = PomVersion.read() + val version = pom.version if (System.getProperty("compat.capture") != null) { + if (!pom.isRelease) return fail( + "pom.xml is at ${pom.text}, so a capture would record this branch instead of a release. Captures are taken from " + + "the release tag, as AGENTS.md describes under Releases. To capture a release again with the scenarios you have, " + + "run `git checkout vX.Y.Z -- pom.xml src/main` first and `git checkout HEAD -- pom.xml src/main` after." + ) val dir = File(CAPTURES, version.toString()).apply { mkdirs() } write(File(dir, "cases.tsv"), outcomes) File(dir, "accepted.txt").takeUnless { it.exists() }?.writeText("") return } - val (release, dir) = CAPTURES.listFiles().orEmpty().mapNotNull { file -> parseVersion(file.name)?.let { it to file } } - .filter { it.first <= version }.maxByOrNull { it.first } - ?: return fail("No capture in $CAPTURES at or below $version. Capture the last release as AGENTS.md describes under Releases.") + val captures = CAPTURES.listFiles().orEmpty().mapNotNull { file -> parseVersion(file.name)?.let { it to file } } + val unreleased = captures.filterNot { pom.couldBeReleased(it.first) } + if (unreleased.isNotEmpty()) return fail( + "${unreleased.joinToString { it.second.path }} can't hold a release, because pom.xml is at ${pom.text}. A capture made " + + "on a branch records the branch, so it hides any break. Delete it. Captures are taken from the release tag, as " + + "AGENTS.md describes under Releases." + ) + val (release, dir) = captures.maxByOrNull { it.first } + ?: return fail("No capture in $CAPTURES. Capture the last release as AGENTS.md describes under Releases.") val released = read(File(dir, "cases.tsv")) if (released.isEmpty()) return fail("$dir/cases.tsv is empty, so nothing is checked. Capture $release as AGENTS.md describes under Releases.") val acceptedFile = File(dir, "accepted.txt") - val accepted = readAccepted(acceptedFile) val major = version.major > release.major val warnMustNameOneOfEach = variants.associate { it.key to it.warnMustNameOneOfEach } @@ -44,9 +55,10 @@ class CompatTest { if (names.isEmpty()) return quotedNamesOrWholeMessage(outcomes.getValue(key).error!!).all { name -> ownWarnings.any { it.names(name) } } return ownWarnings.any { warning -> names.all { alternatives -> alternatives.any(warning::names) } } } + val protected = released.keys.filter(::builtWithItsSeedOnRelease) + val accepted = readAccepted(acceptedFile, protected) fun isAccepted(key: CaseKey) = accepted.any { it.matches(key) } - val protected = released.keys.filter(::builtWithItsSeedOnRelease) val missing = protected.filterNot(outcomes::containsKey) val broken = protected.filter { outcomes[it]?.built == false }.filterNot(::repeatsSeedBreak) val stale = accepted.filter { entry -> (missing + broken).none(entry::matches) } @@ -101,9 +113,13 @@ private class Accepted(val line: Int, val case: String) { private val CAPTURES = File("src/test/resources/compat") private const val SHOWN = 50 private const val PATTERN = "re:" + +// Fits one operator on one directive or type in one scenario. 14.3.0 applying directives on type extensions, the widest +// deliberate break so far, needs at most 15 per line that way. +private const val MAX_PER_PATTERN = 20 private val REFERENCE = Regex("#\\d+|\\d+\\.\\d+\\.\\d+ release notes") -private fun readAccepted(file: File): List { +private fun readAccepted(file: File, protected: List): List { val problems = mutableListOf() val accepted = file.readLines().withIndex().filter { it.value.isNotBlank() }.mapNotNull { (index, text) -> val case = text.substringBefore('\t') @@ -111,6 +127,13 @@ private fun readAccepted(file: File): List { val problem = when { !REFERENCE.containsMatchIn(reason) -> "needs a tab and a reason that names an issue (#N) or the release notes (\"X.Y.Z release notes\")" case.startsWith(PATTERN) && runCatching { Regex(case.removePrefix(PATTERN)) }.isFailure -> "starts with $PATTERN but isn't a valid regex" + case.startsWith(PATTERN) -> Accepted(index + 1, case).let { entry -> + val matched = protected.filter(entry::matches) + val scenarios = matched.map { it.scenario }.distinct() + if (scenarios.size <= 1 && matched.size <= MAX_PER_PATTERN) null + else "accepts ${matched.size} cases in ${scenarios.size} scenarios, and a $PATTERN line may accept at most " + + "$MAX_PER_PATTERN, all in one scenario. List the cases, one per line, or one $PATTERN line per scenario" + } else -> null } problem?.let { problems += " line ${index + 1} $it: $text" } @@ -178,10 +201,17 @@ private fun read(file: File): Map = file.readLines().filter { CaseKey(cells[0], cells[1], cells[2]) to Outcome(cells[3].takeUnless { it == "BUILT" }, cells.drop(4)) } -private fun pomVersion(): KotlinVersion { - val pom = File("pom.xml").readText() - val version = Regex("graphql-java-tools\\s*([^<]+)").find(pom)!!.groupValues[1] - return parseVersion(version.substringBefore('-'))!! +private class PomVersion(val text: String) { + val version = parseVersion(text.substringBefore('-'))!! + val isRelease = '-' !in text + + fun couldBeReleased(capture: KotlinVersion) = if (isRelease) capture <= version else capture < version + + companion object { + fun read() = PomVersion( + Regex("graphql-java-tools\\s*([^<]+)").find(File("pom.xml").readText())!!.groupValues[1] + ) + } } private fun parseVersion(text: String): KotlinVersion? = From b70f073bea9e19483e2716b702189e2720dd826e Mon Sep 17 00:00:00 2001 From: Oryan Date: Wed, 4 Nov 2026 19:55:16 -0500 Subject: [PATCH 42/64] Make each known finding match exactly the return types that fail Each known-findings line now records how many accepted return types it matches. The check fails as STALE when a matched return type passes or the line matches fewer, and as NEW when it matches more, naming what it can. The DataFetcherResult line now matches only the 18 Optional shapes that fail, not the 36 list shapes graphql-java reads itself. Rename two ResolverCompatibilityTest tests whose names overstated what they assert. --- .../verify-return-value-unwrapping/SKILL.md | 34 +++-- .../verify-return-value-unwrapping/check.sh | 2 +- AGENTS.md | 2 +- .../tools/ResolverCompatibilityTest.kt | 4 +- src/test/resources/returnvalue/Check.java | 130 +++++++++++++----- .../resources/returnvalue/known-findings.txt | 10 +- 6 files changed, 125 insertions(+), 57 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index 0b09844a..6030c798 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -72,13 +72,14 @@ as `-Dunwrapping.args`, and prints the report. On a failure it also prints the p | Exit | Meaning | |---|---| | 0 | `PASS`, or `PASS apart from the known findings above` | -| 1 | `FAIL`: a return type that isn't a known finding breaks the property | +| 1 | `FAIL`: a return type that isn't a known finding breaks the property. `NEW`: a known finding matches more accepted return types than its line records | | 2 | `MODEL ERROR`: the checkout or the check didn't compile, or the build rejected a return type the check must exercise, so a pass would prove nothing | -| 3 | `STALE`: a known finding no longer fails. Delete its line from `known-findings.txt` | +| 3 | `STALE`: a known finding matches a return type that no longer fails, or fewer accepted return types than its line records | -Options: `--depth N`, `--budget N`, `--property-budget N`, `--show N` (counterexamples printed, default 15), and `--rejected`, which lists +Options: `--depth N`, `--budget N`, `--property-budget N`, `--show N` (counterexamples and stale return types printed, default 15), and `--rejected`, which lists every combination the schema build rejected, with the build's error. A depth below 3 can't build the `mustAccept` -return types, so it ends in `MODEL ERROR`. +return types, so it ends in `MODEL ERROR`. `NEW` and `STALE` apply only at the default depth and budgets, because the +counts in `known-findings.txt` are for those. ## Reading a counterexample @@ -115,25 +116,30 @@ A real bug versus a modeling error: ## Known findings `src/test/resources/returnvalue/known-findings.txt` lists the return types that break the property at the sync commit, one per line as -` # `. The regex is matched against the kind and the short return type, such as +` # `. The regex is matched against the kind and the short return type, such as `property List>`, so a pattern without a kind covers all three. The first matching line wins. -Matching return types still print as `KNOWN` with a counterexample on every run, and the check passes apart from them. A -new break inside a known pattern is hidden, so after a change to the code a known finding covers, read its -counterexample. +Matching return types still print as `KNOWN` with a counterexample on every run, and the check passes apart from them. + +Each line must match only return types that fail, and exactly `` of the return types the build accepts. A +matched return type that passes makes the check `STALE` and names it, so a partial fix has to narrow the line, and a later +regression in a fixed return type is a `FAIL`. A count that grows makes it `NEW`, because a return type the build used to +reject now fails under the line. What stays hidden is a known return type that starts failing in a different way, so +after a change to the code a known finding covers, read its counterexample. At the sync commit, methods have none. Properties and Maps hand their value to graphql-java as it is. graphql-java awaits -only a top-level `CompletionStage`, reads a `DataFetcherResult` only at the top or inside that future, and unboxes any -`Optional`. So every nested future, -every generic wrapper, every `DataFetcherResult` graphql-java can't reach, and a `FutureTask` behind a declared `Future` -fail for them. The five lines cover exactly those 2,850 return types. A String field gets the container's `toString`, such -as `CompletableFuture@5a7cb161[Completed normally]`, with no error. +only a top-level `CompletionStage`, reads a `DataFetcherResult` at the top, inside that future and as a list element, and +unboxes any `Optional`, but not a `DataFetcherResult` inside one. So every nested future, every generic wrapper, a +`DataFetcherResult` inside an `Optional`, and a `FutureTask` behind a declared `Future` fail for them. The five lines +match exactly those 2,850 return types, and their counts add up to it. A String field gets the container's `toString`, +such as `CompletableFuture@5a7cb161[Completed normally]`, with no error. The check found two method bugs when it was written, and both are fixed. One was a `DataFetcherResult` inside an `Optional` (#939). The other was a wrapper whose transformer returns a future, directly around a declared future (#938). A `withTransformer` registration keeps that #938 behavior, which is why `Later` is registered through `withCompletionStageTransformer`. -When a fix lands, the check exits 3. Delete the line then, so that a regression shows up as `FAIL`. +When a fix lands, the check exits 3 and names the return types that pass. Narrow the line to the rest and set its count, +or delete it when none fail, so that a regression shows up as `FAIL`. ## What this does not cover diff --git a/.claude/skills/verify-return-value-unwrapping/check.sh b/.claude/skills/verify-return-value-unwrapping/check.sh index 6f57e1b0..144ad2a3 100755 --- a/.claude/skills/verify-return-value-unwrapping/check.sh +++ b/.claude/skills/verify-return-value-unwrapping/check.sh @@ -15,7 +15,7 @@ fi sed -n '/AssertionError: /,/^\tat /p' "$log" | sed -e '1s/.*AssertionError: //' -e '$d' echo "Maven log: $log" -grep -q '^FAIL:' "$log" && exit 1 +grep -q -E '^(FAIL|NEW):' "$log" && exit 1 grep -q 'MODEL ERROR:' "$log" && exit 2 grep -q '^STALE:' "$log" && exit 3 tail -40 "$log" diff --git a/AGENTS.md b/AGENTS.md index f3a5b433..4899091f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -82,7 +82,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin |---|---| | A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | docs only | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | -| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists today's property and Map gaps as known findings, and fails once one is fixed until it's deleted | +| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists exactly today's property and Map gaps as known findings, and fails when one is fixed until it's removed, or when a new failure would hide under one | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | docs only | | Reuse an existing structure before you add a parallel one | docs only | diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt index a5434df7..40b0d1d4 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt @@ -24,7 +24,7 @@ import java.util.concurrent.FutureTask class ResolverCompatibilityTest { @Test - fun `property and Map fields return what a method returns, apart from the known findings`() { + fun `@JvmField and typed Map fields return what a method returns apart from the known findings, and untyped Map fields hand graphql-java the value as it is`() { val wrong = Kind.entries.flatMap { kind -> shapes.mapNotNull { shape -> val got = holderField(kind, shape) @@ -97,7 +97,7 @@ class ResolverCompatibilityTest { } @Test - fun `omitted arguments reach primitive parameters as their default and type variables as their bound class`() { + fun `omitted arguments reach primitive parameters as their default, and a type variable parameter gets a value of its resolved type argument`() { val result = execute( "type Query { primitives(i: Int, b: Boolean, d: Float, boxed: Int): String echo(value: Int!): String }", "{ primitives echo(value: 3) }", diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java index b7d9a5bd..fa7ede26 100644 --- a/src/test/resources/returnvalue/Check.java +++ b/src/test/resources/returnvalue/Check.java @@ -51,6 +51,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; +import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -261,6 +262,23 @@ static final class Violation { } } + static final class KnownFinding { + final int returnTypes; + final Pattern pattern; + final String description; + final Set covered = new LinkedHashSet<>(); + + KnownFinding(int returnTypes, Pattern pattern, String description) { + this.returnTypes = returnTypes; + this.pattern = pattern; + this.description = description; + } + } + + private static final int DEPTH = 3; + private static final int BUDGET = 2; + private static final int PROPERTY_BUDGET = 1; + private static final String KNOWN_FILE = "src/test/resources/returnvalue/known-findings.txt"; private static final String BLOCKED = "the data fetcher blocked until they completed"; private static volatile Object oracleValue; @@ -288,9 +306,10 @@ static final class Violation { ); public static boolean check(String[] args, String classpath, PrintStream out) throws Exception { - int depth = intArg(args, "--depth", 3); - int budget = intArg(args, "--budget", 2); - int propertyBudget = intArg(args, "--property-budget", 1); + int depth = intArg(args, "--depth", DEPTH); + int budget = intArg(args, "--budget", BUDGET); + int propertyBudget = intArg(args, "--property-budget", PROPERTY_BUDGET); + int show = intArg(args, "--show", 15); long started = System.nanoTime(); List cases = cases(depth); @@ -300,6 +319,7 @@ public static boolean check(String[] args, String classpath, PrintStream out) th int runs = 0; boolean blocked = false; Set accepted = new LinkedHashSet<>(); + Set acceptedReturnTypes = new LinkedHashSet<>(); Map> violations = new LinkedHashMap<>(); for (Case testCase : cases) { Class generated = resolvers.get(testCase.className); @@ -315,6 +335,7 @@ public static boolean check(String[] args, String classpath, PrintStream out) th continue; } accepted.add(testCase.kind.label + " " + testCase.javaType() + " " + testCase.graphQLType()); + acceptedReturnTypes.add(testCase.label()); GraphQL actual = GraphQL.newGraphQL(schema).build(); GraphQL oracle = GraphQL.newGraphQL(oracleSchema(schema, testCase.parentType())).build(); Consumer returning = returning(testCase, generated, instance); @@ -347,55 +368,96 @@ public static boolean check(String[] args, String classpath, PrintStream out) th out.println("A data fetcher blocked on a pending future, so later return types ran with completed futures only."); } - Map known = knownFindings(stringArg(args, "--known")); - Map> knownFailing = new LinkedHashMap<>(); - known.keySet().forEach(pattern -> knownFailing.put(pattern, new ArrayList<>())); + Map> failing = new LinkedHashMap<>(); + violations.forEach((testCase, list) -> failing.computeIfAbsent(testCase.label(), it -> new ArrayList<>()).addAll(list)); + List known = knownFindings(stringArg(args, "--known")); List> unknown = new ArrayList<>(); - violations.forEach((testCase, list) -> { - String pattern = known.keySet().stream().filter(it -> Pattern.compile(it).matcher(testCase.label()).find()).findFirst().orElse(null); - if (pattern == null) { - unknown.add(list); - } else { - knownFailing.get(pattern).add(testCase); + for (String returnType : acceptedReturnTypes) { + Optional finding = known.stream().filter(it -> it.pattern.matcher(returnType).find()).findFirst(); + if (finding.isPresent()) { + finding.get().covered.add(returnType); + } else if (failing.containsKey(returnType)) { + unknown.add(failing.get(returnType)); } - }); + } - knownFailing.forEach((pattern, failing) -> { - if (!failing.isEmpty()) { - out.printf("%nKNOWN (%s): %d return types still fail, e.g.%n", known.get(pattern), failing.size()); - print(out, violations.get(failing.get(0)).get(0), violations.get(failing.get(0)).size()); + for (KnownFinding finding : known) { + List stillFailing = finding.covered.stream().filter(failing::containsKey).collect(Collectors.toList()); + if (!stillFailing.isEmpty()) { + out.printf("%nKNOWN (%s): %d return types still fail, e.g.%n", finding.description, stillFailing.size()); + List first = failing.get(stillFailing.get(0)); + print(out, first.get(0), first.size()); } - }); + } + boolean passed = true; if (!unknown.isEmpty()) { int total = unknown.stream().mapToInt(List::size).sum(); out.printf("%nFAIL: %d executions in %d return types gave graphql-java something other than the value the resolver returned.%n", total, unknown.size()); - unknown.stream().limit(intArg(args, "--show", 15)).forEach(list -> print(out, list.get(0), list.size())); - return false; + unknown.stream().limit(show).forEach(list -> print(out, list.get(0), list.size())); + passed = false; } if (!missing.isEmpty() || runs == 0) { out.println("\nMODEL ERROR: the schema build rejected return types the check must exercise, so a pass would prove nothing:"); missing.forEach(it -> out.println(" " + it)); - return false; + passed = false; + } + if (depth == DEPTH && budget == BUDGET && propertyBudget == PROPERTY_BUDGET) { + passed &= knownFindingsAreExact(known, failing.keySet(), show, out); + } + if (passed) { + out.println(violations.isEmpty() ? "PASS" : "\nPASS apart from the known findings above"); + } + return passed; + } + + private static boolean knownFindingsAreExact(List known, Set failing, int show, PrintStream out) { + List stale = new ArrayList<>(); + List added = new ArrayList<>(); + for (KnownFinding finding : known) { + int covered = finding.covered.size(); + List passing = finding.covered.stream().filter(it -> !failing.contains(it)).collect(Collectors.toList()); + if (passing.size() == covered) { + stale.add(" " + finding.description + ": none of the " + covered + " return types it matches fail. Delete the line."); + } else if (!passing.isEmpty()) { + stale.add(" " + finding.description + ": " + passing.size() + " of the " + covered + " return types it matches pass. Narrow the line to the " + + (covered - passing.size()) + " that fail and set its count to that:"); + passing.stream().limit(show).forEach(it -> stale.add(" " + it)); + if (passing.size() > show) { + stale.add(" and " + (passing.size() - show) + " more, rerun with --show " + passing.size()); + } + } + String counts = " " + finding.description + ": the line records " + finding.returnTypes + " return types and matches " + covered + " that the schema build accepts."; + if (covered > finding.returnTypes) { + added.add(counts); + } else if (covered < finding.returnTypes) { + stale.add(counts + " Unless you just narrowed the line, the build now rejects a return type it used to accept. " + + "Find it by diffing --rejected output against the last commit, then set the count to " + covered + "."); + } + } + if (!added.isEmpty()) { + out.println("\nNEW: known findings in " + KNOWN_FILE + " match more return types than they record, so a new failure would print as KNOWN, not FAIL. " + + "Unless you just widened a line, the build now accepts a return type it used to reject, and that return type fails. " + + "Find it by diffing --rejected output against the last commit, and treat it as a FAIL:"); + added.forEach(out::println); } - List fixed = knownFailing.entrySet().stream().filter(it -> it.getValue().isEmpty()).map(it -> known.get(it.getKey())).collect(Collectors.toList()); - if (!fixed.isEmpty()) { - out.println("\nSTALE: these known findings no longer fail. Delete their lines from src/test/resources/returnvalue/known-findings.txt so a regression shows up as FAIL:"); - fixed.forEach(it -> out.println(" " + it)); - return false; + if (!stale.isEmpty()) { + out.println("\nSTALE: known findings in " + KNOWN_FILE + " no longer match exactly the return types that fail, so a regression in a fixed one would print as KNOWN, not FAIL:"); + stale.forEach(out::println); } - out.println(violations.isEmpty() ? "PASS" : "\nPASS apart from the known findings above"); - return true; + return added.isEmpty() && stale.isEmpty(); } - private static Map knownFindings(String path) throws Exception { - Map known = new LinkedHashMap<>(); + private static List knownFindings(String path) throws Exception { + Pattern format = Pattern.compile("(\\d+) (.+?) # (.+)"); + List known = new ArrayList<>(); for (String line : Files.readAllLines(Path.of(path))) { if (!line.isBlank() && !line.startsWith("#")) { - int separator = line.indexOf(" # "); - if (separator < 0) { - throw new IllegalArgumentException("A known finding is \">> # \", not: " + line); + Matcher parts = format.matcher(line.trim()); + if (!parts.matches()) { + throw new IllegalArgumentException("A known finding is \" >> # \", not: " + line); } - known.put(line.substring(0, separator).trim(), line.substring(separator + 3).trim()); + known.add(new KnownFinding(Integer.parseInt(parts.group(1)), Pattern.compile(parts.group(2)), parts.group(3))); } } return known; diff --git a/src/test/resources/returnvalue/known-findings.txt b/src/test/resources/returnvalue/known-findings.txt index d38532fc..ca0a5c60 100644 --- a/src/test/resources/returnvalue/known-findings.txt +++ b/src/test/resources/returnvalue/known-findings.txt @@ -1,5 +1,5 @@ -^(property|map) \w+<.*Future<.*String>+$ # properties and Maps don't await a future below the top level, so a String field returns the future's toString with no error -^(property|map) \w+<.*Future<.*(Payload|Object)>+$ # properties and Maps don't await a future below the top level, so an object or union field fails -^(property|map) Future< # properties and Maps don't check a declared Future, so a FutureTask fails with "Expected source object" or returns its toString, not the "can't wait on" error -^(property|map) .*\b(Page|Later|Try)< # properties and Maps don't run generic wrapper transformers, so the field fails or a String field returns the wrapper's toString -^(property|map) ((\w+<){2,}|(List|Optional|DataFetcherResult)<)DataFetcherResult< # properties and Maps leave a DataFetcherResult below a list, an Optional or another DataFetcherResult to graphql-java, which only reads one at the top or under a top-level future +448 ^(property|map) \w+<.*Future<.*String>+$ # properties and Maps don't await a future below the top level, so a String field returns the future's toString with no error +896 ^(property|map) \w+<.*Future<.*(Payload|Object)>+$ # properties and Maps don't await a future below the top level, so an object or union field fails +234 ^(property|map) Future< # properties and Maps don't check a declared Future, so a FutureTask fails with "Expected source object" or returns its toString, not the "can't wait on" error +1254 ^(property|map) .*\b(Page|Later|Try)< # properties and Maps don't run generic wrapper transformers, so the field fails or a String field returns the wrapper's toString +18 ^(property|map) (CompletableFuture<)?Optional Date: Thu, 5 Nov 2026 17:24:53 -0500 Subject: [PATCH 43/64] Derive the merged types' lookups from one list and share the kind wording byName and baseObjects come from the merged types instead of a second pass over the definitions, and the type reference errors take a type's kind from MergedType.kind. A scalar keeps its provided description through newScalar, so prepare only sets one the SDL gives. The boundary test finds extension classes and named types by their classes instead of their names. Co-Authored-By: Claude --- .../kickstart/tools/MergedDefinitions.kt | 53 ++++++++++--------- .../kickstart/tools/TypeReferenceErrors.kt | 7 +-- .../tools/DefinitionsBoundaryTest.kt | 20 ++++--- 3 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt index 1e28d443..97598dd5 100644 --- a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt +++ b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt @@ -39,22 +39,23 @@ internal class MergedDefinitions(definitions: List>) { .groupBy { it.name } // one type per definition, so a repeated definition of a name is a type of its own - private val typesBySource: Map, MergedType<*>> = sources.mapNotNull { source -> merge(source)?.let { source to it } }.toMap() + // one type per definition, so a repeated definition of a name is a type of its own + private val typesBySource: List, MergedType<*>>> = sources.mapNotNull { source -> merge(source)?.let { source to it } } + + private val specificationScalars: List> = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.values.map { definition -> + definition to MergedType.Scalar(definition, extensionsByName[definition.name].orEmpty().filterIsInstance()) + } - private val specificationScalars: Map = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS - .mapValues { (name, definition) -> MergedType.Scalar(definition, extensionsByName[name].orEmpty().filterIsInstance()) } + private val specificationScalarsByName: Map = specificationScalars.associate { (_, type) -> type.name to type } - private val sourceOf: Map, TypeDefinition<*>> = - typesBySource.entries.associate { it.value to it.key } + specificationScalars.values.associateWith { ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.getValue(it.name) } + private val sourceOf: Map, TypeDefinition<*>> = (typesBySource + specificationScalars).associate { (source, type) -> type to source } - val byName: Map> = sourcesByName.mapNotNull { (name, source) -> typesBySource[source]?.let { name to it } }.toMap() + val byName: Map> = typesBySource.associate { (_, type) -> type.name to type } /** * Every object type definition, including repeated ones that [byName] doesn't return. */ - val baseObjects: List = typeDefinitions - .filter { it is ObjectTypeDefinition && it !is ObjectTypeExtensionDefinition } - .map { typesBySource.getValue(it) as MergedType.Object } + val baseObjects: List = typesBySource.map { it.second }.filterIsInstance() val ignoredExtensionWarnings: List = typeDefinitions.filter(::extendsOtherKind).map { extension -> "Type '${extension.name}' is defined as ${sourcesByName.getValue(extension.name).kind()}, but extended as ${extension.kind()}. The extension is ignored." @@ -63,7 +64,7 @@ internal class MergedDefinitions(definitions: List>) { /** * Looks a name up like graphql-java, so the specification's scalars come first. */ - fun resolve(name: String?): MergedType<*>? = specificationScalars[name] ?: byName[name] + fun resolve(name: String?): MergedType<*>? = specificationScalarsByName[name] ?: byName[name] fun definitionsOf(types: Set>): Set> = types.mapNotNullTo(linkedSetOf()) { sourceOf[it] } @@ -104,16 +105,16 @@ internal class MergedDefinitions(definitions: List>) { val type = sourcesByName[definition.name] return definition is SDLExtensionDefinition && type != null && type.kind() != definition.kind() } +} - private fun TypeDefinition<*>.kind(): String = when (this) { - is ObjectTypeDefinition -> "an object type" - is InterfaceTypeDefinition -> "an interface" - is UnionTypeDefinition -> "a union" - is EnumTypeDefinition -> "an enum" - is InputObjectTypeDefinition -> "an input object type" - is ScalarTypeDefinition -> "a scalar" - else -> javaClass.simpleName - } +private fun TypeDefinition<*>.kind(): String = when (this) { + is ObjectTypeDefinition -> "an object type" + is InterfaceTypeDefinition -> "an interface" + is UnionTypeDefinition -> "a union" + is EnumTypeDefinition -> "an enum" + is InputObjectTypeDefinition -> "an input object type" + is ScalarTypeDefinition -> "a scalar" + else -> javaClass.simpleName } internal class TypeBuildContext( @@ -134,6 +135,11 @@ internal sealed class MergedType val definitionClassName: String get() = definition.javaClass.simpleName + /** + * The kind as the library's messages name it, such as "an object type". + */ + val kind: String get() = definition.kind() + protected val directives: List = definition.directives + extensions.flatMap { it.directives } protected abstract val location: DirectiveLocation @@ -142,17 +148,14 @@ internal sealed class MergedType protected abstract fun newBuilder(context: TypeBuildContext): B - protected open fun fallbackDescription(context: TypeBuildContext): String? = null - /** * Starts the graphql-java type with what every kind gets: the check for repeated declarations, the name, the definitions, * the description and the SDL directives. The caller adds the members. */ fun prepare(context: TypeBuildContext): B { rejectRepeated() - val builder = newBuilder(context) - .name(name) - .description(getDocumentation(definition as AbstractNode<*>, context.options) ?: fallbackDescription(context)) + val builder = newBuilder(context).name(name) + getDocumentation(definition as AbstractNode<*>, context.options)?.let { builder.description(it) } return with(context.directives) { builder.withSdlDirectives(directives, location) } } @@ -253,8 +256,6 @@ internal sealed class MergedType .clearDirectives() } - override fun fallbackDescription(context: TypeBuildContext): String? = context.customScalars.getValue(name).description - private fun specifiedByUrl(): String? = (directives.find { it.name == Directives.SpecifiedByDirective.name }?.getArgument("url")?.value as? StringValue)?.value } diff --git a/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt b/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt index 7cb155e0..4124ff7b 100644 --- a/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt +++ b/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt @@ -14,12 +14,7 @@ internal class TypeReferenceErrors( val isInput = expectedType == GraphQLInputType::class val definition = unusedTypes.find { it.name == typeName.name } ?: types.find { it.name == typeName.name } - val outputOnlyKind = when (definition) { - is MergedType.Object -> "an object type" - is MergedType.Interface -> "an interface" - is MergedType.Union -> "a union" - else -> null - } + val outputOnlyKind = definition?.takeIf { it is MergedType.Object || it is MergedType.Interface || it is MergedType.Union }?.kind val problem = when { definition == null -> "is not defined in the schema." diff --git a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt index 4fbfa78a..b5fcd83a 100644 --- a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt @@ -8,7 +8,15 @@ import com.tngtech.archunit.core.domain.JavaConstructorCall import com.tngtech.archunit.core.domain.JavaConstructorReference import com.tngtech.archunit.core.importer.ClassFileImporter import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses +import graphql.language.SDLExtensionDefinition +import graphql.language.SchemaExtensionDefinition import graphql.language.TypeDefinition +import graphql.schema.GraphQLEnumType +import graphql.schema.GraphQLInputObjectType +import graphql.schema.GraphQLInterfaceType +import graphql.schema.GraphQLObjectType +import graphql.schema.GraphQLScalarType +import graphql.schema.GraphQLUnionType import org.junit.Test import java.nio.file.Paths @@ -44,15 +52,13 @@ class DefinitionsBoundaryTest { private val extensionClass = object : DescribedPredicate("are graphql-java type extension definitions") { override fun test(javaClass: JavaClass) = - javaClass.packageName == "graphql.language" && - javaClass.simpleName.endsWith("ExtensionDefinition") && - javaClass.simpleName != "SchemaExtensionDefinition" + javaClass.isAssignableTo(SDLExtensionDefinition::class.java) && !javaClass.isAssignableTo(SchemaExtensionDefinition::class.java) } - private val namedTypes = setOf( - "graphql.schema.GraphQLObjectType", "graphql.schema.GraphQLInterfaceType", "graphql.schema.GraphQLUnionType", - "graphql.schema.GraphQLEnumType", "graphql.schema.GraphQLInputObjectType", "graphql.schema.GraphQLScalarType", - ) + private val namedTypes = listOf( + GraphQLObjectType::class, GraphQLInterfaceType::class, GraphQLUnionType::class, + GraphQLEnumType::class, GraphQLInputObjectType::class, GraphQLScalarType::class, + ).mapTo(hashSetOf()) { it.java.name } private val builderFactories = setOf("newObject", "newInterface", "newUnionType", "newEnum", "newInputObject", "newScalar") private val startsNamedTypeBuilder = object : DescribedPredicate>("starts a builder for a graphql-java named type") { From f1d8b2dbf2fedda08adcc6ec286c982a727a7204 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 17:30:03 -0500 Subject: [PATCH 44/64] Name what the merged definitions return instead of commenting it objectsWithRepeats, kindPhrase, declarationTextOf and findUsage's reference parameter say what the KDoc said, so the comments go. Co-Authored-By: Claude --- .../kickstart/tools/MergedDefinitions.kt | 43 +++---------------- .../kickstart/tools/SchemaClassScanner.kt | 6 +-- .../kickstart/tools/TypeReferenceErrors.kt | 2 +- .../tools/DefinitionsBoundaryTest.kt | 11 ++--- .../kickstart/tools/TypeKindRecipeTest.kt | 7 +-- 5 files changed, 14 insertions(+), 55 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt index 97598dd5..1cce7227 100644 --- a/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt +++ b/src/main/kotlin/graphql/kickstart/tools/MergedDefinitions.kt @@ -9,21 +9,15 @@ import graphql.language.* import graphql.schema.* import graphql.schema.idl.ScalarInfo -/** - * The SDL types of a schema, each merged with its extensions. Outside this file the scanner and the parser only see - * [MergedType]s, so every reader of a type's fields, members, values or directives gets those of its extensions too. - */ internal class MergedDefinitions(definitions: List>) { val directiveDefinitions: List = definitions.filterIsInstance() val rootInfo: RootTypeInfo = RootTypeInfo.fromSchemaDefinitions(definitions.filterIsInstance()) - // includes the names of scalar extensions, even ignored ones val scalarNames: Set = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.keys + definitions.filterIsInstance().map { it.name } private val typeDefinitions = definitions.filterIsInstance>() private val baseTypeNames = typeDefinitions.filter { it !is SDLExtensionDefinition }.map { it.name }.toSet() - // the first extension of an interface, union, enum or scalar without a definition stands in for it private val loneExtensions = typeDefinitions .filter { it is SDLExtensionDefinition && it !is ObjectTypeDefinition && it !is InputObjectTypeDefinition && it.name !in baseTypeNames } .distinctBy { it.name } @@ -31,15 +25,12 @@ internal class MergedDefinitions(definitions: List>) { private val sources = typeDefinitions.filter { it !is SDLExtensionDefinition || it in loneExtensions } - // the last definition of a name wins private val sourcesByName = sources.associateBy { it.name } private val extensionsByName = typeDefinitions .filter { it is SDLExtensionDefinition && it !in loneExtensions && !extendsOtherKind(it) } .groupBy { it.name } - // one type per definition, so a repeated definition of a name is a type of its own - // one type per definition, so a repeated definition of a name is a type of its own private val typesBySource: List, MergedType<*>>> = sources.mapNotNull { source -> merge(source)?.let { source to it } } private val specificationScalars: List> = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS.values.map { definition -> @@ -52,27 +43,17 @@ internal class MergedDefinitions(definitions: List>) { val byName: Map> = typesBySource.associate { (_, type) -> type.name to type } - /** - * Every object type definition, including repeated ones that [byName] doesn't return. - */ - val baseObjects: List = typesBySource.map { it.second }.filterIsInstance() + val objectsWithRepeats: List = typesBySource.map { it.second }.filterIsInstance() val ignoredExtensionWarnings: List = typeDefinitions.filter(::extendsOtherKind).map { extension -> "Type '${extension.name}' is defined as ${sourcesByName.getValue(extension.name).kind()}, but extended as ${extension.kind()}. The extension is ignored." } - /** - * Looks a name up like graphql-java, so the specification's scalars come first. - */ fun resolve(name: String?): MergedType<*>? = specificationScalarsByName[name] ?: byName[name] fun definitionsOf(types: Set>): Set> = types.mapNotNullTo(linkedSetOf()) { sourceOf[it] } - /** - * Finds the field, argument or input field whose type is [typeName] itself, not another reference to the same name. The - * definitions of [types] are searched first, then the directive definitions, then every extension. - */ - fun findUsage(typeName: TypeName, types: Collection>): String? = + fun findUsage(reference: TypeName, types: Collection>): String? = (types.mapNotNull { sourceOf[it] } + directiveDefinitions + extensionsByName.values.flatten()).asSequence().flatMap { definition -> when (definition) { is ObjectTypeDefinition -> fieldUsages(definition.name, definition.fieldDefinitions) @@ -81,7 +62,7 @@ internal class MergedDefinitions(definitions: List>) { is DirectiveDefinition -> definition.inputValueDefinitions.map { "argument '${it.name}' of directive '@${definition.name}'" to it.type } else -> emptyList() } - }.find { (_, type) -> type.unwrap() === typeName }?.first + }.find { (_, type) -> type.unwrap() === reference }?.first private fun fieldUsages(typeName: String, fields: List): List>> = fields.flatMap { field -> listOf("field '$typeName.${field.name}'" to field.type) + @@ -123,10 +104,6 @@ internal class TypeBuildContext( val customScalars: CustomScalarMap, ) -/** - * An SDL type merged with its extensions: the members of the type come first, then those of each extension in the order - * they're declared. Only this file sees the definitions themselves. - */ internal sealed class MergedType>( private val definition: TypeDefinition<*>, extensions: List>, @@ -135,10 +112,7 @@ internal sealed class MergedType val definitionClassName: String get() = definition.javaClass.simpleName - /** - * The kind as the library's messages name it, such as "an object type". - */ - val kind: String get() = definition.kind() + val kindPhrase: String get() = definition.kind() protected val directives: List = definition.directives + extensions.flatMap { it.directives } @@ -148,10 +122,6 @@ internal sealed class MergedType protected abstract fun newBuilder(context: TypeBuildContext): B - /** - * Starts the graphql-java type with what every kind gets: the check for repeated declarations, the name, the definitions, - * the description and the SDL directives. The caller adds the members. - */ fun prepare(context: TypeBuildContext): B { rejectRepeated() val builder = newBuilder(context).name(name) @@ -210,10 +180,7 @@ internal sealed class MergedType override fun newBuilder(context: TypeBuildContext): GraphQLUnionType.Builder = GraphQLUnionType.newUnionType().definition(definition).extensionDefinitions(extensions) - /** - * The toString of the definition or extension that lists [member]. - */ - fun declarationOf(member: Type<*>): String = + fun declarationTextOf(member: Type<*>): String = (listOf(definition) + extensions).first { declaration -> declaration.memberTypes.any { it === member } }.toString() } diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt index aae163aa..ec170918 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt @@ -43,7 +43,7 @@ internal class SchemaClassScanner( private val initialDictionary = initialDictionary.mapValues { InitialDictionaryEntry(it.value) } private val directiveDefinitions = definitions.directiveDefinitions private val typesByName = definitions.byName - private val objectTypesByName = definitions.baseObjects.associateBy { it.name } + private val objectTypesByName = definitions.objectsWithRepeats.associateBy { it.name } private val fieldResolverScanner = FieldResolverScanner(options, definitions.scalarNames) private val typeClassMatcher = TypeClassMatcher(definitions) @@ -305,7 +305,7 @@ internal class SchemaClassScanner( private fun getAllObjectTypesImplementingDiscoveredInterfaces(): List { return dictionary.keys.filterIsInstance().map { iface -> - definitions.baseObjects.filter { obj -> + definitions.objectsWithRepeats.filter { obj -> obj.interfaces.filterIsInstance().any { it.name == iface.name } } }.flatten().distinctBy { it.name } @@ -316,7 +316,7 @@ internal class SchemaClassScanner( return dictionary.keys.filterIsInstance().map { union -> union.members.filterIsInstance().filter { !unionTypeNames.contains(it.name) }.map { objectTypesByName[it.name] - ?: throw SchemaClassScannerError("No object type found with name '${it.name}' for union: ${union.declarationOf(it)}") + ?: throw SchemaClassScannerError("No object type found with name '${it.name}' for union: ${union.declarationTextOf(it)}") } }.flatten().distinct() } diff --git a/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt b/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt index 4124ff7b..36da3e70 100644 --- a/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt +++ b/src/main/kotlin/graphql/kickstart/tools/TypeReferenceErrors.kt @@ -14,7 +14,7 @@ internal class TypeReferenceErrors( val isInput = expectedType == GraphQLInputType::class val definition = unusedTypes.find { it.name == typeName.name } ?: types.find { it.name == typeName.name } - val outputOnlyKind = definition?.takeIf { it is MergedType.Object || it is MergedType.Interface || it is MergedType.Union }?.kind + val outputOnlyKind = definition?.takeIf { it is MergedType.Object || it is MergedType.Interface || it is MergedType.Union }?.kindPhrase val problem = when { definition == null -> "is not defined in the schema." diff --git a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt index b5fcd83a..bd55238a 100644 --- a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt @@ -20,10 +20,6 @@ import graphql.schema.GraphQLUnionType import org.junit.Test import java.nio.file.Paths -/** - * Kotlin's internal is module-wide, so these rules keep the SDL type definitions and the named-type builders inside - * MergedDefinitions.kt. They read the compiled classes, so aliases, wildcard imports, Java files and lambdas count too. - */ class DefinitionsBoundaryTest { companion object { @@ -35,8 +31,7 @@ class DefinitionsBoundaryTest { override fun test(javaClass: JavaClass) = javaClass.source.flatMap { it.fileName }.orElse("") !in files } - // a factory gets and returns raw definitions by contract, and the scanner only sees its output merged - private val typeDefinitionFactory = object : DescribedPredicate("implement TypeDefinitionFactory") { + private val getsRawDefinitionsByContract = object : DescribedPredicate("implement TypeDefinitionFactory") { override fun test(javaClass: JavaClass) = javaClass.isAssignableTo(TypeDefinitionFactory::class.java) } @@ -82,7 +77,7 @@ class DefinitionsBoundaryTest { @Test fun `only the merged definitions read the members and directives of SDL types`() { - noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(typeDefinitionFactory)) + noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(getsRawDefinitionsByContract)) .should().accessTargetWhere(readsTypeMembers) .because("each type is merged with its extensions once in MergedDefinitions.kt. Take a MergedType and read MergedType.fields, interfaces, members or values, and let MergedType.prepare apply the directives") .check(classes) @@ -90,7 +85,7 @@ class DefinitionsBoundaryTest { @Test fun `only the merged definitions see type extension classes`() { - noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(typeDefinitionFactory)) + noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(getsRawDefinitionsByContract)) .should().dependOnClassesThat(extensionClass) .because("each type is merged with its extensions once in MergedDefinitions.kt. Take a MergedType instead of matching extension definitions") .check(classes) diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt index 93ef6c97..7ffac552 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt @@ -7,9 +7,6 @@ import org.junit.Assert.assertThrows import org.junit.Test import kotlin.reflect.KClass -/** - * Checks each step of MergedType.prepare on every kind of type, so a step that one kind skips fails here. - */ class TypeKindRecipeTest { private val kinds: Map>, Kind> = mapOf( @@ -49,11 +46,11 @@ class TypeKindRecipeTest { assertThrows(SchemaError::class.java) { parser(sdl + kind.repeat!!.extension).makeExecutableSchema() }.message } - // the extension is appended as the last line of the schema + val appendedExtensionLine = sdl.lines().size assertEquals(errors, repeating.map { kind -> val repeat = kind.repeat!! val column = repeat.extension.indexOf(repeat.member, repeat.extension.indexOf(kind.name) + kind.name.length) + 1 - "Type '${kind.name}' declares ${repeat.noun} '${repeat.member}' more than once at line ${sdl.lines().size}, column $column." + "Type '${kind.name}' declares ${repeat.noun} '${repeat.member}' more than once at line $appendedExtensionLine, column $column." }) } From 759c5e06abe5d97e44cf7f64cef4514235cd3fee Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 17:41:38 -0500 Subject: [PATCH 45/64] Walk each declared type once for matching and unwrapping TypeShape walks a resolver's return or parameter type against its GraphQL type once and keeps both results: the leaf the dictionary binds and the layers a method's value is unwrapped through. It replaces GenericTypeResolver.resolve, TypeClassMatcher.PotentialMatch and ReturnValueUnwrapper, which each walked or recomputed the same type. DataFetcherResult and Optional are one enum whose placement rule and value step are abstract, so a new container can't skip either. Both generic-wrapper rules (exact declared type at build, most specific instance at fetch) sit in one class. A subscription's Publisher view is taken inside TypeShape, next to the rule that leaves its events alone. Property and Map fields still match through TypeShape and return their raw values, as before. Co-Authored-By: Claude Opus 5.5 --- .../kickstart/tools/GenericTypeResolver.kt | 97 ---- .../graphql/kickstart/tools/ScanDictionary.kt | 6 +- .../kickstart/tools/SchemaClassScanner.kt | 7 +- .../kickstart/tools/TypeClassMatcher.kt | 117 +---- .../kickstart/tools/resolver/FieldResolver.kt | 8 +- .../tools/resolver/MapFieldResolver.kt | 5 +- .../tools/resolver/MethodFieldResolver.kt | 49 +- .../tools/resolver/MissingFieldResolver.kt | 3 +- .../tools/resolver/PropertyFieldResolver.kt | 11 +- .../tools/resolver/ReturnValueUnwrapper.kt | 188 -------- .../kickstart/tools/resolver/TypeShape.kt | 433 ++++++++++++++++++ .../tools/NestedGenericWrapperTest.kt | 31 +- .../kickstart/tools/TypeClassMatcherTest.kt | 16 +- 13 files changed, 497 insertions(+), 474 deletions(-) delete mode 100644 src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt create mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt diff --git a/src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt b/src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt deleted file mode 100644 index 4ad02eb8..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt +++ /dev/null @@ -1,97 +0,0 @@ -package graphql.kickstart.tools - -import com.fasterxml.classmate.ResolvedType -import graphql.kickstart.tools.util.JavaType -import graphql.kickstart.tools.util.ParameterizedTypeImpl -import graphql.kickstart.tools.util.Primitives -import org.apache.commons.lang3.reflect.TypeUtils -import java.lang.reflect.ParameterizedType -import java.lang.reflect.TypeVariable -import java.lang.reflect.WildcardType - -/** - * @author Andrew Potter - */ -internal class GenericTypeResolver(private val containingType: JavaType, private val options: SchemaParserOptions) { - - fun getRawClass() = getRawClass(containingType) - - fun getRawClass(type: JavaType): Class<*> = TypeUtils.getRawType(type, containingType) - - fun isAssignableFrom(type: JavaType) = TypeUtils.isAssignable(type, containingType) - - /** - * Turns a type as declared in the source (a method's return or parameter type, or a field's type) into the type - * the GraphQL type is matched against: - * - type variables are resolved relative to the containing type, - * e.g. `T` of `AbstractItem.getId()` becomes `Long` for `class Item : AbstractItem()` - * - generic wrappers are replaced by their wrapped type, e.g. `CompletableFuture` becomes `Foo` - * - wildcards are replaced by their upper bound, e.g. `? extends Foo` becomes `Foo` - * - primitives are replaced by their boxed class, e.g. `int` becomes `Integer` - */ - fun resolve(javaType: JavaType, onUnwrap: ((SchemaParserOptions.GenericWrapper) -> Unit)? = null): JavaType { - return when (val type = resolveTypeVariables(javaType)) { - is ParameterizedType -> { - val rawType = type.rawType - val wrapper = options.genericWrappers.find { it.type == rawType } - ?: return type - - val typeArguments = type.actualTypeArguments - if (typeArguments.size <= wrapper.index) { - throw IndexOutOfBoundsException("Generic type '${TypeUtils.toString(type)}' does not have a type argument at index ${wrapper.index}!") - } - - onUnwrap?.invoke(wrapper) - val unwrapsTo = wrapper.schemaWrapper.invoke(typeArguments[wrapper.index]) - resolve(unwrapsTo, onUnwrap) - } - is TypeVariable<*> -> error("Could not resolve type variable '${TypeUtils.toLongString(type)}' relative to ${TypeUtils.toString(containingType)}") - // Kotlin reflection gives a suspend function returning List the type List when Foo is open. - // A type variable bound stays as it is, since a method's own variable can't be resolved and a scalar doesn't need it - is WildcardType -> when (val bound = type.upperBounds.firstOrNull() ?: error("Unable to unwrap type, wildcard has no upper bound: $type")) { - is ParameterizedType -> resolve(bound, onUnwrap) - else -> bound - } - is Class<*> -> if (type.isPrimitive) Primitives.wrap(type) else type - else -> error("Unable to unwrap type: $type") - } - } - - fun resolveTypeVariables(type: JavaType, resolving: Set> = emptySet()): JavaType { - return when (type) { - is ParameterizedType -> { - val actualTypeArguments = type.actualTypeArguments.map { resolveTypeVariables(it, resolving) }.toTypedArray() - ParameterizedTypeImpl(type.rawType as Class<*>, actualTypeArguments, type.ownerType?.let { resolveTypeVariables(it, resolving) }) - } - is WildcardType -> TypeUtils.wildcardType() - .withUpperBounds(*type.upperBounds.map { resolveTypeVariables(it, resolving) }.toTypedArray()) - .withLowerBounds(*type.lowerBounds.map { resolveTypeVariables(it, resolving) }.toTypedArray()) - .build() - is ResolvedType -> { - if (type.typeParameters.isEmpty()) { - type.erasedType - } else { - val actualTypeArguments = type.typeParameters.map { resolveTypeVariables(it) }.toTypedArray() - ParameterizedTypeImpl(type.erasedType, actualTypeArguments, null) - } - } - is TypeVariable<*> -> { - val genericDeclaration = type.genericDeclaration - when { - // only a variable leaked from a raw type can be bound to a type containing itself (e.g. T -> List), - // erase it like the raw type does instead of expanding it forever - type in resolving -> TypeUtils.getRawType(type.bounds.first(), null) ?: Any::class.java - // the containing type binds the variables of all its supertypes - genericDeclaration is Class<*> -> generateSequence(containingType) { (it as? ParameterizedType)?.ownerType } - // an inner class can also use the variables of its outer class, those are bound by its owner type (e.g. Connection.Entry) - .firstNotNullOfOrNull { TypeUtils.getTypeArguments(it, genericDeclaration)?.get(type) } - // keep the full type argument (e.g. List) rather than its raw class so nested generics aren't lost - ?.let { resolveTypeVariables(it, resolving + type) } - ?: type - else -> type - } - } - else -> type - } - } -} diff --git a/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt b/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt index a4d5c764..7c1b1bf9 100644 --- a/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt +++ b/src/main/kotlin/graphql/kickstart/tools/ScanDictionary.kt @@ -1,5 +1,6 @@ package graphql.kickstart.tools +import graphql.kickstart.tools.resolver.TypeShape import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.unwrap import graphql.kickstart.tools.util.withExtensions @@ -94,11 +95,12 @@ internal class ScanDictionary( return@forEach } - handleFoundType(typeClassMatcher.match(TypeClassMatcher.PotentialMatch.parameterType( + handleFoundType(typeClassMatcher.match(TypeShape.parameterType( // a class from the dictionary is for the unwrapped type, not for its list or non-null wrapper if (propertyType != null) inputValueDefinition.type else inputGraphQLType, inputValueJavaType, - GenericTypeResolver(javaType ?: inputValueJavaType, options), + javaType ?: inputValueJavaType, + options, InputObjectReference(inputValueDefinition) ))) } diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt index 42f312e2..f89edfde 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt @@ -15,6 +15,7 @@ import graphql.language.* import graphql.schema.idl.ScalarInfo import graphql.schema.idl.TypeUtil import org.apache.commons.lang3.ClassUtils +import org.apache.commons.lang3.reflect.TypeUtils import org.slf4j.LoggerFactory import java.lang.reflect.Field import java.lang.reflect.Member @@ -455,8 +456,8 @@ internal class SchemaClassScanner( fieldResolversByType.getOrPut(type) { mutableMapOf() }[fieldResolver.field] = fieldResolver - fieldResolver.scanForMatches().forEach { potentialMatch -> - dictionary.handleFoundType(typeClassMatcher.match(potentialMatch)) + fieldResolver.scanForMatches().forEach { shape -> + dictionary.handleFoundType(typeClassMatcher.match(shape)) } requireParameterForEachArgument(type, fieldResolver) } @@ -498,7 +499,7 @@ internal class SchemaClassScanner( } fieldResolver.field.inputValueDefinitions.forEachIndexed { index, argument -> - val parameter = fieldResolver.getMethodParameterType(index)?.let(fieldResolver.typeResolver::getRawClass) ?: return@forEachIndexed + val parameter = fieldResolver.getMethodParameterType(index)?.let { TypeUtils.getRawType(it, fieldResolver.search.type) } ?: return@forEachIndexed if (!fieldResolverScanner.isContextParameter(parameter, argument)) { return@forEachIndexed } diff --git a/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt b/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt index fff48337..80d5c32b 100644 --- a/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt +++ b/src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt @@ -1,37 +1,30 @@ package graphql.kickstart.tools -import graphql.execution.DataFetcherResult -import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper -import graphql.kickstart.tools.util.GraphQLLangType +import graphql.kickstart.tools.resolver.TypeShape import graphql.kickstart.tools.util.JavaType -import graphql.kickstart.tools.util.isSubtypeOf import graphql.language.* import graphql.schema.idl.ScalarInfo -import graphql.schema.idl.TypeUtil -import java.lang.reflect.ParameterizedType -import java.util.* /** * @author Andrew Potter */ internal class TypeClassMatcher(private val definitionsByName: Map>) { - fun match(potentialMatch: PotentialMatch): Match { - val unwrapping = potentialMatch.unwrapping - return when (val graphQLType = unwrapping.graphQLType) { + fun match(shape: TypeShape): Match { + return when (val graphQLType = shape.leafGraphQLType) { is TypeName -> { val typeDefinition = ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS[graphQLType.name] ?: definitionsByName[graphQLType.name] - ?: throw potentialMatch.error("No ${TypeDefinition::class.java.simpleName} for type name ${graphQLType.name}") + ?: throw shape.error("No ${TypeDefinition::class.java.simpleName} for type name ${graphQLType.name}") if (typeDefinition is ScalarTypeDefinition) { ScalarMatch(typeDefinition) } else { - ValidMatch(typeDefinition, unwrapping.javaType, potentialMatch.reference) + ValidMatch(typeDefinition, shape.leafJavaType, shape.reference) } } - is TypeDefinition<*> -> ValidMatch(graphQLType, unwrapping.javaType, potentialMatch.reference) - else -> throw potentialMatch.error("Unknown type: ${unwrapping.javaType.javaClass.name}") + is TypeDefinition<*> -> ValidMatch(graphQLType, shape.leafJavaType, shape.reference) + else -> throw shape.error("Unknown type: ${shape.leafJavaType.javaClass.name}") } } @@ -40,100 +33,4 @@ internal class TypeClassMatcher(private val definitionsByName: Map, val javaType: JavaType, val reference: ScanDictionary.Reference) : Match - - internal enum class Location(val prettyName: String) { - RETURN_TYPE("return type"), - PARAMETER_TYPE("parameter"), - } - - internal data class PotentialMatch( - val graphQLType: GraphQLLangType, - val javaType: JavaType, - val typeResolver: GenericTypeResolver, - val reference: ScanDictionary.Reference, - val location: Location - ) { - val unwrapping: Unwrapping by lazy { unwrap(graphQLType, javaType, root = true, mutableListOf()) } - - fun error(msg: String) = SchemaClassScannerError("Unable to match type definition (${TypeUtil.simplePrint(graphQLType)}) for reference $reference with java type ($javaType): $msg") - - private fun unwrap(graphQLType: GraphQLLangType, javaType: JavaType, root: Boolean, unwrapped: MutableList): Unwrapping { - val onUnwrap = { wrapper: GenericWrapper -> unwrapped += Unwrapped.Wrapper(wrapper) } - var realType = typeResolver.resolve(javaType, onUnwrap) - var data = false - var optional = false - - while (realType is ParameterizedType) { - when { - realType.isSubtypeOf(DataFetcherResult::class.java) -> { - if (location != Location.RETURN_TYPE) { - throw error("${DataFetcherResult::class.java.name} can only be used as a return type") - } - if (data) { - throw error("${DataFetcherResult::class.java.name} cannot be nested within itself") - } - data = true - unwrapped += Unwrapped.Data - } - - realType.isSubtypeOf(Optional::class.java) -> { - if (location == Location.RETURN_TYPE && !root) { - throw error("${Optional::class.java.name} can only be used at the top level of a return type") - } - if (optional) { - throw error("${Optional::class.java.name} cannot be nested within itself") - } - optional = true - unwrapped += Unwrapped.Present - } - - else -> break - } - realType = typeResolver.resolve(realType.actualTypeArguments.first(), onUnwrap) - } - - // Match graphql type to java type. - return when (graphQLType) { - is NonNullType -> { - if (optional) { - throw error("graphql type is marked as nonnull but ${Optional::class.java.name} was used") - } - unwrap(graphQLType.type, realType, root = false, unwrapped) - } - - is ListType -> when { - realType is ParameterizedType && realType.isSubtypeOf(Iterable::class.java) -> { - unwrapped += Unwrapped.Elements - unwrap(graphQLType.type, realType.actualTypeArguments.first(), root = false, unwrapped) - } - realType is Class<*> && realType.isArray -> - unwrap(graphQLType.type, realType.componentType, root = false, unwrapped) - // e.g. a property map value: the element type is unknown, so match it as Object too - realType == Any::class.java -> - unwrap(graphQLType.type, realType, root = false, unwrapped) - else -> - throw error("Java class is not a List or generic type information was lost: $realType") - } - - else -> Unwrapping(unwrapped, graphQLType, realType) - } - } - - companion object { - fun returnValue(graphQLType: GraphQLLangType, javaType: JavaType, typeResolver: GenericTypeResolver, reference: ScanDictionary.Reference) = - PotentialMatch(graphQLType, javaType, typeResolver, reference, Location.RETURN_TYPE) - - fun parameterType(graphQLType: GraphQLLangType, javaType: JavaType, typeResolver: GenericTypeResolver, reference: ScanDictionary.Reference) = - PotentialMatch(graphQLType, javaType, typeResolver, reference, Location.PARAMETER_TYPE) - } - } - - internal class Unwrapping(val unwrapped: List, val graphQLType: GraphQLLangType, val javaType: JavaType) - - internal sealed interface Unwrapped { - class Wrapper(val wrapper: GenericWrapper) : Unwrapped - object Data : Unwrapped - object Present : Unwrapped - object Elements : Unwrapped - } } diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt index 4cc378fd..22a93e03 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt @@ -4,6 +4,7 @@ import graphql.kickstart.tools.* import graphql.language.FieldDefinition import graphql.schema.DataFetcher import graphql.schema.DataFetchingEnvironment +import org.apache.commons.lang3.reflect.TypeUtils /** * @author Andrew Potter @@ -14,9 +15,8 @@ internal abstract class FieldResolver( val options: SchemaParserOptions ) { val resolverInfo: ResolverInfo = search.resolverInfo - val typeResolver = GenericTypeResolver(search.type, options) - abstract fun scanForMatches(): List + abstract fun scanForMatches(): Sequence abstract fun createDataFetcher(): DataFetcher<*> @@ -33,8 +33,8 @@ internal abstract class FieldResolver( ?: environment?.getSource() ?: throw ResolverError("Expected DataFetchingEnvironment and source object to not be null!") - if (!this.typeResolver.isAssignableFrom(source.javaClass)) { - throw ResolverError("Expected source object to be an instance of '${this.typeResolver.getRawClass().name}' but instead got '${source.javaClass.name}'") + if (!TypeUtils.isAssignable(source.javaClass, this.search.type)) { + throw ResolverError("Expected source object to be an instance of '${TypeUtils.getRawType(this.search.type, this.search.type).name}' but instead got '${source.javaClass.name}'") } source diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt index 79b5bb4f..c13f67f4 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt @@ -3,7 +3,6 @@ package graphql.kickstart.tools.resolver import com.fasterxml.classmate.TypeResolver import graphql.kickstart.tools.ScanDictionary import graphql.kickstart.tools.SchemaParserOptions -import graphql.kickstart.tools.TypeClassMatcher import graphql.kickstart.tools.util.JavaType import graphql.language.FieldDefinition import graphql.schema.DataFetcher @@ -43,8 +42,8 @@ internal class MapFieldResolver( return MapFieldResolverDataFetcher(createSourceResolver(), field.name) } - override fun scanForMatches(): List { - return listOf(TypeClassMatcher.PotentialMatch.returnValue(field.type, mapGenericValue, typeResolver, ScanDictionary.FieldTypeReference(field.name))) + override fun scanForMatches(): Sequence { + return sequenceOf(TypeShape.returnType(field.type, mapGenericValue, isSubscription = false, search.type, options, ScanDictionary.FieldTypeReference(field.name))) } override fun toString() = "MapFieldResolver{key=${field.name}}" diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt index 7457dfc4..df9b1962 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt @@ -4,7 +4,6 @@ import graphql.GraphQLContext import graphql.kickstart.tools.* import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.coroutineScope -import graphql.kickstart.tools.util.futureValueType import graphql.kickstart.tools.util.isSuspendFunction import graphql.kickstart.tools.util.parameterCountWithoutContinuation import graphql.kickstart.tools.util.typeArgument @@ -18,12 +17,10 @@ import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.ensureActive import kotlinx.coroutines.future.future import org.apache.commons.lang3.reflect.TypeUtils -import org.reactivestreams.Publisher import tools.jackson.databind.ObjectMapper import java.lang.reflect.InvocationTargetException import java.lang.reflect.Method import java.util.* -import java.util.concurrent.Future import java.util.function.Supplier import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn import kotlin.reflect.jvm.javaType @@ -70,7 +67,7 @@ internal class MethodFieldResolver( ?: throw ResolverError("Missing method type at position ${this.getJavaMethodParameterIndex(index)}, this is most likely a bug with graphql-java-tools") val isNonNull = definition.type is NonNullType - val isOptional = this.typeResolver.getRawClass(parameterType) == Optional::class.java + val isOptional = TypeUtils.getRawType(parameterType, search.type) == Optional::class.java val argumentConverter = ArgumentConverter(mapper, parameterType) val parameterClass = parameterType.unwrap() val isConcreteScalar = isConcreteScalarType(definition.type, parameterType) @@ -117,11 +114,7 @@ internal class MethodFieldResolver( } } - // the class the return type unwraps to, so a value that happens to implement Future isn't mistaken for a wrapper. - // Object (e.g. for a union) can't tell them apart, so then every future of a method whose return type is Future is checked - val valueClass = (TypeUtils.getRawType(getResolvedReturnType(), null) ?: Any::class.java) - .takeUnless { it == Any::class.java && TypeUtils.getRawType(returnType, null) == Future::class.java } - val unwrapper = ReturnValueUnwrapper.create(method, returnValueMatch.unwrapping, valueClass, isSuspendFunction, search.isSubscription, options.genericWrappers) + val unwrapper = TypeShape.Unwrapper(returnShape, method, isSuspendFunction) return if (numberOfParameters > 0 || isSuspendFunction) { // requires arguments and environment or is a suspend function @@ -148,37 +141,25 @@ internal class MethodFieldResolver( } } - override fun scanForMatches(): List { - return field.inputValueDefinitions.mapIndexed { i, inputDefinition -> - TypeClassMatcher.PotentialMatch.parameterType(inputDefinition.type, getMethodParameterType(i)!!, typeResolver, ScanDictionary.MethodParameterReference(method, i)) - } + listOf(returnValueMatch) + // each shape is walked only when the scanner gets to it, so an earlier match's dictionary error is reported first + override fun scanForMatches(): Sequence = sequence { + field.inputValueDefinitions.forEachIndexed { i, inputDefinition -> + yield(TypeShape.parameterType(inputDefinition.type, getMethodParameterType(i)!!, search.type, options, ScanDictionary.MethodParameterReference(method, i))) + } + yield(returnShape) } - // generic wrappers only match their exact type, so a Publisher implementation (e.g. Flux), or a future of one, - // is matched as a plain Publisher of its events - private fun JavaType.asPublisher(): JavaType = - (futureValueType() ?: this).typeArgument(Publisher::class.java) - ?.let { TypeUtils.parameterize(Publisher::class.java, it) } - ?: this - - // the declared return type with type variables resolved, e.g. Future for get(): T in a subclass of Base> - private val returnType: JavaType by lazy { + private val returnShape by lazy { val declaredType = try { method.kotlinFunction?.returnType?.javaType ?: method.genericReturnType } catch (e: InternalError) { method.genericReturnType } - typeResolver.resolveTypeVariables(declaredType) - } - - private val returnValueMatch by lazy { - TypeClassMatcher.PotentialMatch.returnValue(field.type, matchedReturnType(), typeResolver, ScanDictionary.ReturnValueReference(method)) + // with type variables resolved, e.g. Future for get(): T in a subclass of Base> + val returnType = resolveTypeVariables(declaredType, search.type) + TypeShape.returnType(field.type, returnType, search.isSubscription, search.type, options, ScanDictionary.ReturnValueReference(method)) } - private fun matchedReturnType(): JavaType = if (search.isSubscription) returnType.asPublisher() else returnType - - private fun getResolvedReturnType(): JavaType = typeResolver.resolve(matchedReturnType()) - private fun getJavaMethodParameterIndex(index: Int) = index + search.firstArgumentIndex internal fun getMethodParameterType(index: Int): JavaType? { @@ -186,7 +167,7 @@ internal class MethodFieldResolver( val parameters = method.parameterTypes return if (parameters.size > methodIndex) { - typeResolver.resolveTypeVariables(method.genericParameterTypes[methodIndex]) + resolveTypeVariables(method.genericParameterTypes[methodIndex], search.type) } else { null } @@ -201,7 +182,7 @@ internal class MethodFieldResolverDataFetcher( private val args: List, private val options: SchemaParserOptions, private val isSuspendFunction: Boolean, - private val unwrapper: ReturnValueUnwrapper + private val unwrapper: TypeShape.Unwrapper ) : DataFetcher { override fun get(environment: DataFetchingEnvironment): Any? { @@ -235,7 +216,7 @@ internal class MethodFieldResolverDataFetcher( internal class LightMethodFieldResolverDataFetcher( private val sourceResolver: SourceResolver, private val method: Method, - private val unwrapper: ReturnValueUnwrapper + private val unwrapper: TypeShape.Unwrapper ) : LightDataFetcher { override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? { diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt index 652af687..98f6f00a 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt @@ -2,7 +2,6 @@ package graphql.kickstart.tools.resolver import graphql.kickstart.tools.MissingResolverInfo import graphql.kickstart.tools.SchemaParserOptions -import graphql.kickstart.tools.TypeClassMatcher import graphql.language.FieldDefinition import graphql.schema.DataFetcher @@ -13,6 +12,6 @@ internal class MissingFieldResolver( private val missingResolverDataFetcherProvider: MissingResolverDataFetcherProvider = options.missingResolverDataFetcherProvider ?: MissingResolverDataFetcherProvider { _, _ -> DataFetcher { TODO("Schema resolver not implemented") } } - override fun scanForMatches(): List = listOf() + override fun scanForMatches(): Sequence = emptySequence() override fun createDataFetcher(): DataFetcher<*> = missingResolverDataFetcherProvider.createDataFetcher(field, options) } diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt index 1e6cb062..7f93c648 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt @@ -2,7 +2,6 @@ package graphql.kickstart.tools.resolver import graphql.kickstart.tools.ScanDictionary import graphql.kickstart.tools.SchemaParserOptions -import graphql.kickstart.tools.TypeClassMatcher import graphql.language.FieldDefinition import graphql.schema.DataFetcher import graphql.schema.DataFetchingEnvironment @@ -25,12 +24,14 @@ internal class PropertyFieldResolver( return PropertyFieldResolverDataFetcher(createSourceResolver(), property) } - override fun scanForMatches(): List { - return listOf( - TypeClassMatcher.PotentialMatch.returnValue( + override fun scanForMatches(): Sequence { + return sequenceOf( + TypeShape.returnType( field.type, property.genericType, - typeResolver, + isSubscription = false, + search.type, + options, ScanDictionary.FieldTypeReference(property.toString()) ) ) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt deleted file mode 100644 index 2c28bc27..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt +++ /dev/null @@ -1,188 +0,0 @@ -package graphql.kickstart.tools.resolver - -import graphql.execution.DataFetcherResult -import graphql.kickstart.tools.ResolverError -import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper -import graphql.kickstart.tools.TypeClassMatcher.Unwrapped -import graphql.kickstart.tools.TypeClassMatcher.Unwrapping -import graphql.schema.DataFetchingEnvironment -import kotlinx.coroutines.future.asDeferred -import org.apache.commons.lang3.reflect.TypeUtils -import java.lang.reflect.Method -import java.util.* -import java.util.concurrent.CompletableFuture -import java.util.concurrent.CompletionStage -import java.util.concurrent.Future -import java.util.function.Supplier - -internal class ReturnValueUnwrapper private constructor( - private val genericWrappers: List, - private val awaitable: Awaitable, - private val isOutermostFuture: Boolean, - private val nested: Step? -) { - - fun unwrap(value: Any, environmentSupplier: Supplier): Any? { - val wrapper = genericWrappers.wrapperOf(value) - val transformed = if (wrapper == null) value else wrapper.transformer(value, environmentSupplier.get()) - val unwrapped = awaitable.requireOutermost(transformed) - return if (isOutermostFuture || wrapper?.transformerReturnsCompletionStage == true) { - unwrapped.then(nested, environmentSupplier) - } else { - unwrapped.thenUnlessNextAwaits(nested, environmentSupplier) - } - } - - suspend fun unwrapSuspending(value: Any, environmentSupplier: Supplier): Any? { - val unwrapped = unwrap(value, environmentSupplier) - // the coroutine's future would complete with the future made below the outermost value, which graphql-java - // doesn't wait on. asDeferred, so cancelling the coroutine doesn't cancel a future the resolver returned - return if (nested != null && unwrapped is CompletionStage<*>) unwrapped.asDeferred().await() else unwrapped - } - - companion object { - fun create( - method: Method, - unwrapping: Unwrapping, - valueClass: Class<*>?, - isSuspendFunction: Boolean, - isSubscription: Boolean, - genericWrappers: List - ): ReturnValueUnwrapper { - val unwrapped = unwrapping.unwrapped - val outermost = unwrapped.firstOrNull() as? Unwrapped.Wrapper - val belowOutermost = if (outermost == null) unwrapped else unwrapped.drop(1) - val leafClass = TypeUtils.getRawType(unwrapping.javaType, null) - val specificLeafClass = leafClass?.takeUnless { it == Any::class.java } - val awaits = Awaitable(method, specificLeafClass, isSuspendFunction) - val peels = Awaitable(method, leafClass, isSuspendFunction) - // graphql-java completes a subscription's events one at a time - val nested = if (isSubscription) null else steps(belowOutermost, awaits, peels) - return ReturnValueUnwrapper(genericWrappers, Awaitable(method, valueClass, isSuspendFunction), outermost?.isFuture == true, nested) - } - } -} - -private sealed interface Step { - fun unwrap(value: Any?, environmentSupplier: Supplier): Any? -} - -private class Await(private val wrapper: GenericWrapper, private val awaitable: Awaitable, private val next: Step?) : Step { - override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = - awaitable.requireNested(value?.let { wrapper.transformer(it, environmentSupplier.get()) }).then(next, environmentSupplier) -} - -private class Peel(private val wrapper: GenericWrapper, private val awaitable: Awaitable, private val next: Step?) : Step { - override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? { - val transformed = value?.let { wrapper.transformer(it, environmentSupplier.get()) } - return if (next is Await && !wrapper.transformerReturnsCompletionStage) { - next.unwrap(transformed, environmentSupplier) - } else { - awaitable.requireNested(transformed).then(next, environmentSupplier) - } - } -} - -private class EachElement(private val element: Step) : Step { - override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = - if (value is Iterable<*>) value.map { element.unwrap(it, environmentSupplier) }.awaitAll() else value -} - -private class DataOf(private val data: Step) : Step { - @Suppress("UNCHECKED_CAST") - override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = - if (value is DataFetcherResult<*>) { - data.unwrap(value.data, environmentSupplier).then { unwrapped -> (value as DataFetcherResult).map { unwrapped } } - } else { - value - } -} - -private class ValueOf(private val present: Step?) : Step { - override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = when { - value !is Optional<*> -> value - present == null -> value.orElse(null) - else -> present.unwrap(value.orElse(null), environmentSupplier) - } -} - -private val Unwrapped.Wrapper.isFuture - get() = Future::class.java.isAssignableFrom(wrapper.type) || CompletionStage::class.java.isAssignableFrom(wrapper.type) - -private fun steps(unwrapped: List, awaits: Awaitable, peels: Awaitable): Step? { - val outermost = unwrapped.firstOrNull() ?: return null - val inner = unwrapped.subList(1, unwrapped.size) - val next = steps(inner, awaits, peels) - return when (outermost) { - is Unwrapped.Wrapper -> if (outermost.isFuture) Await(outermost.wrapper, awaits, next) else Peel(outermost.wrapper, peels, next) - Unwrapped.Data -> next?.let(::DataOf) - // graphql-java reads a DataFetcherResult and then an Optional in its data, so an Optional around one is ours to unwrap - Unwrapped.Present -> if (next != null || inner.firstOrNull() == Unwrapped.Data) ValueOf(next) else null - Unwrapped.Elements -> next?.let(::EachElement) - } -} - -private fun Any?.thenUnlessNextAwaits(next: Step?, environmentSupplier: Supplier): Any? = - if (next is Await) next.unwrap(this, environmentSupplier) else then(next, environmentSupplier) - -private fun Any?.then(next: Step?, environmentSupplier: Supplier): Any? = - if (next == null) this else then { next.unwrap(it, environmentSupplier) } - -private inline fun Any?.then(crossinline next: (Any?) -> Any?): Any? = - if (this is CompletionStage<*>) thenCompose { next(it).asCompletionStage() } else next(this) - -private fun List.awaitAll(): Any { - if (none { it is CompletionStage<*> }) { - return this - } - val futures = map { it.asCompletionStage().toCompletableFuture() } - return CompletableFuture.allOf(*futures.toTypedArray()).thenApply { futures.map { it.join() } } -} - -@Suppress("UNCHECKED_CAST") -private fun Any?.asCompletionStage(): CompletionStage = - this as? CompletionStage ?: CompletableFuture.completedFuture(this) - -private fun List.wrapperOf(value: Any): GenericWrapper? { - // the JIT doesn't optimize away the sequence below on this call path, so values that aren't wrappers, which is - // most of them, return before it's allocated - if (none { it.type.isInstance(value) }) { - return null - } - return asSequence() - .filter { it.type.isInstance(value) } - .sortedWith(CompareGenericWrappers) - .firstOrNull() -} - -// graphql-java only waits on a CompletionStage returned by a data fetcher, so any other future, or a future -// that a suspend function completes with, would reach it as the field value -private class Awaitable(private val method: Method, private val valueClass: Class<*>?, private val isSuspendFunction: Boolean) { - - fun requireOutermost(value: Any?): Any? = - if (value !is Future<*> || valueClass?.isInstance(value) == true || value is CompletionStage<*> && !isSuspendFunction) value else fail(value) - - fun requireNested(value: Any?): Any? = - if (value !is Future<*> || value is CompletionStage<*> || valueClass?.isInstance(value) == true) value else fail(value) - - private fun fail(value: Any): Nothing = throw ResolverError( - if (isSuspendFunction) { - "Suspend function '${method.resolverName}' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. Return its value instead." - } else { - "Resolver method '${method.resolverName}' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. " + - "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead." - } - ) -} - -private val Method.resolverName - get() = "${declaringClass.name}.$name" - -private class CompareGenericWrappers { - companion object : Comparator { - override fun compare(w1: GenericWrapper, w2: GenericWrapper): Int = when { - w1.type.isAssignableFrom(w2.type) -> 1 - else -> -1 - } - } -} diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt new file mode 100644 index 00000000..4a5a0b38 --- /dev/null +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -0,0 +1,433 @@ +package graphql.kickstart.tools.resolver + +import com.fasterxml.classmate.ResolvedType +import graphql.execution.DataFetcherResult +import graphql.kickstart.tools.ResolverError +import graphql.kickstart.tools.ScanDictionary +import graphql.kickstart.tools.SchemaClassScannerError +import graphql.kickstart.tools.SchemaParserOptions +import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper +import graphql.kickstart.tools.util.GraphQLLangType +import graphql.kickstart.tools.util.JavaType +import graphql.kickstart.tools.util.ParameterizedTypeImpl +import graphql.kickstart.tools.util.Primitives +import graphql.kickstart.tools.util.futureValueType +import graphql.kickstart.tools.util.isSubtypeOf +import graphql.kickstart.tools.util.typeArgument +import graphql.language.ListType +import graphql.language.NonNullType +import graphql.schema.DataFetchingEnvironment +import graphql.schema.idl.TypeUtil +import kotlinx.coroutines.future.asDeferred +import org.apache.commons.lang3.reflect.TypeUtils +import org.reactivestreams.Publisher +import java.lang.reflect.Method +import java.lang.reflect.ParameterizedType +import java.lang.reflect.TypeVariable +import java.lang.reflect.WildcardType +import java.util.* +import java.util.concurrent.CompletableFuture +import java.util.concurrent.CompletionStage +import java.util.concurrent.Future +import java.util.function.Supplier + +/** + * A declared Java type walked once against the GraphQL type it resolves. The walk yields the leaf that the dictionary binds the + * GraphQL type's name to, together with the layers that a resolver's value is unwrapped through, so the two can't disagree. + */ +internal class TypeShape private constructor( + private val graphQLType: GraphQLLangType, + private val javaType: JavaType, + val reference: ScanDictionary.Reference, + val leafGraphQLType: GraphQLLangType, + val leafJavaType: JavaType, + private val layers: List, + private val declaredType: JavaType, + private val outermostType: JavaType, + private val isSubscription: Boolean, + private val wrappers: GenericWrappers +) { + + fun error(msg: String) = matchError(graphQLType, reference, javaType, msg) + + /** What a resolver method's value of a return type becomes before graphql-java gets it. */ + class Unwrapper(shape: TypeShape, method: Method, isSuspendFunction: Boolean) { + private val wrappers = shape.wrappers + private val awaitable: Awaitable + private val isOutermostFuture: Boolean + private val nested: Step? + + init { + // the class the return type unwraps to, so a value that happens to implement Future isn't mistaken for a wrapper. + // Object (e.g. for a union) can't tell them apart, so then every future of a method whose return type is Future is checked + val valueClass = (TypeUtils.getRawType(shape.outermostType, null) ?: Any::class.java) + .takeUnless { it == Any::class.java && TypeUtils.getRawType(shape.declaredType, null) == Future::class.java } + awaitable = Awaitable(method, valueClass, isSuspendFunction) + val outermost = shape.layers.firstOrNull() as? Layer.Wrapper + val belowOutermost = if (outermost == null) shape.layers else shape.layers.drop(1) + val leafClass = TypeUtils.getRawType(shape.leafJavaType, null) + val awaits = Awaitable(method, leafClass?.takeUnless { it == Any::class.java }, isSuspendFunction) + val peels = Awaitable(method, leafClass, isSuspendFunction) + isOutermostFuture = outermost?.isFuture == true + // graphql-java completes a subscription's events one at a time + nested = if (shape.isSubscription) null else steps(belowOutermost, awaits, peels) + } + + fun unwrap(value: Any, environmentSupplier: Supplier): Any? { + val wrapper = wrappers.of(value) + val transformed = if (wrapper == null) value else wrapper.transformer(value, environmentSupplier.get()) + val unwrapped = awaitable.requireOutermost(transformed) + return if (isOutermostFuture || wrapper?.transformerReturnsCompletionStage == true) { + unwrapped.then(nested, environmentSupplier) + } else { + unwrapped.thenUnlessNextAwaits(nested, environmentSupplier) + } + } + + suspend fun unwrapSuspending(value: Any, environmentSupplier: Supplier): Any? { + val unwrapped = unwrap(value, environmentSupplier) + // the coroutine's future would complete with the future made below the outermost value, which graphql-java + // doesn't wait on. asDeferred, so cancelling the coroutine doesn't cancel a future the resolver returned + return if (nested != null && unwrapped is CompletionStage<*>) unwrapped.asDeferred().await() else unwrapped + } + } + + companion object { + fun returnType( + graphQLType: GraphQLLangType, + declaredType: JavaType, + isSubscription: Boolean, + containingType: JavaType, + options: SchemaParserOptions, + reference: ScanDictionary.Reference + ): TypeShape { + val javaType = if (isSubscription) declaredType.asPublisher() else declaredType + val walk = Walk(graphQLType, javaType, containingType, GenericWrappers(options.genericWrappers), reference, Position.RETURN_TYPE) + val (leafGraphQLType, leafJavaType) = walk.leaf() + return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, declaredType, walk.outermostType, isSubscription, walk.wrappers) + } + + fun parameterType( + graphQLType: GraphQLLangType, + javaType: JavaType, + containingType: JavaType, + options: SchemaParserOptions, + reference: ScanDictionary.Reference + ): TypeShape { + val walk = Walk(graphQLType, javaType, containingType, GenericWrappers(options.genericWrappers), reference, Position.PARAMETER_TYPE) + val (leafGraphQLType, leafJavaType) = walk.leaf() + return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, javaType, walk.outermostType, false, walk.wrappers) + } + } +} + +/** + * Resolves the type variables in a type as declared in the source (a method's return or parameter type, or a field's type) + * relative to the containing type, e.g. `T` of `AbstractItem.getId()` becomes `Long` for `class Item : AbstractItem()`. + * Generic wrappers, wildcards and primitives stay as they are. + */ +internal fun resolveTypeVariables(type: JavaType, containingType: JavaType, resolving: Set> = emptySet()): JavaType { + return when (type) { + is ParameterizedType -> { + val actualTypeArguments = type.actualTypeArguments.map { resolveTypeVariables(it, containingType, resolving) }.toTypedArray() + ParameterizedTypeImpl(type.rawType as Class<*>, actualTypeArguments, type.ownerType?.let { resolveTypeVariables(it, containingType, resolving) }) + } + is WildcardType -> TypeUtils.wildcardType() + .withUpperBounds(*type.upperBounds.map { resolveTypeVariables(it, containingType, resolving) }.toTypedArray()) + .withLowerBounds(*type.lowerBounds.map { resolveTypeVariables(it, containingType, resolving) }.toTypedArray()) + .build() + is ResolvedType -> { + if (type.typeParameters.isEmpty()) { + type.erasedType + } else { + val actualTypeArguments = type.typeParameters.map { resolveTypeVariables(it, containingType) }.toTypedArray() + ParameterizedTypeImpl(type.erasedType, actualTypeArguments, null) + } + } + is TypeVariable<*> -> { + val genericDeclaration = type.genericDeclaration + when { + // only a variable leaked from a raw type can be bound to a type containing itself (e.g. T -> List), + // erase it like the raw type does instead of expanding it forever + type in resolving -> TypeUtils.getRawType(type.bounds.first(), null) ?: Any::class.java + // the containing type binds the variables of all its supertypes + genericDeclaration is Class<*> -> generateSequence(containingType) { (it as? ParameterizedType)?.ownerType } + // an inner class can also use the variables of its outer class, those are bound by its owner type (e.g. Connection.Entry) + .firstNotNullOfOrNull { TypeUtils.getTypeArguments(it, genericDeclaration)?.get(type) } + // keep the full type argument (e.g. List) rather than its raw class so nested generics aren't lost + ?.let { resolveTypeVariables(it, containingType, resolving + type) } + ?: type + else -> type + } + } + else -> type + } +} + +private enum class Position { + RETURN_TYPE, + PARAMETER_TYPE, +} + +private class Walk( + private val graphQLType: GraphQLLangType, + private val javaType: JavaType, + private val containingType: JavaType, + val wrappers: GenericWrappers, + private val reference: ScanDictionary.Reference, + private val position: Position +) { + val layers = mutableListOf() + + /** The type once the generic wrappers around it are stripped. */ + lateinit var outermostType: JavaType + private set + + fun leaf(): Pair = walk(graphQLType, javaType, root = true) + + private fun walk(graphQLType: GraphQLLangType, javaType: JavaType, root: Boolean): Pair { + var realType = stripWrappers(javaType) + if (root) { + outermostType = realType + } + val contained = mutableSetOf() + + while (true) { + val type = realType as? ParameterizedType ?: break + val kind = ContainerKind.entries.find { type.isSubtypeOf(it.type) } ?: break + kind.misplaced(position, root)?.let { throw mismatch(it) } + if (!contained.add(kind)) { + throw mismatch("${kind.type.name} cannot be nested within itself") + } + layers += kind + realType = stripWrappers(type.actualTypeArguments.first()) + } + + return when (graphQLType) { + is NonNullType -> { + contained.find { !it.canBeNonNull }?.let { throw mismatch("graphql type is marked as nonnull but ${it.type.name} was used") } + walk(graphQLType.type, realType, root = false) + } + + is ListType -> when { + realType is ParameterizedType && realType.isSubtypeOf(Iterable::class.java) -> { + layers += Layer.Elements + walk(graphQLType.type, realType.actualTypeArguments.first(), root = false) + } + realType is Class<*> && realType.isArray -> + walk(graphQLType.type, realType.componentType, root = false) + // e.g. a property map value: the element type is unknown, so match it as Object too + realType == Any::class.java -> + walk(graphQLType.type, realType, root = false) + else -> + throw mismatch("Java class is not a List or generic type information was lost: $realType") + } + + else -> graphQLType to realType + } + } + + /** + * Turns a type as declared into the type the GraphQL type is matched against: + * - type variables are resolved relative to the containing type + * - generic wrappers are replaced by their wrapped type, e.g. `CompletableFuture` becomes `Foo` + * - wildcards are replaced by their upper bound, e.g. `? extends Foo` becomes `Foo` + * - primitives are replaced by their boxed class, e.g. `int` becomes `Integer` + */ + private fun stripWrappers(javaType: JavaType): JavaType { + return when (val type = resolveTypeVariables(javaType, containingType)) { + is ParameterizedType -> { + val wrapper = wrappers.declaredBy(type) ?: return type + + val typeArguments = type.actualTypeArguments + if (typeArguments.size <= wrapper.index) { + throw IndexOutOfBoundsException("Generic type '${TypeUtils.toString(type)}' does not have a type argument at index ${wrapper.index}!") + } + + layers += Layer.Wrapper(wrapper) + stripWrappers(wrapper.schemaWrapper.invoke(typeArguments[wrapper.index])) + } + is TypeVariable<*> -> error("Could not resolve type variable '${TypeUtils.toLongString(type)}' relative to ${TypeUtils.toString(containingType)}") + // Kotlin reflection gives a suspend function returning List the type List when Foo is open. + // A type variable bound stays as it is, since a method's own variable can't be resolved and a scalar doesn't need it + is WildcardType -> when (val bound = type.upperBounds.firstOrNull() ?: error("Unable to unwrap type, wildcard has no upper bound: $type")) { + is ParameterizedType -> stripWrappers(bound) + else -> bound + } + is Class<*> -> if (type.isPrimitive) Primitives.wrap(type) else type + else -> error("Unable to unwrap type: $type") + } + } + + private fun mismatch(msg: String) = matchError(graphQLType, reference, javaType, msg) +} + +private fun matchError(graphQLType: GraphQLLangType, reference: ScanDictionary.Reference, javaType: JavaType, msg: String) = + SchemaClassScannerError("Unable to match type definition (${TypeUtil.simplePrint(graphQLType)}) for reference $reference with java type ($javaType): $msg") + +// generic wrappers only match their exact type, so a Publisher implementation (e.g. Flux), or a future of one, +// is matched as a plain Publisher of its events +private fun JavaType.asPublisher(): JavaType = + (futureValueType() ?: this).typeArgument(Publisher::class.java) + ?.let { TypeUtils.parameterize(Publisher::class.java, it) } + ?: this + +/** + * The generic wrappers, picked two ways. A declared type is unwrapped by the first wrapper registered for exactly its raw type, + * so a Flux isn't unwrapped by a Publisher wrapper. A value is transformed by the most specific wrapper it's an instance of, + * so a CompletableFuture returned for a declared Future gets a CompletableFuture wrapper. + */ +private class GenericWrappers(private val wrappers: List) { + + fun declaredBy(type: ParameterizedType): GenericWrapper? = wrappers.find { it.type == type.rawType } + + fun of(value: Any): GenericWrapper? { + // the JIT doesn't optimize away the sequence below on this call path, so values that aren't wrappers, which is + // most of them, return before it's allocated + if (wrappers.none { it.type.isInstance(value) }) { + return null + } + return wrappers.asSequence() + .filter { it.type.isInstance(value) } + .sortedWith(CompareGenericWrappers) + .firstOrNull() + } +} + +private class CompareGenericWrappers { + companion object : Comparator { + override fun compare(w1: GenericWrapper, w2: GenericWrapper): Int = when { + w1.type.isAssignableFrom(w2.type) -> 1 + else -> -1 + } + } +} + +private sealed interface Layer { + class Wrapper(val wrapper: GenericWrapper) : Layer { + val isFuture get() = Future::class.java.isAssignableFrom(wrapper.type) || CompletionStage::class.java.isAssignableFrom(wrapper.type) + } + + object Elements : Layer +} + +/** The containers graphql-java knows by class, peeled from a type in any order below its generic wrappers. */ +private enum class ContainerKind(val type: Class<*>, val canBeNonNull: Boolean) : Layer { + DATA_FETCHER_RESULT(DataFetcherResult::class.java, canBeNonNull = true) { + override fun misplaced(position: Position, root: Boolean) = + if (position != Position.RETURN_TYPE) "${type.name} can only be used as a return type" else null + + override fun step(next: Step?, inner: Layer?): Step? = next?.let(::DataOf) + }, + OPTIONAL(Optional::class.java, canBeNonNull = false) { + override fun misplaced(position: Position, root: Boolean) = + if (position == Position.RETURN_TYPE && !root) "${type.name} can only be used at the top level of a return type" else null + + // graphql-java reads a DataFetcherResult and then an Optional in its data, so an Optional around one is ours to unwrap + override fun step(next: Step?, inner: Layer?): Step? = if (next != null || inner == DATA_FETCHER_RESULT) ValueOf(next) else null + }; + + /** Why this container can't be at this place in a type, or null when it can. */ + abstract fun misplaced(position: Position, root: Boolean): String? + + /** What happens to a value of this container, given the step for what it holds. null leaves the value to graphql-java. */ + abstract fun step(next: Step?, inner: Layer?): Step? +} + +private fun steps(layers: List, awaits: Awaitable, peels: Awaitable): Step? { + val outermost = layers.firstOrNull() ?: return null + val inner = layers.subList(1, layers.size) + val next = steps(inner, awaits, peels) + return when (outermost) { + is Layer.Wrapper -> if (outermost.isFuture) Await(outermost.wrapper, awaits, next) else Peel(outermost.wrapper, peels, next) + is ContainerKind -> outermost.step(next, inner.firstOrNull()) + Layer.Elements -> next?.let(::EachElement) + } +} + +private sealed interface Step { + fun unwrap(value: Any?, environmentSupplier: Supplier): Any? +} + +private class Await(private val wrapper: GenericWrapper, private val awaitable: Awaitable, private val next: Step?) : Step { + override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = + awaitable.requireNested(value?.let { wrapper.transformer(it, environmentSupplier.get()) }).then(next, environmentSupplier) +} + +private class Peel(private val wrapper: GenericWrapper, private val awaitable: Awaitable, private val next: Step?) : Step { + override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? { + val transformed = value?.let { wrapper.transformer(it, environmentSupplier.get()) } + return if (next is Await && !wrapper.transformerReturnsCompletionStage) { + next.unwrap(transformed, environmentSupplier) + } else { + awaitable.requireNested(transformed).then(next, environmentSupplier) + } + } +} + +private class EachElement(private val element: Step) : Step { + override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = + if (value is Iterable<*>) value.map { element.unwrap(it, environmentSupplier) }.awaitAll() else value +} + +private class DataOf(private val data: Step) : Step { + @Suppress("UNCHECKED_CAST") + override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = + if (value is DataFetcherResult<*>) { + data.unwrap(value.data, environmentSupplier).then { unwrapped -> (value as DataFetcherResult).map { unwrapped } } + } else { + value + } +} + +private class ValueOf(private val present: Step?) : Step { + override fun unwrap(value: Any?, environmentSupplier: Supplier): Any? = when { + value !is Optional<*> -> value + present == null -> value.orElse(null) + else -> present.unwrap(value.orElse(null), environmentSupplier) + } +} + +private fun Any?.thenUnlessNextAwaits(next: Step?, environmentSupplier: Supplier): Any? = + if (next is Await) next.unwrap(this, environmentSupplier) else then(next, environmentSupplier) + +private fun Any?.then(next: Step?, environmentSupplier: Supplier): Any? = + if (next == null) this else then { next.unwrap(it, environmentSupplier) } + +private inline fun Any?.then(crossinline next: (Any?) -> Any?): Any? = + if (this is CompletionStage<*>) thenCompose { next(it).asCompletionStage() } else next(this) + +private fun List.awaitAll(): Any { + if (none { it is CompletionStage<*> }) { + return this + } + val futures = map { it.asCompletionStage().toCompletableFuture() } + return CompletableFuture.allOf(*futures.toTypedArray()).thenApply { futures.map { it.join() } } +} + +@Suppress("UNCHECKED_CAST") +private fun Any?.asCompletionStage(): CompletionStage = + this as? CompletionStage ?: CompletableFuture.completedFuture(this) + +// graphql-java only waits on a CompletionStage returned by a data fetcher, so any other future, or a future +// that a suspend function completes with, would reach it as the field value +private class Awaitable(private val method: Method, private val valueClass: Class<*>?, private val isSuspendFunction: Boolean) { + + fun requireOutermost(value: Any?): Any? = + if (value !is Future<*> || valueClass?.isInstance(value) == true || value is CompletionStage<*> && !isSuspendFunction) value else fail(value) + + fun requireNested(value: Any?): Any? = + if (value !is Future<*> || value is CompletionStage<*> || valueClass?.isInstance(value) == true) value else fail(value) + + private fun fail(value: Any): Nothing = throw ResolverError( + if (isSuspendFunction) { + "Suspend function '${method.resolverName}' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. Return its value instead." + } else { + "Resolver method '${method.resolverName}' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. " + + "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead." + } + ) +} + +private val Method.resolverName + get() = "${declaringClass.name}.$name" diff --git a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt index d289a380..d7180ce3 100644 --- a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt @@ -9,7 +9,7 @@ import graphql.execution.DataFetcherResult import graphql.Scalars import graphql.execution.DefaultValueUnboxer import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper -import graphql.kickstart.tools.resolver.ReturnValueUnwrapper +import graphql.kickstart.tools.resolver.TypeShape import graphql.kickstart.tools.util.ParameterizedTypeImpl import graphql.kickstart.tools.util.unwrap import graphql.language.AstPrinter @@ -228,7 +228,6 @@ class NestedGenericWrapperTest { @Test fun `resolves every return type the matcher accepts`() { val options = SchemaParserOptions.newOptions().genericWrappers(tryWrapper, pageWrapper).build() - val typeResolver = GenericTypeResolver(Query::class.java, options) val matcher = TypeClassMatcher(mapOf("Payload" to ObjectTypeDefinition("Payload"), "Leaf" to ScalarTypeDefinition("Leaf"))) val method = Query::class.java.getMethod("listOfWrapped") val graphQLTypes = listOf(TypeName("Payload"), TypeName("Leaf")).flatMap { listOf(it, NonNullType(it), ListType(it), NonNullType(ListType(NonNullType(it))), ListType(ListType(it))) } @@ -238,23 +237,20 @@ class NestedGenericWrapperTest { val accepted = graphQLTypes.flatMap { graphQLType -> val shapesOfTheSameListDepth = shapes.filter { shape -> shape.count { it == List::class.java || it == Page::class.java } == graphQLType.listDepth() } shapesOfTheSameListDepth.flatMap { shape -> listOf(false, true).map { shape to javaType(shape, leaf(graphQLType).javaClass, wildcardElements = it) } }.mapNotNull { (shape, javaType) -> - val potentialMatch = TypeClassMatcher.PotentialMatch.returnValue(graphQLType, javaType, typeResolver, ScanDictionary.ReturnValueReference(method)) try { - matcher.match(potentialMatch) - shape to potentialMatch + val typeShape = TypeShape.returnType(graphQLType, javaType, isSubscription = false, Query::class.java, options, ScanDictionary.ReturnValueReference(method)) + matcher.match(typeShape) + Accepted(shape, graphQLType, javaType, typeShape) } catch (e: SchemaClassScannerError) { null } } } - val failures = accepted.mapNotNull { (shape, potentialMatch) -> - val graphQLType = potentialMatch.graphQLType - if (potentialMatch.unwrapping.javaType != leaf(graphQLType).javaClass) { - return@mapNotNull "${TypeUtils.toString(potentialMatch.javaType)} as ${AstPrinter.printAst(graphQLType)}: bound to ${TypeUtils.toString(potentialMatch.unwrapping.javaType)}" + val failures = accepted.mapNotNull { (shape, graphQLType, javaType, typeShape) -> + if (typeShape.leafJavaType != leaf(graphQLType).javaClass) { + return@mapNotNull "${TypeUtils.toString(javaType)} as ${AstPrinter.printAst(graphQLType)}: bound to ${TypeUtils.toString(typeShape.leafJavaType)}" } - val unwrapper = ReturnValueUnwrapper.create( - method, potentialMatch.unwrapping, TypeUtils.getRawType(typeResolver.resolve(potentialMatch.javaType), null), isSuspendFunction = false, isSubscription = false, options.genericWrappers - ) + val unwrapper = TypeShape.Unwrapper(typeShape, method, isSuspendFunction = false) val value = value(shape, leaf(graphQLType)) val result = GraphQL.newGraphQL(fieldSchema(graphQLType) { environment -> unwrapper.unwrap(value) { environment } }).build() .execute(if (leaf(graphQLType) is Payload) "query { field { data } }" else "query { field }") @@ -263,16 +259,17 @@ class NestedGenericWrapperTest { } else { result.errors.isEmpty() && result.getData() == mapOf("field" to expected(graphQLType)) } - "${TypeUtils.toString(potentialMatch.javaType)} as ${AstPrinter.printAst(graphQLType)}: ${result.errors.map { it.message }} ${result.getData()}".takeUnless { resolved } + "${TypeUtils.toString(javaType)} as ${AstPrinter.printAst(graphQLType)}: ${result.errors.map { it.message }} ${result.getData()}".takeUnless { resolved } } - assertTrue(accepted.count { (_, potentialMatch) -> leaf(potentialMatch.graphQLType) is FutureLeaf } > graphQLTypes.size) + assertTrue(accepted.count { leaf(it.graphQLType) is FutureLeaf } > graphQLTypes.size) assertEquals(failures, listOf()) } + private data class Accepted(val shape: List>, val graphQLType: Type<*>, val javaType: java.lang.reflect.Type, val typeShape: TypeShape) + @Test fun `rejects a DataFetcherResult or an Optional twice in one value`() { - val typeResolver = GenericTypeResolver(Query::class.java, SchemaParserOptions.newOptions().build()) val matcher = TypeClassMatcher(mapOf("Payload" to ObjectTypeDefinition("Payload"))) val method = Query::class.java.getMethod("listOfWrapped") val result = DataFetcherResult::class.java @@ -284,9 +281,9 @@ class NestedGenericWrapperTest { ) val messages = rejections.map { (shape, _) -> - val potentialMatch = TypeClassMatcher.PotentialMatch.returnValue(TypeName("Payload"), javaType(shape, Payload::class.java, wildcardElements = false), typeResolver, ScanDictionary.ReturnValueReference(method)) try { - matcher.match(potentialMatch) + val javaType = javaType(shape, Payload::class.java, wildcardElements = false) + matcher.match(TypeShape.returnType(TypeName("Payload"), javaType, isSubscription = false, Query::class.java, SchemaParserOptions.newOptions().build(), ScanDictionary.ReturnValueReference(method))) "accepted" } catch (e: SchemaClassScannerError) { e.message.orEmpty().substringAfterLast("): ") diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt index 06868a81..38e1e908 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt @@ -50,11 +50,9 @@ class TypeClassMatcherTest { private val scanner: FieldResolverScanner = FieldResolverScanner(options, GRAPHQL_SCALARS.keys) private val resolver = RootResolverInfo(listOf(QueryMethods()), options) - private fun createPotentialMatch(methodName: String, graphQLType: Type<*>): TypeClassMatcher.PotentialMatch { - return scanner.findFieldResolver(FieldDefinition(methodName, graphQLType), resolver) - .scanForMatches() - .find { it.location == TypeClassMatcher.Location.RETURN_TYPE }!! - } + // a method without parameters only has its return type to match + private fun matchReturnType(methodName: String, graphQLType: Type<*>): TypeClassMatcher.Match = + matcher.match(scanner.findFieldResolver(FieldDefinition(methodName, graphQLType), resolver).scanForMatches().single()) private fun list(other: Type<*> = customType): Type<*> = ListType(other) private fun nonNull(other: Type<*> = customType): Type<*> = NonNullType(other) @@ -65,7 +63,7 @@ class TypeClassMatcherTest { @Test fun `matcher verifies that nested return type matches graphql definition for method`() { - val match = matcher.match(createPotentialMatch(methodName, type)) + val match = matchReturnType(methodName, type) match as TypeClassMatcher.ValidMatch assertEquals(match.type, customDefinition) assertEquals(match.javaType, CustomType::class.java) @@ -100,7 +98,7 @@ class TypeClassMatcherTest { @Test(expected = SchemaClassScannerError::class) fun `matcher verifies that nested return type doesn't match graphql definition for method`() { - matcher.match(createPotentialMatch(methodName, type)) + matchReturnType(methodName, type) } companion object { @@ -120,7 +118,7 @@ class TypeClassMatcherTest { @Test(expected = SchemaClassScannerError::class) fun `matcher verifies return value optionals are used incorrectly for method`() { - matcher.match(createPotentialMatch(methodName, type)) + matchReturnType(methodName, type) } companion object { @@ -139,7 +137,7 @@ class TypeClassMatcherTest { class Suit4 { @Test fun `matcher allows unwrapped parameterized types as root types`() { - val match = matcher.match(createPotentialMatch("genericCustomUnwrappedType", unwrappedCustomType)) + val match = matchReturnType("genericCustomUnwrappedType", unwrappedCustomType) match as TypeClassMatcher.ValidMatch assertEquals(match.type, unwrappedCustomDefinition) val javatype = match.javaType as ParameterizedTypeImpl From 6d41328d68e104a18c1f2b9246f93a7a4caacbfd Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 17:45:38 -0500 Subject: [PATCH 46/64] Name TypeShape's helpers for what they return and add its rule table row Rename stripWrappers to matchedType, outermostType to unwrappedRootType and misplaced to placementError, and drop the comments the names now cover. The rule table names TypeShape as what keeps a method's return value matched and unwrapped by one rule. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- .../tools/resolver/MethodFieldResolver.kt | 4 +- .../kickstart/tools/resolver/TypeShape.kt | 70 +++++++------------ .../kickstart/tools/TypeClassMatcherTest.kt | 1 - 4 files changed, 26 insertions(+), 51 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e6f2005d..7a2c97a1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,7 +90,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| -| A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | docs only | +| A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers the data fetcher unwraps. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists exactly today's property and Map gaps as known findings, and fails when one is fixed until it's removed, or when a new failure would hide under one | | One output has one builder. Don't add a second path that builds the same thing | docs only | diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt index df9b1962..63fc38e2 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt @@ -155,9 +155,7 @@ internal class MethodFieldResolver( } catch (e: InternalError) { method.genericReturnType } - // with type variables resolved, e.g. Future for get(): T in a subclass of Base> - val returnType = resolveTypeVariables(declaredType, search.type) - TypeShape.returnType(field.type, returnType, search.isSubscription, search.type, options, ScanDictionary.ReturnValueReference(method)) + TypeShape.returnType(field.type, resolveTypeVariables(declaredType, search.type), search.isSubscription, search.type, options, ScanDictionary.ReturnValueReference(method)) } private fun getJavaMethodParameterIndex(index: Int) = index + search.firstArgumentIndex diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index 4a5a0b38..97a732aa 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -31,10 +31,7 @@ import java.util.concurrent.CompletionStage import java.util.concurrent.Future import java.util.function.Supplier -/** - * A declared Java type walked once against the GraphQL type it resolves. The walk yields the leaf that the dictionary binds the - * GraphQL type's name to, together with the layers that a resolver's value is unwrapped through, so the two can't disagree. - */ +// the leaf the dictionary binds and the layers a value is unwrapped through come from one walk, so they can't disagree internal class TypeShape private constructor( private val graphQLType: GraphQLLangType, private val javaType: JavaType, @@ -43,14 +40,13 @@ internal class TypeShape private constructor( val leafJavaType: JavaType, private val layers: List, private val declaredType: JavaType, - private val outermostType: JavaType, + private val unwrappedRootType: JavaType, private val isSubscription: Boolean, private val wrappers: GenericWrappers ) { fun error(msg: String) = matchError(graphQLType, reference, javaType, msg) - /** What a resolver method's value of a return type becomes before graphql-java gets it. */ class Unwrapper(shape: TypeShape, method: Method, isSuspendFunction: Boolean) { private val wrappers = shape.wrappers private val awaitable: Awaitable @@ -60,7 +56,7 @@ internal class TypeShape private constructor( init { // the class the return type unwraps to, so a value that happens to implement Future isn't mistaken for a wrapper. // Object (e.g. for a union) can't tell them apart, so then every future of a method whose return type is Future is checked - val valueClass = (TypeUtils.getRawType(shape.outermostType, null) ?: Any::class.java) + val valueClass = (TypeUtils.getRawType(shape.unwrappedRootType, null) ?: Any::class.java) .takeUnless { it == Any::class.java && TypeUtils.getRawType(shape.declaredType, null) == Future::class.java } awaitable = Awaitable(method, valueClass, isSuspendFunction) val outermost = shape.layers.firstOrNull() as? Layer.Wrapper @@ -74,7 +70,7 @@ internal class TypeShape private constructor( } fun unwrap(value: Any, environmentSupplier: Supplier): Any? { - val wrapper = wrappers.of(value) + val wrapper = wrappers.ofValue(value) val transformed = if (wrapper == null) value else wrapper.transformer(value, environmentSupplier.get()) val unwrapped = awaitable.requireOutermost(transformed) return if (isOutermostFuture || wrapper?.transformerReturnsCompletionStage == true) { @@ -104,7 +100,7 @@ internal class TypeShape private constructor( val javaType = if (isSubscription) declaredType.asPublisher() else declaredType val walk = Walk(graphQLType, javaType, containingType, GenericWrappers(options.genericWrappers), reference, Position.RETURN_TYPE) val (leafGraphQLType, leafJavaType) = walk.leaf() - return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, declaredType, walk.outermostType, isSubscription, walk.wrappers) + return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, declaredType, walk.unwrappedRootType, isSubscription, walk.wrappers) } fun parameterType( @@ -116,16 +112,12 @@ internal class TypeShape private constructor( ): TypeShape { val walk = Walk(graphQLType, javaType, containingType, GenericWrappers(options.genericWrappers), reference, Position.PARAMETER_TYPE) val (leafGraphQLType, leafJavaType) = walk.leaf() - return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, javaType, walk.outermostType, false, walk.wrappers) + return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, javaType, walk.unwrappedRootType, false, walk.wrappers) } } } -/** - * Resolves the type variables in a type as declared in the source (a method's return or parameter type, or a field's type) - * relative to the containing type, e.g. `T` of `AbstractItem.getId()` becomes `Long` for `class Item : AbstractItem()`. - * Generic wrappers, wildcards and primitives stay as they are. - */ +// unlike the walk, keeps generic wrappers, wildcards and primitives, which argument conversion needs internal fun resolveTypeVariables(type: JavaType, containingType: JavaType, resolving: Set> = emptySet()): JavaType { return when (type) { is ParameterizedType -> { @@ -150,7 +142,6 @@ internal fun resolveTypeVariables(type: JavaType, containingType: JavaType, reso // only a variable leaked from a raw type can be bound to a type containing itself (e.g. T -> List), // erase it like the raw type does instead of expanding it forever type in resolving -> TypeUtils.getRawType(type.bounds.first(), null) ?: Any::class.java - // the containing type binds the variables of all its supertypes genericDeclaration is Class<*> -> generateSequence(containingType) { (it as? ParameterizedType)?.ownerType } // an inner class can also use the variables of its outer class, those are bound by its owner type (e.g. Connection.Entry) .firstNotNullOfOrNull { TypeUtils.getTypeArguments(it, genericDeclaration)?.get(type) } @@ -179,28 +170,27 @@ private class Walk( ) { val layers = mutableListOf() - /** The type once the generic wrappers around it are stripped. */ - lateinit var outermostType: JavaType + lateinit var unwrappedRootType: JavaType private set fun leaf(): Pair = walk(graphQLType, javaType, root = true) private fun walk(graphQLType: GraphQLLangType, javaType: JavaType, root: Boolean): Pair { - var realType = stripWrappers(javaType) + var realType = matchedType(javaType) if (root) { - outermostType = realType + unwrappedRootType = realType } val contained = mutableSetOf() while (true) { val type = realType as? ParameterizedType ?: break val kind = ContainerKind.entries.find { type.isSubtypeOf(it.type) } ?: break - kind.misplaced(position, root)?.let { throw mismatch(it) } + kind.placementError(position, root)?.let { throw mismatch(it) } if (!contained.add(kind)) { throw mismatch("${kind.type.name} cannot be nested within itself") } layers += kind - realType = stripWrappers(type.actualTypeArguments.first()) + realType = matchedType(type.actualTypeArguments.first()) } return when (graphQLType) { @@ -227,17 +217,10 @@ private class Walk( } } - /** - * Turns a type as declared into the type the GraphQL type is matched against: - * - type variables are resolved relative to the containing type - * - generic wrappers are replaced by their wrapped type, e.g. `CompletableFuture` becomes `Foo` - * - wildcards are replaced by their upper bound, e.g. `? extends Foo` becomes `Foo` - * - primitives are replaced by their boxed class, e.g. `int` becomes `Integer` - */ - private fun stripWrappers(javaType: JavaType): JavaType { + private fun matchedType(javaType: JavaType): JavaType { return when (val type = resolveTypeVariables(javaType, containingType)) { is ParameterizedType -> { - val wrapper = wrappers.declaredBy(type) ?: return type + val wrapper = wrappers.ofDeclaredType(type) ?: return type val typeArguments = type.actualTypeArguments if (typeArguments.size <= wrapper.index) { @@ -245,13 +228,13 @@ private class Walk( } layers += Layer.Wrapper(wrapper) - stripWrappers(wrapper.schemaWrapper.invoke(typeArguments[wrapper.index])) + matchedType(wrapper.schemaWrapper.invoke(typeArguments[wrapper.index])) } is TypeVariable<*> -> error("Could not resolve type variable '${TypeUtils.toLongString(type)}' relative to ${TypeUtils.toString(containingType)}") // Kotlin reflection gives a suspend function returning List the type List when Foo is open. // A type variable bound stays as it is, since a method's own variable can't be resolved and a scalar doesn't need it is WildcardType -> when (val bound = type.upperBounds.firstOrNull() ?: error("Unable to unwrap type, wildcard has no upper bound: $type")) { - is ParameterizedType -> stripWrappers(bound) + is ParameterizedType -> matchedType(bound) else -> bound } is Class<*> -> if (type.isPrimitive) Primitives.wrap(type) else type @@ -272,16 +255,13 @@ private fun JavaType.asPublisher(): JavaType = ?.let { TypeUtils.parameterize(Publisher::class.java, it) } ?: this -/** - * The generic wrappers, picked two ways. A declared type is unwrapped by the first wrapper registered for exactly its raw type, - * so a Flux isn't unwrapped by a Publisher wrapper. A value is transformed by the most specific wrapper it's an instance of, - * so a CompletableFuture returned for a declared Future gets a CompletableFuture wrapper. - */ +// The two rules differ on purpose: making the build pick by instance would unwrap a Flux as a Publisher, and making the fetch +// pick by declared type would stop a CompletableFuture returned for a declared Future from getting its own wrapper private class GenericWrappers(private val wrappers: List) { - fun declaredBy(type: ParameterizedType): GenericWrapper? = wrappers.find { it.type == type.rawType } + fun ofDeclaredType(type: ParameterizedType): GenericWrapper? = wrappers.find { it.type == type.rawType } - fun of(value: Any): GenericWrapper? { + fun ofValue(value: Any): GenericWrapper? { // the JIT doesn't optimize away the sequence below on this call path, so values that aren't wrappers, which is // most of them, return before it's allocated if (wrappers.none { it.type.isInstance(value) }) { @@ -311,26 +291,24 @@ private sealed interface Layer { object Elements : Layer } -/** The containers graphql-java knows by class, peeled from a type in any order below its generic wrappers. */ private enum class ContainerKind(val type: Class<*>, val canBeNonNull: Boolean) : Layer { DATA_FETCHER_RESULT(DataFetcherResult::class.java, canBeNonNull = true) { - override fun misplaced(position: Position, root: Boolean) = + override fun placementError(position: Position, root: Boolean) = if (position != Position.RETURN_TYPE) "${type.name} can only be used as a return type" else null override fun step(next: Step?, inner: Layer?): Step? = next?.let(::DataOf) }, OPTIONAL(Optional::class.java, canBeNonNull = false) { - override fun misplaced(position: Position, root: Boolean) = + override fun placementError(position: Position, root: Boolean) = if (position == Position.RETURN_TYPE && !root) "${type.name} can only be used at the top level of a return type" else null // graphql-java reads a DataFetcherResult and then an Optional in its data, so an Optional around one is ours to unwrap override fun step(next: Step?, inner: Layer?): Step? = if (next != null || inner == DATA_FETCHER_RESULT) ValueOf(next) else null }; - /** Why this container can't be at this place in a type, or null when it can. */ - abstract fun misplaced(position: Position, root: Boolean): String? + abstract fun placementError(position: Position, root: Boolean): String? - /** What happens to a value of this container, given the step for what it holds. null leaves the value to graphql-java. */ + // null leaves the value to graphql-java abstract fun step(next: Step?, inner: Layer?): Step? } diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt index 38e1e908..4fca7863 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt @@ -50,7 +50,6 @@ class TypeClassMatcherTest { private val scanner: FieldResolverScanner = FieldResolverScanner(options, GRAPHQL_SCALARS.keys) private val resolver = RootResolverInfo(listOf(QueryMethods()), options) - // a method without parameters only has its return type to match private fun matchReturnType(methodName: String, graphQLType: Type<*>): TypeClassMatcher.Match = matcher.match(scanner.findFieldResolver(FieldDefinition(methodName, graphQLType), resolver).scanForMatches().single()) From 6b9d811480905518856cc375a8247cc9bf459f1c Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 17:58:16 -0500 Subject: [PATCH 47/64] Close the raw SDL reads the boundary test let through The allowlist now names the exact classes in graphql.kickstart.tools, and only the Relay factory may read raw definitions. Reads through a DirectivesContainer or Node receiver, getChildren and getNamedChildren, SDL node walks and TypeDefinitionRegistry reads fail too, and each message names the MergedType member to use. TypeKindRecipeTest names the leaf with no case and what to add. --- AGENTS.md | 9 +-- .../tools/DefinitionsBoundaryTest.kt | 71 ++++++++++++++----- .../kickstart/tools/TypeKindRecipeTest.kt | 7 +- 3 files changed, 65 insertions(+), 22 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9096124a..2da586e8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,9 +5,10 @@ resolver classes. Published to Maven Central. Kotlin, with a few Java files, tar ## Layout -- `src/main/kotlin/graphql/kickstart/tools`: `SchemaParser` and its builder and options, `SchemaClassScanner` (matches schema - types to classes), `resolver/` (field resolvers and data fetchers), `directive/`, `relay/`, `proxy/` (finds the class - behind a Spring, Guice, Weld or Javassist proxied resolver), `util/` +- `src/main/kotlin/graphql/kickstart/tools`: `SchemaParser` and its builder and options, `MergedDefinitions.kt` (merges each + SDL type with its extensions into a `MergedType`. Other code, apart from the Relay factory, reads SDL types only through + it), `SchemaClassScanner` (matches schema types to classes), `resolver/` (field resolvers and data fetchers), `directive/`, + `relay/`, `proxy/` (finds the class behind a Spring, Guice, Weld or Javassist proxied resolver), `util/` - `src/test/kotlin`: JUnit tests, one class per feature. A test for an issue goes into the class for its feature. `EndToEndTest` and `EndToEndSpecHelper` hold the shared schema and resolvers - `.claude/skills/verify-tools`: the probe that checks a change from a consuming app's side @@ -94,7 +95,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists exactly today's property and Map gaps as known findings, and fails when one is fixed until it's removed, or when a new failure would hide under one | | One output has one builder. Don't add a second path that builds the same thing | docs only | -| Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest` | +| Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it | | Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | | Reuse an existing structure before you add a parallel one | docs only | | Argument conversion goes through one entry point | docs only | diff --git a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt index bd55238a..98557d61 100644 --- a/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/DefinitionsBoundaryTest.kt @@ -8,6 +8,11 @@ import com.tngtech.archunit.core.domain.JavaConstructorCall import com.tngtech.archunit.core.domain.JavaConstructorReference import com.tngtech.archunit.core.importer.ClassFileImporter import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses +import graphql.kickstart.tools.directive.DirectiveWiringHelper +import graphql.kickstart.tools.relay.RelayConnectionFactory +import graphql.language.AstTransformer +import graphql.language.NodeTraverser +import graphql.language.NodeVisitor import graphql.language.SDLExtensionDefinition import graphql.language.SchemaExtensionDefinition import graphql.language.TypeDefinition @@ -17,8 +22,10 @@ import graphql.schema.GraphQLInterfaceType import graphql.schema.GraphQLObjectType import graphql.schema.GraphQLScalarType import graphql.schema.GraphQLUnionType +import graphql.schema.idl.TypeDefinitionRegistry import org.junit.Test import java.nio.file.Paths +import kotlin.reflect.KClass class DefinitionsBoundaryTest { @@ -27,22 +34,22 @@ class DefinitionsBoundaryTest { .importPath(Paths.get(MergedDefinitions::class.java.protectionDomain.codeSource.location.toURI())) } - private fun declaredOutside(vararg files: String) = object : DescribedPredicate("are declared outside ${files.joinToString()}") { - override fun test(javaClass: JavaClass) = javaClass.source.flatMap { it.fileName }.orElse("") !in files + private fun declaredOutside(vararg allowed: KClass<*>) = object : DescribedPredicate("are not ${allowed.joinToString { it.java.name }}") { + private val names = allowed.map { it.java.name } + override fun test(javaClass: JavaClass) = javaClass.name.substringBefore('$') !in names } - private val getsRawDefinitionsByContract = object : DescribedPredicate("implement TypeDefinitionFactory") { - override fun test(javaClass: JavaClass) = javaClass.isAssignableTo(TypeDefinitionFactory::class.java) - } - - private val mergedMembers = setOf( + private val typeMembers = setOf( "getFieldDefinitions", "getImplements", "getMemberTypes", "getEnumValueDefinitions", "getInputValueDefinitions", - "getDirectives", "getDirectivesByName", "hasDirective", + "getDirectives", "getDirectivesByName", "hasDirective", "getChildren", "getNamedChildren", ) - private val readsTypeMembers = object : DescribedPredicate>("reads the members or directives of an SDL type definition") { - override fun test(access: JavaAccess<*>) = - access.target.name in mergedMembers && access.target.owner.isAssignableTo(TypeDefinition::class.java) + private val readsTypeMembers = object : DescribedPredicate>("reads the members, directives or child nodes of what may be an SDL type definition") { + override fun test(access: JavaAccess<*>): Boolean { + val owner = access.target.owner + return access.target.name in typeMembers && + (owner.isAssignableTo(TypeDefinition::class.java) || owner.isAssignableFrom(TypeDefinition::class.java)) + } } private val extensionClass = object : DescribedPredicate("are graphql-java type extension definitions") { @@ -50,6 +57,18 @@ class DefinitionsBoundaryTest { javaClass.isAssignableTo(SDLExtensionDefinition::class.java) && !javaClass.isAssignableTo(SchemaExtensionDefinition::class.java) } + private val nodeWalker = object : DescribedPredicate("walk graphql-java SDL nodes") { + override fun test(javaClass: JavaClass) = javaClass.isAssignableTo(NodeVisitor::class.java) || + javaClass.isEquivalentTo(NodeTraverser::class.java) || javaClass.isEquivalentTo(AstTransformer::class.java) + } + + private val objectMethods = Any::class.java.methods.mapTo(hashSetOf()) { it.name } + + private val readsTypeRegistry = object : DescribedPredicate>("reads a TypeDefinitionRegistry") { + override fun test(access: JavaAccess<*>) = + access.target.owner.isAssignableTo(TypeDefinitionRegistry::class.java) && access.target.name !in objectMethods + } + private val namedTypes = listOf( GraphQLObjectType::class, GraphQLInterfaceType::class, GraphQLUnionType::class, GraphQLEnumType::class, GraphQLInputObjectType::class, GraphQLScalarType::class, @@ -70,6 +89,8 @@ class DefinitionsBoundaryTest { override fun test(access: JavaAccess<*>) = access.target.name == "transform" && access.target.owner.name in namedTypes } + private val readMergedType = "Look the type up with MergedDefinitions.byName or resolve(name) and read MergedType.fields, interfaces, members or values, which hold the extensions' items too" + @Test fun `imports the compiled main classes`() { assert(classes.size > 100) { "expected the compiled main classes, found ${classes.size}" } @@ -77,23 +98,39 @@ class DefinitionsBoundaryTest { @Test fun `only the merged definitions read the members and directives of SDL types`() { - noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(getsRawDefinitionsByContract)) + noClasses().that(declaredOutside(MergedDefinitions::class, MergedType::class, RelayConnectionFactory::class)) .should().accessTargetWhere(readsTypeMembers) - .because("each type is merged with its extensions once in MergedDefinitions.kt. Take a MergedType and read MergedType.fields, interfaces, members or values, and let MergedType.prepare apply the directives") + .because("each type is merged with its extensions once in MergedDefinitions.kt. $readMergedType. " + + "MergedType.prepare applies the merged directives, and a built graphql-java type lists them in appliedDirectives. " + + "A field, argument or enum value's own directives are fine to read through a FieldDefinition, InputValueDefinition or EnumValueDefinition receiver, not a DirectivesContainer or Node one") .check(classes) } @Test fun `only the merged definitions see type extension classes`() { - noClasses().that(declaredOutside("MergedDefinitions.kt")).and(DescribedPredicate.not(getsRawDefinitionsByContract)) + noClasses().that(declaredOutside(MergedDefinitions::class, MergedType::class)) .should().dependOnClassesThat(extensionClass) - .because("each type is merged with its extensions once in MergedDefinitions.kt. Take a MergedType instead of matching extension definitions") + .because("each type is merged with its extensions once in MergedDefinitions.kt. $readMergedType. MergedType.prepare passes the extension definitions to the builder") + .check(classes) + } + + @Test + fun `nothing walks SDL nodes`() { + noClasses().should().dependOnClassesThat(nodeWalker) + .because("a walk visits each type definition apart from its extensions. $readMergedType") + .check(classes) + } + + @Test + fun `nothing reads a TypeDefinitionRegistry`() { + noClasses().should().accessTargetWhere(readsTypeRegistry) + .because("a TypeDefinitionRegistry keeps each type apart from its extensions. $readMergedType") .check(classes) } @Test fun `only the merged definitions start named-type builders`() { - noClasses().that(declaredOutside("MergedDefinitions.kt")) + noClasses().that(declaredOutside(MergedType::class)) .should().accessTargetWhere(startsNamedTypeBuilder) .because("every named type starts from MergedType.prepare, which checks repeats and sets the name, definitions, description and directives") .check(classes) @@ -101,7 +138,7 @@ class DefinitionsBoundaryTest { @Test fun `only the directive wiring transforms built named types`() { - noClasses().that(declaredOutside("MergedDefinitions.kt", "DirectiveWiringHelper.kt")) + noClasses().that(declaredOutside(DirectiveWiringHelper::class)) .should().accessTargetWhere(transformsNamedType) .because("transform copies a type that's already built. Start a new type from MergedType.prepare") .check(classes) diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt index 7ffac552..270e7014 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeKindRecipeTest.kt @@ -4,6 +4,7 @@ import graphql.Scalars import graphql.language.Node import graphql.schema.* import org.junit.Assert.assertThrows +import org.junit.Assert.assertTrue import org.junit.Test import kotlin.reflect.KClass @@ -23,7 +24,11 @@ class TypeKindRecipeTest { fun leaves(kind: KClass>): List>> = if (kind.isSealed) kind.sealedSubclasses.flatMap(::leaves) else listOf(kind) - assertEquals(kinds.keys, leaves(MergedType::class).toSet()) + val missing = leaves(MergedType::class).filter { it !in kinds }.map { it.qualifiedName!!.removePrefix("graphql.kickstart.tools.") } + assertTrue( + "${missing.joinToString()} has no case. Add a Kind for it to kinds, and add to sdl a definition with a description and @a and an extension with @b", + missing.isEmpty(), + ) } @Test From 003f849d270a21855d9ecb1e688f1596e2ee0cd7 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 17:58:20 -0500 Subject: [PATCH 48/64] Keep logback-test.xml out of the published tests jar A project with this jar on its test classpath and no logging config of its own would pick it up. --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index aacfbcd5..06adcd74 100644 --- a/pom.xml +++ b/pom.xml @@ -271,6 +271,11 @@ test-jar + + + logback-test.xml + + From fe70cabff3cc95f013c7e778f4112c1271eb9582 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 18:06:12 -0500 Subject: [PATCH 49/64] Fail the bounded check for a container kind it never builds A new ContainerKind with a stubbed value step compiled and passed every test, because Check.java keeps its own list of containers. The test now passes TypeShape's container types to the check, which stops with a MODEL ERROR naming each one Check.java has no Container for. The verify-return-value-unwrapping skill named ReturnValueUnwrapper, PotentialMatch and GenericTypeResolver in its trigger, coverage table and sync command. It now names TypeShape, so a change there triggers the skill and shows up in its staleness check. Co-Authored-By: Claude Opus 5.5 --- .../verify-return-value-unwrapping/SKILL.md | 17 ++++++++--------- AGENTS.md | 2 +- .../kickstart/tools/resolver/TypeShape.kt | 2 ++ .../returnvalue/ReturnValueUnwrappingTest.kt | 6 +++++- src/test/resources/returnvalue/Check.java | 11 +++++++++++ 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index 6030c798..dba6d4b3 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -1,6 +1,6 @@ --- name: verify-return-value-unwrapping -description: Exhaustively check, up to a bound, that the value of a resolver method, public field or typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to ReturnValueUnwrapper, TypeClassMatcher's unwrapping, GenericTypeResolver.resolve, the data fetchers in MethodFieldResolver, PropertyFieldResolver or MapFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. +description: Exhaustively check, up to a bound, that the value of a resolver method, public field or typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to TypeShape (the type walk, ContainerKind, the generic wrapper rules or the Unwrapper), the data fetchers in MethodFieldResolver, PropertyFieldResolver or MapFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. --- # Verify return value unwrapping @@ -73,7 +73,7 @@ as `-Dunwrapping.args`, and prints the report. On a failure it also prints the p |---|---| | 0 | `PASS`, or `PASS apart from the known findings above` | | 1 | `FAIL`: a return type that isn't a known finding breaks the property. `NEW`: a known finding matches more accepted return types than its line records | -| 2 | `MODEL ERROR`: the checkout or the check didn't compile, or the build rejected a return type the check must exercise, so a pass would prove nothing | +| 2 | `MODEL ERROR`: the checkout or the check didn't compile, the build rejected a return type the check must exercise, or a `ContainerKind` in `TypeShape.kt` has no `Container` in `Check.java`, so a pass would prove nothing | | 3 | `STALE`: a known finding matches a return type that no longer fails, or fewer accepted return types than its line records | Options: `--depth N`, `--budget N`, `--property-budget N`, `--show N` (counterexamples and stale return types printed, default 15), and `--rejected`, which lists @@ -157,14 +157,12 @@ or delete it when none fail, so that a regression shows up as `FAIL`. ## Coverage and sync -Last confirmed to describe the code at commit `af9ba4ad` (agent-friendly, 2026-11-04). It covers: +Last confirmed to describe the code at commit `6d41328d` (2026-11-05). It covers: | File | What | |---|---| -| `src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt` | all of it | -| `src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt` | `PotentialMatch.unwrap`, `Unwrapped` | -| `src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt` | `resolve`, `resolveTypeVariables` | -| `src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt` | `createDataFetcher` (`valueClass`, the unwrapper), `returnType`, `returnValueMatch`, `LightMethodFieldResolverDataFetcher` | +| `src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt` | all of it: the walk, `ContainerKind`, `GenericWrappers`, `resolveTypeVariables`, the `Unwrapper` and its steps | +| `src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt` | `createDataFetcher` (the `TypeShape.Unwrapper`), `returnShape`, `LightMethodFieldResolverDataFetcher` | | `src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt` | `GenericWrapper` and the default wrappers in `build()` | | `src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt` | all of it | | `src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt` | all of it, for Map subclasses with a typed value | @@ -172,10 +170,11 @@ Last confirmed to describe the code at commit `af9ba4ad` (agent-friendly, 2026-1 To see whether a change needs another look: ```bash -git log --oneline af9ba4ad..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/ReturnValueUnwrapper.kt src/main/kotlin/graphql/kickstart/tools/TypeClassMatcher.kt src/main/kotlin/graphql/kickstart/tools/GenericTypeResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +git log --oneline 6d41328d..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt ``` Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and expected values in `Check.java` still describe them. For example, a new default wrapper or a new kind of unwrapping -step needs a new `Container` with its variants and its plain value in `build`. After an intended change, rerun the check, +step needs a new `Container` with its variants and its plain value in `build`. A new `ContainerKind` ends in +`MODEL ERROR` until it has one. After an intended change, rerun the check, and break the new code on purpose once in a scratch worktree to see the check fail before you trust its pass. diff --git a/AGENTS.md b/AGENTS.md index 7a2c97a1..62e57006 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,7 +90,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| -| A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers the data fetcher unwraps. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum | +| A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers the data fetcher unwraps. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists exactly today's property and Map gaps as known findings, and fails when one is fixed until it's removed, or when a new failure would hide under one | | One output has one builder. Don't add a second path that builds the same thing | docs only | diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index 97a732aa..1696a7ed 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -89,6 +89,8 @@ internal class TypeShape private constructor( } companion object { + val containerTypes: List> get() = ContainerKind.entries.map { it.type } + fun returnType( graphQLType: GraphQLLangType, declaredType: JavaType, diff --git a/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt b/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt index aeedf198..6e3da8c0 100644 --- a/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt @@ -1,5 +1,6 @@ package graphql.kickstart.tools.returnvalue +import graphql.kickstart.tools.resolver.TypeShape import org.junit.Assert.fail import org.junit.Test import java.io.ByteArrayOutputStream @@ -21,7 +22,10 @@ class ReturnValueUnwrappingTest { compile(classpath, dir, copy("Check.java", dir), copy("Fixtures.java", dir)) val args = System.getProperty("unwrapping.args", "").split(" ").filter { it.isNotBlank() } + - listOf("--known", copy("known-findings.txt", dir).toString()) + listOf( + "--known", copy("known-findings.txt", dir).toString(), + "--container-kinds", TypeShape.containerTypes.joinToString(",") { it.canonicalName } + ) val report = ByteArrayOutputStream() val passed = URLClassLoader(arrayOf(dir.toUri().toURL()), javaClass.classLoader).use { loader -> PrintStream(report, true, Charsets.UTF_8).use { out -> diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java index fa7ede26..d445ef3a 100644 --- a/src/test/resources/returnvalue/Check.java +++ b/src/test/resources/returnvalue/Check.java @@ -312,6 +312,17 @@ public static boolean check(String[] args, String classpath, PrintStream out) th int show = intArg(args, "--show", 15); long started = System.nanoTime(); + Set built = Arrays.stream(Container.values()).map(it -> it.javaName).collect(Collectors.toSet()); + List unchecked = Arrays.stream(stringArg(args, "--container-kinds").split(",")) + .filter(it -> !built.contains(it)) + .collect(Collectors.toList()); + if (!unchecked.isEmpty()) { + out.println("MODEL ERROR: TypeShape.kt has a ContainerKind for these classes, but no Container in Check.java builds them, so a pass would prove nothing about them:"); + unchecked.forEach(it -> out.println(" " + it)); + out.println("Add a Container for each to Check.java with its value variants, and its plain value in build."); + return false; + } + List cases = cases(depth); Map> resolvers = compile(cases, classpath); From 63c1fa6ef757b5e3cd85fe27659bc3eed4344356 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 19:50:22 -0500 Subject: [PATCH 50/64] Unwrap property and Map field values like method values Public fields and typed Map values now go through the same TypeShape.Unwrapper as method return values, so nested futures are awaited, generic wrappers run their transformers and a DataFetcherResult inside an Optional is read. A Map whose value type is Object still hands its values to graphql-java as they are. A FutureTask behind a declared Future names the field or Map value in its error. The bounded check and ResolverCompatibilityTest have no known findings left. --- .../tools/resolver/MapFieldResolver.kt | 22 +++++--- .../tools/resolver/MethodFieldResolver.kt | 2 +- .../tools/resolver/PropertyFieldResolver.kt | 25 ++++----- .../kickstart/tools/resolver/TypeShape.kt | 34 ++++++------ .../tools/NestedGenericWrapperTest.kt | 2 +- .../tools/ResolverCompatibilityTest.kt | 52 ++++++++++--------- src/test/resources/returnvalue/Check.java | 21 ++++---- .../resources/returnvalue/known-findings.txt | 5 -- 8 files changed, 85 insertions(+), 78 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt index c13f67f4..f758c831 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt @@ -4,6 +4,7 @@ import com.fasterxml.classmate.TypeResolver import graphql.kickstart.tools.ScanDictionary import graphql.kickstart.tools.SchemaParserOptions import graphql.kickstart.tools.util.JavaType +import graphql.kickstart.tools.util.unwrap import graphql.language.FieldDefinition import graphql.schema.DataFetcher import graphql.schema.DataFetchingEnvironment @@ -23,7 +24,7 @@ internal class MapFieldResolver( mapClass: JavaType ) : FieldResolver(field, search, options) { - private var mapGenericValue: JavaType = getMapGenericType(mapClass) + private val mapGenericValue: JavaType = getMapGenericType(mapClass) /** * Takes a type which implements Map and tries to find the @@ -38,25 +39,32 @@ internal class MapFieldResolver( return typeParameters.elementAtOrElse(1) { Any::class.java } } - override fun createDataFetcher(): DataFetcher<*> { - return MapFieldResolverDataFetcher(createSourceResolver(), field.name) + private val returnShape by lazy { + TypeShape.returnType(field.type, mapGenericValue, search.isSubscription, search.type, options, ScanDictionary.FieldTypeReference(field.name)) } - override fun scanForMatches(): Sequence { - return sequenceOf(TypeShape.returnType(field.type, mapGenericValue, isSubscription = false, search.type, options, ScanDictionary.FieldTypeReference(field.name))) + private val hasTypedValues get() = resolveTypeVariables(mapGenericValue, search.type) != Any::class.java + + override fun createDataFetcher(): DataFetcher<*> { + val unwrapper = if (hasTypedValues) TypeShape.Unwrapper(returnShape, "map value", "${search.type.unwrap().name}.${field.name}") else null + return MapFieldResolverDataFetcher(createSourceResolver(), field.name, unwrapper) } + override fun scanForMatches(): Sequence = sequenceOf(returnShape) + override fun toString() = "MapFieldResolver{key=${field.name}}" } internal class MapFieldResolverDataFetcher( private val sourceResolver: SourceResolver, - private val key: String + private val key: String, + private val unwrapper: TypeShape.Unwrapper? ) : LightDataFetcher { override fun get(fieldDefinition: GraphQLFieldDefinition, sourceObject: Any?, environmentSupplier: Supplier): Any? { if (sourceObject is Map<*, *>) { - return sourceObject[key] + val value = sourceObject[key] + return if (value == null || unwrapper == null) value else unwrapper.unwrap(value, environmentSupplier) } else { throw RuntimeException("MapFieldResolver attempt to fetch a field from an object instance that was not a map") } diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt index 63fc38e2..b86d5e0e 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt @@ -114,7 +114,7 @@ internal class MethodFieldResolver( } } - val unwrapper = TypeShape.Unwrapper(returnShape, method, isSuspendFunction) + val unwrapper = TypeShape.Unwrapper(returnShape, "method", "${method.declaringClass.name}.${method.name}", isSuspendFunction) return if (numberOfParameters > 0 || isSuspendFunction) { // requires arguments and environment or is a suspend function diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt index 7f93c648..ee97d553 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt @@ -20,33 +20,28 @@ internal class PropertyFieldResolver( val property: Field ) : FieldResolver(field, search, options) { - override fun createDataFetcher(): DataFetcher<*> { - return PropertyFieldResolverDataFetcher(createSourceResolver(), property) + private val returnShape by lazy { + TypeShape.returnType(field.type, property.genericType, search.isSubscription, search.type, options, ScanDictionary.FieldTypeReference(property.toString())) } - override fun scanForMatches(): Sequence { - return sequenceOf( - TypeShape.returnType( - field.type, - property.genericType, - isSubscription = false, - search.type, - options, - ScanDictionary.FieldTypeReference(property.toString()) - ) - ) + override fun createDataFetcher(): DataFetcher<*> { + val unwrapper = TypeShape.Unwrapper(returnShape, "field", "${property.declaringClass.name}.${property.name}") + return PropertyFieldResolverDataFetcher(createSourceResolver(), property, unwrapper) } + override fun scanForMatches(): Sequence = sequenceOf(returnShape) + override fun toString() = "PropertyFieldResolver{property=$property}" } internal class PropertyFieldResolverDataFetcher( private val sourceResolver: SourceResolver, - private val field: Field + private val field: Field, + private val unwrapper: TypeShape.Unwrapper ) : LightDataFetcher { override fun get(fieldDefinition: GraphQLFieldDefinition, sourceObject: Any?, environmentSupplier: Supplier): Any? { - return field.get(sourceResolver.resolve(null, sourceObject)) + return field.get(sourceResolver.resolve(null, sourceObject))?.let { unwrapper.unwrap(it, environmentSupplier) } } override fun get(environment: DataFetchingEnvironment): Any? { diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index 1696a7ed..7d853a6e 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -21,7 +21,6 @@ import graphql.schema.idl.TypeUtil import kotlinx.coroutines.future.asDeferred import org.apache.commons.lang3.reflect.TypeUtils import org.reactivestreams.Publisher -import java.lang.reflect.Method import java.lang.reflect.ParameterizedType import java.lang.reflect.TypeVariable import java.lang.reflect.WildcardType @@ -47,23 +46,23 @@ internal class TypeShape private constructor( fun error(msg: String) = matchError(graphQLType, reference, javaType, msg) - class Unwrapper(shape: TypeShape, method: Method, isSuspendFunction: Boolean) { + class Unwrapper(shape: TypeShape, resolverKind: String, resolverName: String, isSuspendFunction: Boolean = false) { private val wrappers = shape.wrappers private val awaitable: Awaitable private val isOutermostFuture: Boolean private val nested: Step? init { - // the class the return type unwraps to, so a value that happens to implement Future isn't mistaken for a wrapper. - // Object (e.g. for a union) can't tell them apart, so then every future of a method whose return type is Future is checked + // the class the declared type unwraps to, so a value that happens to implement Future isn't mistaken for a wrapper. + // Object (e.g. for a union) can't tell them apart, so then every future of a value declared as Future is checked val valueClass = (TypeUtils.getRawType(shape.unwrappedRootType, null) ?: Any::class.java) .takeUnless { it == Any::class.java && TypeUtils.getRawType(shape.declaredType, null) == Future::class.java } - awaitable = Awaitable(method, valueClass, isSuspendFunction) + awaitable = Awaitable(resolverKind, resolverName, valueClass, isSuspendFunction) val outermost = shape.layers.firstOrNull() as? Layer.Wrapper val belowOutermost = if (outermost == null) shape.layers else shape.layers.drop(1) val leafClass = TypeUtils.getRawType(shape.leafJavaType, null) - val awaits = Awaitable(method, leafClass?.takeUnless { it == Any::class.java }, isSuspendFunction) - val peels = Awaitable(method, leafClass, isSuspendFunction) + val awaits = Awaitable(resolverKind, resolverName, leafClass?.takeUnless { it == Any::class.java }, isSuspendFunction) + val peels = Awaitable(resolverKind, resolverName, leafClass, isSuspendFunction) isOutermostFuture = outermost?.isFuture == true // graphql-java completes a subscription's events one at a time nested = if (shape.isSubscription) null else steps(belowOutermost, awaits, peels) @@ -102,7 +101,10 @@ internal class TypeShape private constructor( val javaType = if (isSubscription) declaredType.asPublisher() else declaredType val walk = Walk(graphQLType, javaType, containingType, GenericWrappers(options.genericWrappers), reference, Position.RETURN_TYPE) val (leafGraphQLType, leafJavaType) = walk.leaf() - return TypeShape(graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, declaredType, walk.unwrappedRootType, isSubscription, walk.wrappers) + return TypeShape( + graphQLType, javaType, reference, leafGraphQLType, leafJavaType, walk.layers, resolveTypeVariables(declaredType, containingType), + walk.unwrappedRootType, isSubscription, walk.wrappers + ) } fun parameterType( @@ -391,7 +393,12 @@ private fun Any?.asCompletionStage(): CompletionStage = // graphql-java only waits on a CompletionStage returned by a data fetcher, so any other future, or a future // that a suspend function completes with, would reach it as the field value -private class Awaitable(private val method: Method, private val valueClass: Class<*>?, private val isSuspendFunction: Boolean) { +private class Awaitable( + private val resolverKind: String, + private val resolverName: String, + private val valueClass: Class<*>?, + private val isSuspendFunction: Boolean +) { fun requireOutermost(value: Any?): Any? = if (value !is Future<*> || valueClass?.isInstance(value) == true || value is CompletionStage<*> && !isSuspendFunction) value else fail(value) @@ -401,13 +408,10 @@ private class Awaitable(private val method: Method, private val valueClass: Clas private fun fail(value: Any): Nothing = throw ResolverError( if (isSuspendFunction) { - "Suspend function '${method.resolverName}' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. Return its value instead." + "Suspend function '$resolverName' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. Return its value instead." } else { - "Resolver method '${method.resolverName}' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. " + - "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead." + "Resolver $resolverKind '$resolverName' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. " + + "Return a CompletionStage, such as a CompletableFuture, from the $resolverKind or its generic wrapper transformer instead." } ) } - -private val Method.resolverName - get() = "${declaringClass.name}.$name" diff --git a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt index da1a934b..ce343178 100644 --- a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt @@ -250,7 +250,7 @@ class NestedGenericWrapperTest { if (typeShape.leafJavaType != leaf(graphQLType).javaClass) { return@mapNotNull "${TypeUtils.toString(javaType)} as ${AstPrinter.printAst(graphQLType)}: bound to ${TypeUtils.toString(typeShape.leafJavaType)}" } - val unwrapper = TypeShape.Unwrapper(typeShape, method, isSuspendFunction = false) + val unwrapper = TypeShape.Unwrapper(typeShape, "method", method.name) val value = value(shape, leaf(graphQLType)) val result = GraphQL.newGraphQL(fieldSchema(graphQLType) { environment -> unwrapper.unwrap(value) { environment } }).build() .execute(if (leaf(graphQLType) is Payload) "query { field { data } }" else "query { field }") diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt index 40b0d1d4..a957dacd 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt @@ -24,17 +24,12 @@ import java.util.concurrent.FutureTask class ResolverCompatibilityTest { @Test - fun `@JvmField and typed Map fields return what a method returns apart from the known findings, and untyped Map fields hand graphql-java the value as it is`() { + fun `@JvmField and typed Map fields return what a method returns, and untyped Map fields hand graphql-java the value as it is`() { val wrong = Kind.entries.flatMap { kind -> shapes.mapNotNull { shape -> val got = holderField(kind, shape) val expected = if (kind == Kind.UNTYPED_MAP) rawValueResults.getValue(shape.name) else shape.expected(kind) - val known = knownFindings[kind to shape.name] - when { - got == (known ?: expected) -> null - known != null && got == expected -> "$kind ${shape.name} now returns what a method returns. Delete its known finding." - else -> "$kind ${shape.name}\n expected: ${known ?: expected}\n got: $got" - } + "$kind ${shape.name}\n expected: $expected\n got: $got".takeUnless { got == expected } } } if (wrong.isNotEmpty()) { @@ -207,9 +202,9 @@ class ResolverCompatibilityTest { } @Test - fun `subscription events reach graphql-java as they are, so a future event prints as a string`() { + fun `subscription events of a method or a field reach graphql-java as they are, so a future or wrapped event prints as a string`() { val schema = SchemaParser.newParser() - .schemaString("type Query { unused: String } type Subscription { events: String futureEvents: String }") + .schemaString("type Query { unused: String } type Subscription { events: String futureEvents: String boxEvents: String }") .resolvers( object : GraphQLQueryResolver { fun unused(): String? = null @@ -223,7 +218,9 @@ class ResolverCompatibilityTest { fun futureEvents(): Publisher> = publish { send(completedFuture("a")) } - }) + }, + SubscriptionFields()) + .options(SchemaParserOptions.newOptions().genericWrappers(boxWrapper).build()) .build() .makeExecutableSchema() val gql = GraphQL.newGraphQL(schema).build() @@ -232,6 +229,7 @@ class ResolverCompatibilityTest { assertEquals(events("subscription { events }"), listOf("{events=a}", "{events=b}")) assertEquals(events("subscription { futureEvents }"), listOf("{futureEvents=CompletableFuture@...[Completed normally]}")) + assertEquals(events("subscription { boxEvents }"), listOf("{boxEvents=Box@...}")) } private fun execute( @@ -273,11 +271,11 @@ class ResolverCompatibilityTest { .replace("${ResolverCompatibilityTest::class.java.name}$", "") .replace("java.util.concurrent.", "") - enum class Kind(val holder: (Shape) -> Any) { - METHOD({ MethodHolder() }), - JVM_FIELD({ JvmFieldHolder() }), - TYPED_MAP({ shape -> shape.typedMap(JvmFieldHolder()) }), - UNTYPED_MAP({ shape -> hashMapOf(shape.name to shape.value()) }) + enum class Kind(val resolverKind: String, val holder: (Shape) -> Any) { + METHOD("method", { MethodHolder() }), + JVM_FIELD("field", { JvmFieldHolder() }), + TYPED_MAP("map value", { shape -> shape.typedMap(JvmFieldHolder()) }), + UNTYPED_MAP("map value", { shape -> hashMapOf(shape.name to shape.value()) }) } class Shape(val name: String, val type: String, private val expected: String, val typedMap: (JvmFieldHolder) -> Map) { @@ -285,7 +283,7 @@ class ResolverCompatibilityTest { fun value(): Any? = JvmFieldHolder::class.java.getField(name).get(JvmFieldHolder()) - fun expected(kind: Kind) = expected.replace("HOLDER", kind.holder(this).javaClass.simpleName) + fun expected(kind: Kind) = expected.replace("HOLDER", kind.holder(this).javaClass.simpleName).replace("KIND", kind.resolverKind) } class Foo(val name: String) @@ -302,6 +300,7 @@ class ResolverCompatibilityTest { @JvmField val listOfStringFutures: List> = listOf(completedFuture("a"), completedFuture("b")) @JvmField val boxOfString: Box = Box("a") @JvmField val listOfOptionals: List> = listOf(Optional.of("a"), Optional.empty()) + @JvmField val futureOfAny: CompletableFuture = completedFuture("a") } class MethodHolder { @@ -318,6 +317,7 @@ class ResolverCompatibilityTest { fun listOfStringFutures() = values.listOfStringFutures fun boxOfString() = values.boxOfString fun listOfOptionals() = values.listOfOptionals + fun futureOfAny() = values.futureOfAny } class FutureMap : HashMap>() @@ -331,6 +331,7 @@ class ResolverCompatibilityTest { class ListOfStringFuturesMap : HashMap>>() class BoxOfStringMap : HashMap>() class ListOfOptionalsMap : HashMap>>() + class FutureOfAnyMap : HashMap>() open class Box(val content: T) @@ -370,6 +371,10 @@ class ResolverCompatibilityTest { suspend fun future(): CompletableFuture = completedFuture("a") } + class SubscriptionFields : GraphQLSubscriptionResolver { + @JvmField val boxEvents: Publisher> = publish { send(Box("a")) } + } + class Holder(val name: String) { @JvmField val tag = "t" } @@ -389,15 +394,16 @@ class ResolverCompatibilityTest { Shape("result", "Foo", "{name=a}") { ResultMap().apply { put("result", it.result) } }, Shape( "plainFuture", "Foo", - "null\nerror: Exception while fetching data (/holder/plainFuture) : Resolver method 'HOLDER.plainFuture' resolved to a FutureTask, " + - "which graphql-java can't wait on. Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead." + "null\nerror: Exception while fetching data (/holder/plainFuture) : Resolver KIND 'HOLDER.plainFuture' resolved to a FutureTask, " + + "which graphql-java can't wait on. Return a CompletionStage, such as a CompletableFuture, from the KIND or its generic wrapper transformer instead." ) { PlainFutureMap().apply { put("plainFuture", it.plainFuture) } }, Shape("box", "Foo", "{name=a}") { BoxMap().apply { put("box", it.box) } }, Shape("optionalResult", "Foo", "{name=a}") { OptionalResultMap().apply { put("optionalResult", it.optionalResult) } }, Shape("listOfFutures", "[Foo]", "[{name=a}, {name=b}]") { ListOfFuturesMap().apply { put("listOfFutures", it.listOfFutures) } }, Shape("listOfStringFutures", "[String]", "[a, b]") { ListOfStringFuturesMap().apply { put("listOfStringFutures", it.listOfStringFutures) } }, Shape("boxOfString", "String", "a") { BoxOfStringMap().apply { put("boxOfString", it.boxOfString) } }, - Shape("listOfOptionals", "[String]", "rejected: java.util.Optional can only be used at the top level of a return type") { ListOfOptionalsMap().apply { put("listOfOptionals", it.listOfOptionals) } } + Shape("listOfOptionals", "[String]", "rejected: java.util.Optional can only be used at the top level of a return type") { ListOfOptionalsMap().apply { put("listOfOptionals", it.listOfOptionals) } }, + Shape("futureOfAny", "String", "a") { FutureOfAnyMap().apply { put("futureOfAny", it.futureOfAny) } } ) private fun notFoo(path: String, got: String) = @@ -414,12 +420,8 @@ class ResolverCompatibilityTest { "listOfFutures" to "[{name=null}, {name=null}]\n${notFoo("listOfFutures[0]", "CompletableFuture")}\n${notFoo("listOfFutures[1]", "CompletableFuture")}", "listOfStringFutures" to "[CompletableFuture@...[Completed normally], CompletableFuture@...[Completed normally]]", "boxOfString" to "Box@...", - "listOfOptionals" to "[a, null]" + "listOfOptionals" to "[a, null]", + "futureOfAny" to "a" ) - - val knownFindings = listOf(Kind.JVM_FIELD, Kind.TYPED_MAP).flatMap { kind -> - listOf("futureOfListOfFutures", "plainFuture", "box", "optionalResult", "listOfFutures", "listOfStringFutures", "boxOfString") - .map { (kind to it) to rawValueResults.getValue(it) } - }.toMap() } } diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java index d445ef3a..650faf6f 100644 --- a/src/test/resources/returnvalue/Check.java +++ b/src/test/resources/returnvalue/Check.java @@ -101,16 +101,18 @@ enum Leaf { } enum Kind { - METHOD("method", List.of(Nullability.values()), List.of(Timing.values())), - PROPERTY("property", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)), - MAP("map", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)); + METHOD("method", "method", List.of(Nullability.values()), List.of(Timing.values())), + PROPERTY("property", "field", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)), + MAP("map", "map value", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)); final String label; + final String resolverKind; final List nullabilities; final List timings; - Kind(String label, List nullabilities, List timings) { + Kind(String label, String resolverKind, List nullabilities, List timings) { this.label = label; + this.resolverKind = resolverKind; this.nullabilities = nullabilities; this.timings = timings; } @@ -220,14 +222,14 @@ static final class Built { static final class Context { final Timing timing; - final String method; + final String resolverName; final List completions = new ArrayList<>(); final Set failures = new LinkedHashSet<>(); int nextId = 1; - Context(Timing timing, String method) { + Context(Timing timing, String resolverName) { this.timing = timing; - this.method = method; + this.resolverName = resolverName; } CompletableFuture future(Object value, String failure) { @@ -590,8 +592,9 @@ static Built build(Case testCase, Plan plan, int level, Context context) { } } case FUTURE_TASK: { - context.failures.add("Resolver method '" + context.method + "' resolved to a " + FutureTask.class.getName() + ", which graphql-java can't wait on. " - + "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."); + String kind = testCase.kind.resolverKind; + context.failures.add("Resolver " + kind + " '" + context.resolverName + "' resolved to a " + FutureTask.class.getName() + ", which graphql-java can't wait on. " + + "Return a CompletionStage, such as a CompletableFuture, from the " + kind + " or its generic wrapper transformer instead."); FutureTask task = new FutureTask<>(() -> null); task.run(); return new Built(task, null, "FutureTask"); diff --git a/src/test/resources/returnvalue/known-findings.txt b/src/test/resources/returnvalue/known-findings.txt index ca0a5c60..e69de29b 100644 --- a/src/test/resources/returnvalue/known-findings.txt +++ b/src/test/resources/returnvalue/known-findings.txt @@ -1,5 +0,0 @@ -448 ^(property|map) \w+<.*Future<.*String>+$ # properties and Maps don't await a future below the top level, so a String field returns the future's toString with no error -896 ^(property|map) \w+<.*Future<.*(Payload|Object)>+$ # properties and Maps don't await a future below the top level, so an object or union field fails -234 ^(property|map) Future< # properties and Maps don't check a declared Future, so a FutureTask fails with "Expected source object" or returns its toString, not the "can't wait on" error -1254 ^(property|map) .*\b(Page|Later|Try)< # properties and Maps don't run generic wrapper transformers, so the field fails or a String field returns the wrapper's toString -18 ^(property|map) (CompletableFuture<)?Optional Date: Thu, 5 Nov 2026 19:51:50 -0500 Subject: [PATCH 51/64] Describe property and Map unwrapping in the rule table and the bounded check skill The skill's sync commit moves to the unwrapping change, its known findings section says the file is empty, and it says how to catch a return type the build stops accepting now that no count pins them. --- .../verify-return-value-unwrapping/SKILL.md | 20 +++++++++---------- AGENTS.md | 4 ++-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index dba6d4b3..ac8f6f36 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -107,8 +107,8 @@ A real bug versus a modeling error: - **Modeling error.** The check's own idea of the value is wrong. For example, a new container variant builds a value that its declared type doesn't allow, or the error message the check expects for a `FutureTask` (in `build`, case `FUTURE_TASK`) differs from a message the library changed on purpose. Confirm against the library's own tests in - `src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt` before you edit the check. Properties and Maps - are expected to fail a `FutureTask` with the method's wording, naming the generated class and `field`. + `src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt` before you edit the check. A property fails a + `FutureTask` as a `Resolver field` and a Map as a `Resolver map value`, each naming the generated class and `field`. - **`MODEL ERROR` about rejected return types.** A change made the build reject a return type in `mustAccept` in `Check.java`. That's either a regression in the build, which you report, or an intended change, after which you swap in another accepted return type of the same kind. @@ -126,12 +126,8 @@ regression in a fixed return type is a `FAIL`. A count that grows makes it `NEW` reject now fails under the line. What stays hidden is a known return type that starts failing in a different way, so after a change to the code a known finding covers, read its counterexample. -At the sync commit, methods have none. Properties and Maps hand their value to graphql-java as it is. graphql-java awaits -only a top-level `CompletionStage`, reads a `DataFetcherResult` at the top, inside that future and as a list element, and -unboxes any `Optional`, but not a `DataFetcherResult` inside one. So every nested future, every generic wrapper, a -`DataFetcherResult` inside an `Optional`, and a `FutureTask` behind a declared `Future` fail for them. The five lines -match exactly those 2,850 return types, and their counts add up to it. A String field gets the container's `toString`, -such as `CompletableFuture@5a7cb161[Completed normally]`, with no error. +At the sync commit the file is empty. Methods, properties and typed Maps unwrap their values through the same +`TypeShape.Unwrapper`, and every return type the build accepts passes. The check found two method bugs when it was written, and both are fixed. One was a `DataFetcherResult` inside an `Optional` (#939). The other was a wrapper whose transformer returns a future, directly around a declared future (#938). A @@ -151,13 +147,15 @@ or delete it when none fail, so that a regression shows up as `FAIL`. and DataLoader futures. - Lists of more than 2 elements, more than 2 non-default choices per value, more than 3 containers, and completion orders other than the two listed. A pass says nothing beyond those bounds. -- Which return types the schema build should reject. The check only exercises what the build accepts. +- Which return types the schema build should reject. The check only exercises what the build accepts. With no known + findings, a return type the build stops accepting fails the check only when it's in `mustAccept`, so after a change + to the build or to a resolver's `createDataFetcher`, diff `--rejected` output against the last commit. - Untyped Maps, whose value type is `Object`, properties with a getter (those run as methods), and properties and Maps on a type below the root other than `Holder`. `ResolverCompatibilityTest` pins untyped Maps and Kotlin `@JvmField`s. ## Coverage and sync -Last confirmed to describe the code at commit `6d41328d` (2026-11-05). It covers: +Last confirmed to describe the code at commit `63c1fa6e` (2026-11-05). It covers: | File | What | |---|---| @@ -170,7 +168,7 @@ Last confirmed to describe the code at commit `6d41328d` (2026-11-05). It covers To see whether a change needs another look: ```bash -git log --oneline 6d41328d..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +git log --oneline 63c1fa6e..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt ``` Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and diff --git a/AGENTS.md b/AGENTS.md index 900d03a3..34dd67e4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,9 +91,9 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| -| A resolver method's return value is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers the data fetcher unwraps. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | +| The value of a resolver method, a public field or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | -| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest` and the bounded check in `ReturnValueUnwrappingTest`. Each lists exactly today's property and Map gaps as known findings, and fails when one is fixed until it's removed, or when a new failure would hide under one | +| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so any value that differs fails the build | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it | | Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | From 5ce3d1dbf1cbf436c6b531f3ca708293d8c634eb Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 20:11:03 -0500 Subject: [PATCH 52/64] Pin the bounded check's coverage and say what to change in a field's FutureTask error With no known findings, a change that made the build reject more return types, generated fewer shapes or ran fewer values still printed PASS. The check now pins the return type count and, per kind, the rejected count and the executions at the default bounds, and a difference is STALE. A field or Map value holding a FutureTask now says to assign a CompletionStage to the field or put one in the map, instead of returning one from it. --- .../tools/resolver/MapFieldResolver.kt | 2 +- .../tools/resolver/MethodFieldResolver.kt | 2 +- .../tools/resolver/PropertyFieldResolver.kt | 2 +- .../kickstart/tools/resolver/TypeShape.kt | 14 +++-- .../tools/NestedGenericWrapperTest.kt | 3 +- .../tools/ResolverCompatibilityTest.kt | 14 ++--- src/test/resources/returnvalue/Check.java | 58 +++++++++++++++---- 7 files changed, 69 insertions(+), 26 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt index f758c831..fa33e15e 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt @@ -46,7 +46,7 @@ internal class MapFieldResolver( private val hasTypedValues get() = resolveTypeVariables(mapGenericValue, search.type) != Any::class.java override fun createDataFetcher(): DataFetcher<*> { - val unwrapper = if (hasTypedValues) TypeShape.Unwrapper(returnShape, "map value", "${search.type.unwrap().name}.${field.name}") else null + val unwrapper = if (hasTypedValues) TypeShape.Unwrapper(returnShape, ResolverKind.MAP_VALUE, "${search.type.unwrap().name}.${field.name}") else null return MapFieldResolverDataFetcher(createSourceResolver(), field.name, unwrapper) } diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt index b86d5e0e..24ec4c19 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt @@ -114,7 +114,7 @@ internal class MethodFieldResolver( } } - val unwrapper = TypeShape.Unwrapper(returnShape, "method", "${method.declaringClass.name}.${method.name}", isSuspendFunction) + val unwrapper = TypeShape.Unwrapper(returnShape, ResolverKind.METHOD, "${method.declaringClass.name}.${method.name}", isSuspendFunction) return if (numberOfParameters > 0 || isSuspendFunction) { // requires arguments and environment or is a suspend function diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt index ee97d553..112ead6c 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt @@ -25,7 +25,7 @@ internal class PropertyFieldResolver( } override fun createDataFetcher(): DataFetcher<*> { - val unwrapper = TypeShape.Unwrapper(returnShape, "field", "${property.declaringClass.name}.${property.name}") + val unwrapper = TypeShape.Unwrapper(returnShape, ResolverKind.FIELD, "${property.declaringClass.name}.${property.name}") return PropertyFieldResolverDataFetcher(createSourceResolver(), property, unwrapper) } diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index 7d853a6e..609d7ed4 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -46,7 +46,7 @@ internal class TypeShape private constructor( fun error(msg: String) = matchError(graphQLType, reference, javaType, msg) - class Unwrapper(shape: TypeShape, resolverKind: String, resolverName: String, isSuspendFunction: Boolean = false) { + class Unwrapper(shape: TypeShape, resolverKind: ResolverKind, resolverName: String, isSuspendFunction: Boolean = false) { private val wrappers = shape.wrappers private val awaitable: Awaitable private val isOutermostFuture: Boolean @@ -391,10 +391,16 @@ private fun List.awaitAll(): Any { private fun Any?.asCompletionStage(): CompletionStage = this as? CompletionStage ?: CompletableFuture.completedFuture(this) +internal enum class ResolverKind(val noun: String, val holdCompletionStage: String) { + METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."), + FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead."), + MAP_VALUE("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.") +} + // graphql-java only waits on a CompletionStage returned by a data fetcher, so any other future, or a future // that a suspend function completes with, would reach it as the field value private class Awaitable( - private val resolverKind: String, + private val resolverKind: ResolverKind, private val resolverName: String, private val valueClass: Class<*>?, private val isSuspendFunction: Boolean @@ -410,8 +416,8 @@ private class Awaitable( if (isSuspendFunction) { "Suspend function '$resolverName' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. Return its value instead." } else { - "Resolver $resolverKind '$resolverName' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. " + - "Return a CompletionStage, such as a CompletableFuture, from the $resolverKind or its generic wrapper transformer instead." + "Resolver ${resolverKind.noun} '$resolverName' resolved to a ${value.javaClass.name}, which graphql-java can't wait on. " + + resolverKind.holdCompletionStage } ) } diff --git a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt index ce343178..213b25c5 100644 --- a/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/NestedGenericWrapperTest.kt @@ -9,6 +9,7 @@ import graphql.execution.DataFetcherResult import graphql.Scalars import graphql.execution.DefaultValueUnboxer import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper +import graphql.kickstart.tools.resolver.ResolverKind import graphql.kickstart.tools.resolver.TypeShape import graphql.kickstart.tools.util.ParameterizedTypeImpl import graphql.kickstart.tools.util.unwrap @@ -250,7 +251,7 @@ class NestedGenericWrapperTest { if (typeShape.leafJavaType != leaf(graphQLType).javaClass) { return@mapNotNull "${TypeUtils.toString(javaType)} as ${AstPrinter.printAst(graphQLType)}: bound to ${TypeUtils.toString(typeShape.leafJavaType)}" } - val unwrapper = TypeShape.Unwrapper(typeShape, "method", method.name) + val unwrapper = TypeShape.Unwrapper(typeShape, ResolverKind.METHOD, method.name) val value = value(shape, leaf(graphQLType)) val result = GraphQL.newGraphQL(fieldSchema(graphQLType) { environment -> unwrapper.unwrap(value) { environment } }).build() .execute(if (leaf(graphQLType) is Payload) "query { field { data } }" else "query { field }") diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt index a957dacd..ddf81e21 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt @@ -271,11 +271,11 @@ class ResolverCompatibilityTest { .replace("${ResolverCompatibilityTest::class.java.name}$", "") .replace("java.util.concurrent.", "") - enum class Kind(val resolverKind: String, val holder: (Shape) -> Any) { - METHOD("method", { MethodHolder() }), - JVM_FIELD("field", { JvmFieldHolder() }), - TYPED_MAP("map value", { shape -> shape.typedMap(JvmFieldHolder()) }), - UNTYPED_MAP("map value", { shape -> hashMapOf(shape.name to shape.value()) }) + enum class Kind(val resolverKind: String, val holdCompletionStage: String, val holder: (Shape) -> Any) { + METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead.", { MethodHolder() }), + JVM_FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead.", { JvmFieldHolder() }), + TYPED_MAP("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.", { shape -> shape.typedMap(JvmFieldHolder()) }), + UNTYPED_MAP("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.", { shape -> hashMapOf(shape.name to shape.value()) }) } class Shape(val name: String, val type: String, private val expected: String, val typedMap: (JvmFieldHolder) -> Map) { @@ -283,7 +283,7 @@ class ResolverCompatibilityTest { fun value(): Any? = JvmFieldHolder::class.java.getField(name).get(JvmFieldHolder()) - fun expected(kind: Kind) = expected.replace("HOLDER", kind.holder(this).javaClass.simpleName).replace("KIND", kind.resolverKind) + fun expected(kind: Kind) = expected.replace("HOLDER", kind.holder(this).javaClass.simpleName).replace("KIND", kind.resolverKind).replace("HOLD_COMPLETION_STAGE", kind.holdCompletionStage) } class Foo(val name: String) @@ -395,7 +395,7 @@ class ResolverCompatibilityTest { Shape( "plainFuture", "Foo", "null\nerror: Exception while fetching data (/holder/plainFuture) : Resolver KIND 'HOLDER.plainFuture' resolved to a FutureTask, " + - "which graphql-java can't wait on. Return a CompletionStage, such as a CompletableFuture, from the KIND or its generic wrapper transformer instead." + "which graphql-java can't wait on. HOLD_COMPLETION_STAGE" ) { PlainFutureMap().apply { put("plainFuture", it.plainFuture) } }, Shape("box", "Foo", "{name=a}") { BoxMap().apply { put("box", it.box) } }, Shape("optionalResult", "Foo", "{name=a}") { OptionalResultMap().apply { put("optionalResult", it.optionalResult) } }, diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java index 650faf6f..815dce54 100644 --- a/src/test/resources/returnvalue/Check.java +++ b/src/test/resources/returnvalue/Check.java @@ -37,6 +37,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.EnumMap; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -101,18 +102,23 @@ enum Leaf { } enum Kind { - METHOD("method", "method", List.of(Nullability.values()), List.of(Timing.values())), - PROPERTY("property", "field", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)), - MAP("map", "map value", List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)); + METHOD("method", "method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead.", + List.of(Nullability.values()), List.of(Timing.values())), + PROPERTY("property", "field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead.", + List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)), + MAP("map", "map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.", + List.of(Nullability.NULLABLE), List.of(Timing.DONE, Timing.PENDING_IN_ORDER)); final String label; final String resolverKind; + final String holdCompletionStage; final List nullabilities; final List timings; - Kind(String label, String resolverKind, List nullabilities, List timings) { + Kind(String label, String resolverKind, String holdCompletionStage, List nullabilities, List timings) { this.label = label; this.resolverKind = resolverKind; + this.holdCompletionStage = holdCompletionStage; this.nullabilities = nullabilities; this.timings = timings; } @@ -307,6 +313,13 @@ static final class KnownFinding { "java.util.List>> [Item!]!" ); + private static final List pinnedCoverage = List.of( + "7020 return types", + "method: 861 rejected, 171693 executions", + "property: 252 rejected, 27292 executions", + "map: 252 rejected, 27292 executions" + ); + public static boolean check(String[] args, String classpath, PrintStream out) throws Exception { int depth = intArg(args, "--depth", DEPTH); int budget = intArg(args, "--budget", BUDGET); @@ -328,8 +341,8 @@ public static boolean check(String[] args, String classpath, PrintStream out) th List cases = cases(depth); Map> resolvers = compile(cases, classpath); - int rejected = 0; - int runs = 0; + Map rejectedByKind = new EnumMap<>(Kind.class); + Map runsByKind = new EnumMap<>(Kind.class); boolean blocked = false; Set accepted = new LinkedHashSet<>(); Set acceptedReturnTypes = new LinkedHashSet<>(); @@ -341,7 +354,7 @@ public static boolean check(String[] args, String classpath, PrintStream out) th try { schema = schema(testCase, instance); } catch (RuntimeException e) { - rejected++; + rejectedByKind.merge(testCase.kind, 1, Integer::sum); if (flag(args, "--rejected")) { out.println("rejected " + testCase.describe() + ": " + e.getMessage().lines().findFirst().orElse("")); } @@ -356,7 +369,7 @@ public static boolean check(String[] args, String classpath, PrintStream out) th plans: for (Plan plan : plansWithinBudget(testCase, 0, testCase.kind == Kind.METHOD ? budget : propertyBudget)) { for (Timing timing : timings) { - runs++; + runsByKind.merge(testCase.kind, 1, Integer::sum); Violation violation = run(testCase, plan, timing, actual, oracle, returning); if (violation != null) { violations.computeIfAbsent(testCase, c -> new ArrayList<>()).add(violation); @@ -375,6 +388,8 @@ public static boolean check(String[] args, String classpath, PrintStream out) th .map(it -> kind.label + " " + it)) .filter(it -> !accepted.contains(it)) .collect(Collectors.toList()); + int rejected = rejectedByKind.values().stream().mapToInt(Integer::intValue).sum(); + int runs = runsByKind.values().stream().mapToInt(Integer::intValue).sum(); out.printf("depth %d, budget %d (%d for properties and Maps): %d return types, %d rejected by the schema build, %d accepted, %d executions, %.1fs%n", depth, budget, propertyBudget, cases.size(), rejected, accepted.size(), runs, (System.nanoTime() - started) / 1e9); if (blocked) { @@ -415,6 +430,11 @@ public static boolean check(String[] args, String classpath, PrintStream out) th passed = false; } if (depth == DEPTH && budget == BUDGET && propertyBudget == PROPERTY_BUDGET) { + List coverage = new ArrayList<>(List.of(cases.size() + " return types")); + for (Kind kind : Kind.values()) { + coverage.add(kind.label + ": " + rejectedByKind.getOrDefault(kind, 0) + " rejected, " + runsByKind.getOrDefault(kind, 0) + " executions"); + } + passed &= coverageIsPinned(coverage, out); passed &= knownFindingsAreExact(known, failing.keySet(), show, out); } if (passed) { @@ -423,6 +443,23 @@ public static boolean check(String[] args, String classpath, PrintStream out) th return passed; } + private static boolean coverageIsPinned(List coverage, PrintStream out) { + if (coverage.equals(pinnedCoverage)) { + return true; + } + out.println("\nSTALE: this run's coverage differs from pinnedCoverage in Check.java. More rejected return types or fewer executions " + + "means the check stopped exercising something, which no other line of this report fails on:"); + for (int i = 0; i < coverage.size(); i++) { + if (!coverage.get(i).equals(pinnedCoverage.get(i))) { + out.println(" pinned " + pinnedCoverage.get(i) + ", got " + coverage.get(i)); + } + } + out.println("Diff --rejected output against the last commit to see which return types the build now rejects or accepts, " + + "and confirm the change is intended. Then set pinnedCoverage to these counts in the same diff:"); + coverage.forEach(it -> out.println(" \"" + it + "\"")); + return false; + } + private static boolean knownFindingsAreExact(List known, Set failing, int show, PrintStream out) { List stale = new ArrayList<>(); List added = new ArrayList<>(); @@ -592,9 +629,8 @@ static Built build(Case testCase, Plan plan, int level, Context context) { } } case FUTURE_TASK: { - String kind = testCase.kind.resolverKind; - context.failures.add("Resolver " + kind + " '" + context.resolverName + "' resolved to a " + FutureTask.class.getName() + ", which graphql-java can't wait on. " - + "Return a CompletionStage, such as a CompletableFuture, from the " + kind + " or its generic wrapper transformer instead."); + context.failures.add("Resolver " + testCase.kind.resolverKind + " '" + context.resolverName + "' resolved to a " + FutureTask.class.getName() + + ", which graphql-java can't wait on. " + testCase.kind.holdCompletionStage); FutureTask task = new FutureTask<>(() -> null); task.run(); return new Built(task, null, "FutureTask"); From db5afdc1300f1542414f0e328b7f7220dbed2d6d Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 20:11:16 -0500 Subject: [PATCH 53/64] Describe the pinned coverage and every field without a getter in the rule table and the bounded check skill --- .../verify-return-value-unwrapping/SKILL.md | 36 +++++++++++++------ AGENTS.md | 4 +-- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index ac8f6f36..f0a32b40 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -1,13 +1,13 @@ --- name: verify-return-value-unwrapping -description: Exhaustively check, up to a bound, that the value of a resolver method, public field or typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to TypeShape (the type walk, ContainerKind, the generic wrapper rules or the Unwrapper), the data fetchers in MethodFieldResolver, PropertyFieldResolver or MapFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. +description: Exhaustively check, up to a bound, that the value of a resolver method, a field with no matching getter or a typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to TypeShape (the type walk, ContainerKind, the generic wrapper rules or the Unwrapper), the data fetchers in MethodFieldResolver, PropertyFieldResolver or MapFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. --- # Verify return value unwrapping ## The property -A user writes a resolver method, a public field or a `Map` whose type nests containers, such as +A user writes a resolver method, a field with no matching getter (of any visibility) or a `Map` whose type nests containers, such as `CompletableFuture>>`. If the schema build accepts it, then graphql-java must get exactly the value it returned, with every container removed. Futures are waited on and generic wrappers go through their transformers. List order and nulls are kept. A failed future or a throwing transformer fails the field. @@ -74,12 +74,26 @@ as `-Dunwrapping.args`, and prints the report. On a failure it also prints the p | 0 | `PASS`, or `PASS apart from the known findings above` | | 1 | `FAIL`: a return type that isn't a known finding breaks the property. `NEW`: a known finding matches more accepted return types than its line records | | 2 | `MODEL ERROR`: the checkout or the check didn't compile, the build rejected a return type the check must exercise, or a `ContainerKind` in `TypeShape.kt` has no `Container` in `Check.java`, so a pass would prove nothing | -| 3 | `STALE`: a known finding matches a return type that no longer fails, or fewer accepted return types than its line records | +| 3 | `STALE`: a known finding matches a return type that no longer fails, or fewer accepted return types than its line records. Or the run's coverage differs from `pinnedCoverage` in `Check.java` | Options: `--depth N`, `--budget N`, `--property-budget N`, `--show N` (counterexamples and stale return types printed, default 15), and `--rejected`, which lists every combination the schema build rejected, with the build's error. A depth below 3 can't build the `mustAccept` return types, so it ends in `MODEL ERROR`. `NEW` and `STALE` apply only at the default depth and budgets, because the -counts in `known-findings.txt` are for those. +counts in `known-findings.txt` and `pinnedCoverage` are for those. A run with other bounds checks values only. + +## Pinned coverage + +`pinnedCoverage` in `Check.java` records how many return types the check generates, and for each kind how many of them +the schema build rejects and how many executions run. A run at the default bounds whose counts differ is `STALE`, and the +report prints the pinned and the new counts. Without the pin, a change that makes the build reject more return types, +skips generating some shapes, or runs fewer values per return type would still print `PASS`, because nothing it stopped +running can fail. + +When the counts move, diff `--rejected` output against the last commit to see which return types the build now rejects +or accepts, and confirm the change is intended. A change to `Check.java` itself moves the counts with no change in +`--rejected`. Then copy the counts the report prints into `pinnedCoverage` in the same diff, so a reviewer sees what the +check stopped or started covering. A change that rejects one return type and accepts another of the same kind, with the +same number of executions, keeps the counts and gets past the pin. ## Reading a counterexample @@ -147,15 +161,15 @@ or delete it when none fail, so that a regression shows up as `FAIL`. and DataLoader futures. - Lists of more than 2 elements, more than 2 non-default choices per value, more than 3 containers, and completion orders other than the two listed. A pass says nothing beyond those bounds. -- Which return types the schema build should reject. The check only exercises what the build accepts. With no known - findings, a return type the build stops accepting fails the check only when it's in `mustAccept`, so after a change - to the build or to a resolver's `createDataFetcher`, diff `--rejected` output against the last commit. -- Untyped Maps, whose value type is `Object`, properties with a getter (those run as methods), and properties and Maps on - a type below the root other than `Holder`. `ResolverCompatibilityTest` pins untyped Maps and Kotlin `@JvmField`s. +- Which return types the schema build should reject. The check only exercises what the build accepts. A change in how + many it rejects fails through `pinnedCoverage`, but the check doesn't judge whether the new count is right. +- Untyped Maps, whose value type is `Object`, properties with a getter (those run as methods), non-public fields (the + generated ones are public, and the same data fetcher reads private ones), and properties and Maps on a type below the + root other than `Holder`. `ResolverCompatibilityTest` pins untyped Maps and Kotlin `@JvmField`s. ## Coverage and sync -Last confirmed to describe the code at commit `63c1fa6e` (2026-11-05). It covers: +Last confirmed to describe the code at commit `5ce3d1db` (2026-11-05). It covers: | File | What | |---|---| @@ -168,7 +182,7 @@ Last confirmed to describe the code at commit `63c1fa6e` (2026-11-05). It covers To see whether a change needs another look: ```bash -git log --oneline 63c1fa6e..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +git log --oneline 5ce3d1db..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt ``` Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and diff --git a/AGENTS.md b/AGENTS.md index 34dd67e4..508baf22 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,9 +91,9 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| -| The value of a resolver method, a public field or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | +| The value of a resolver method, a field with no matching getter or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | -| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so any value that differs fails the build | +| A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so a value that differs on a return type they run fails the build. The bounded check also pins how many return types it generates, and for each kind how many the build rejects and how many executions run, so a change that stops running some fails until the same diff updates `pinnedCoverage`. It doesn't judge whether a newly rejected return type should build | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it | | Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | From a26e32feb62c2b26e5de50b3ea8747c90146b618 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 21:23:08 -0500 Subject: [PATCH 54/64] Name the test, comment, extension and return value checks in the rule table --- AGENTS.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 508baf22..23b1caf9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -80,8 +80,9 @@ No check can enforce these, so each one names the mistake it prevents. changes what an app's schema build does, and the unit tests don't build through the public API alone. Failure: an agent skipped the probe on a scanner rewrite because it was a refactor. - **Keep a comment only for a non-obvious why.** No comment that repeats the code, narrates history, or carries an issue or - PR number outside a TODO. Failure: a comment explained what `determineType` returned, which the `namedType` default - already showed, and a follow-up commit deleted it (`7448f2c6`). + PR number outside a TODO. `CommentConventionsTest` catches issue numbers and the history phrases it lists. A comment that + repeats the code, or tells history in other words, gets past it. Failure: a comment explained what `determineType` + returned, which the `namedType` default already showed, and a follow-up commit deleted it (`7448f2c6`). ## Rule table @@ -95,7 +96,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so a value that differs on a return type they run fails the build. The bounded check also pins how many return types it generates, and for each kind how many the build rejects and how many executions run, so a change that stops running some fails until the same diff updates `pinnedCoverage`. It doesn't judge whether a newly rejected return type should build | | One output has one builder. Don't add a second path that builds the same thing | docs only | -| Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it | +| Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it. `TypeExtensionTest` builds and queries a schema with an extension of every kind, so a build that leaves an extension's fields, interfaces, members, values, input fields or directives out of the built type fails it, however the code read them | | Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | | Reuse an existing structure before you add a parallel one | docs only | | Argument conversion goes through one entry point | docs only | @@ -111,16 +112,17 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Directive wirings decide which types become `GraphQLTypeReference` in one place | `TypeReferences` in `DirectiveWiringHelper` | | An object built once at schema build holds no per-request state | docs only | | Add a variant to the existing test class and its shared fixtures | docs only | +| Every test class in `src/test` runs, and so do its assertions | surefire's `**/*` include, so a class runs whatever its name, and `failIfNoTests`, which fails a run that executes no tests. The Kotlin test compile's `-Xassertions=always-enable` makes `assert()`, which `TestUtils.assertEquals` uses, run without `-ea`. `-DfailIfNoTests=false` turns the empty-run check off, and a test that asserts nothing still passes | | A new test fails without the change it guards | docs only | | A fix keeps every shape that worked on the last release | docs only | | A test that builds a schema also queries its fields with `assertEveryFieldResolves` | docs only | -| The first commit of a fix tests the neighbouring shapes, not just the reported one | docs only | +| The first commit of a fix tests the neighbouring shapes, not just the reported one | For return values, the bounded check in `ReturnValueUnwrappingTest` at `mvn verify`, which builds every nesting of up to 3 containers around each leaf type, for methods, properties and Map fields. Docs only for other shapes | | The build passes on JDK 17, the lowest supported version | CI on JDK 17, 21 and 25 | | Run verify-tools before you push a schema-building change | docs only | | The packaged jar holds `module-info.class`, its non-static `requires` resolve from the runtime dependencies, and every class targets the pom's `java.version` | `build/JarCheck.java` at `mvn verify` | | Compiler warnings fail the build | `-Werror` and `failOnWarning` in `pom.xml` | | Check every claim in a PR body or release note at the current head | docs only | -| Keep a comment only for a non-obvious why, with no history and no issue numbers outside a TODO | docs only | +| Keep a comment only for a non-obvious why, with no history and no issue numbers outside a TODO | `CommentConventionsTest`, which reads each comment block in the `.kt` and `.java` files under `src/main` and `src/test` and fails on an issue number or issue link outside `// TODO in X.0.0 (#N)`, a history phrase from its list, or a version such as `@since` or "since 1.2.0". `lint-allow until YYYY-MM-DD by : ` on the line skips that rule there, for at most 90 days. History in words the list doesn't have, and a comment that repeats the code, are docs only | | Build only what was asked | docs only | | A build you trust starts from an empty `target/`, so no class from an earlier build ships | `clean` in `probe.sh install`, docs only for your own `mvn` runs | | Agent worktrees and local settings stay out of commits | `.gitignore` | From 5f68c41ea8b9f2f075a3b14d4c5fa69946fdaefe Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 21:47:20 -0500 Subject: [PATCH 55/64] Build one resolver plan per field and delete the resolver hierarchy ResolverPlan.kt replaces FieldResolverScanner, FieldResolver and the method, property, Map and missing resolvers. Its nested Finder picks the member behind a field, and the plan reads that member's signature once: the argument types, the extra parameters, the source and the return shape. The scan, the data fetcher, the proxy and parameter checks and UnmappedInputFieldChecker read the plan instead of the Method. Member variants are private to the file and only expose a raw read. The plan builds every data fetcher and unwraps every value through TypeShape. The resolver kinds and the extra parameters are enums whose entries the finder and the binding iterate, and the subscription Publisher check and the argument Optional and concrete scalar checks move next to the type walk in TypeShape.kt. SourceResolver keeps its public interface in its own file. ResolverOwnershipTest keeps member reflection in ResolverPlan.kt, container dispatch in TypeShape.kt and TokenBuffer conversion in ArgumentConverter.kt. Messages, lookup order and laziness are unchanged. --- .../graphql/kickstart/tools/ResolverInfo.kt | 34 +- .../kickstart/tools/ScannedSchemaObjects.kt | 4 +- .../kickstart/tools/SchemaClassScanner.kt | 84 +-- .../graphql/kickstart/tools/SchemaParser.kt | 7 +- .../tools/UnmappedInputFieldChecker.kt | 13 +- .../kickstart/tools/resolver/FieldResolver.kt | 49 -- .../tools/resolver/FieldResolverScanner.kt | 292 -------- .../tools/resolver/MapFieldResolver.kt | 76 -- .../tools/resolver/MethodFieldResolver.kt | 253 ------- .../tools/resolver/MissingFieldResolver.kt | 17 - .../tools/resolver/PropertyFieldResolver.kt | 50 -- .../kickstart/tools/resolver/ResolverPlan.kt | 670 ++++++++++++++++++ .../tools/resolver/SourceResolver.kt | 8 + .../kickstart/tools/resolver/TypeShape.kt | 45 +- .../graphql/kickstart/tools/util/Utils.kt | 24 - .../MethodFieldResolverDataFetcherTest.kt | 4 +- .../tools/ResolverCompatibilityTest.kt | 56 ++ .../kickstart/tools/ResolverOwnershipTest.kt | 176 +++++ ...lverScannerTest.kt => ResolverPlanTest.kt} | 72 +- .../kickstart/tools/TypeClassMatcherTest.kt | 6 +- 20 files changed, 1040 insertions(+), 900 deletions(-) delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolverScanner.kt delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt delete mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt create mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt create mode 100644 src/main/kotlin/graphql/kickstart/tools/resolver/SourceResolver.kt create mode 100644 src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt rename src/test/kotlin/graphql/kickstart/tools/{FieldResolverScannerTest.kt => ResolverPlanTest.kt} (58%) diff --git a/src/main/kotlin/graphql/kickstart/tools/ResolverInfo.kt b/src/main/kotlin/graphql/kickstart/tools/ResolverInfo.kt index 638bdfb8..b9fba675 100644 --- a/src/main/kotlin/graphql/kickstart/tools/ResolverInfo.kt +++ b/src/main/kotlin/graphql/kickstart/tools/ResolverInfo.kt @@ -1,6 +1,5 @@ package graphql.kickstart.tools -import graphql.kickstart.tools.resolver.FieldResolverScanner import graphql.kickstart.tools.util.GraphQLRootResolver import graphql.kickstart.tools.util.JavaType import graphql.kickstart.tools.util.eraseUnboundedWildcards @@ -8,7 +7,7 @@ import org.apache.commons.lang3.reflect.TypeUtils import java.lang.reflect.ParameterizedType internal abstract class ResolverInfo { - abstract fun getFieldSearches(): List + abstract fun getFieldSearches(): List fun getRealResolverClass(resolver: GraphQLResolver<*>, options: SchemaParserOptions) = options.proxyHandlers.find { it.canHandle(resolver) } @@ -43,10 +42,10 @@ internal class NormalResolverInfo( return type } - override fun getFieldSearches(): List { + override fun getFieldSearches(): List { return listOf( - FieldResolverScanner.Search(resolverType, this, resolver, dataClassType), - FieldResolverScanner.Search(dataClassType, this, null) + ResolverSearch(resolverType, this, resolver, dataClassType), + ResolverSearch(dataClassType, this, null) ) } } @@ -60,11 +59,11 @@ internal class MultiResolverInfo( private val dataClass: JavaType ) : ResolverInfo() { - override fun getFieldSearches(): List { + override fun getFieldSearches(): List { return resolverInfoList .asSequence() - .map { FieldResolverScanner.Search(it.resolverType, this, it.resolver, it.dataClassType) } - .plus(FieldResolverScanner.Search(dataClass, this, null)) + .map { ResolverSearch(it.resolverType, this, it.resolver, it.dataClassType) } + .plus(ResolverSearch(dataClass, this, null)) .toList() } } @@ -75,16 +74,29 @@ internal class RootResolverInfo( val isSubscription: Boolean = false ) : ResolverInfo() { override fun getFieldSearches() = - resolvers.map { FieldResolverScanner.Search(getRealResolverClass(it, options), this, it) } + resolvers.map { ResolverSearch(getRealResolverClass(it, options), this, it) } } internal class DataClassResolverInfo(private val dataClass: JavaType) : ResolverInfo() { override fun getFieldSearches() = - listOf(FieldResolverScanner.Search(dataClass, this, null)) + listOf(ResolverSearch(dataClass, this, null)) } internal class MissingResolverInfo : ResolverInfo() { - override fun getFieldSearches(): List = listOf() + override fun getFieldSearches(): List = listOf() +} + +internal data class ResolverSearch( + val type: JavaType, + val resolverInfo: ResolverInfo, + val source: Any?, + val requiredFirstParameterType: Class<*>? = null +) { + val isSubscription get() = resolverInfo is RootResolverInfo && resolverInfo.isSubscription + + val firstArgumentIndex get() = if (requiredFirstParameterType != null) 1 else 0 + + fun withoutSourceParameter() = copy(requiredFirstParameterType = null) } internal class ResolverError(message: String, cause: Throwable? = null) : RuntimeException(message, cause) diff --git a/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt b/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt index a17009b1..133851a5 100644 --- a/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt +++ b/src/main/kotlin/graphql/kickstart/tools/ScannedSchemaObjects.kt @@ -1,6 +1,6 @@ package graphql.kickstart.tools -import graphql.kickstart.tools.resolver.FieldResolver +import graphql.kickstart.tools.resolver.ResolverPlan import graphql.kickstart.tools.util.JavaType import graphql.language.FieldDefinition import graphql.schema.GraphQLScalarType @@ -13,7 +13,7 @@ internal data class ScannedSchemaObjects( val definitions: MergedDefinitions, val types: Set>, val customScalars: CustomScalarMap, - val fieldResolversByType: Map>, + val resolverPlansByType: Map>, val unusedTypes: Set>, val directiveOnlyEnums: Set ) diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt index db08b8fb..dfbe38b4 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt @@ -5,21 +5,13 @@ import graphql.kickstart.tools.ScanDictionary.FieldTypeReference import graphql.kickstart.tools.ScanDictionary.InitialDictionaryEntry import graphql.kickstart.tools.ScanDictionary.UnionMemberReference import graphql.kickstart.tools.ScanDictionary.UnusedTypeReference -import graphql.kickstart.tools.resolver.FieldResolver import graphql.kickstart.tools.resolver.FieldResolverError -import graphql.kickstart.tools.resolver.FieldResolverScanner -import graphql.kickstart.tools.resolver.MethodFieldResolver -import graphql.kickstart.tools.resolver.PropertyFieldResolver +import graphql.kickstart.tools.resolver.ResolverPlan import graphql.kickstart.tools.util.* import graphql.language.* import graphql.schema.idl.ScalarInfo -import graphql.schema.idl.TypeUtil import org.apache.commons.lang3.ClassUtils -import org.apache.commons.lang3.reflect.TypeUtils import org.slf4j.LoggerFactory -import java.lang.reflect.Field -import java.lang.reflect.Member -import java.lang.reflect.Modifier /** * @author Andrew Potter @@ -46,15 +38,15 @@ internal class SchemaClassScanner( private val typesByName = definitions.byName private val objectTypesByName = definitions.objectsWithRepeats.associateBy { it.name } - private val fieldResolverScanner = FieldResolverScanner(options, definitions.scalarNames) + private val resolverPlans = ResolverPlan.Finder(options, definitions.scalarNames) private val typeClassMatcher = TypeClassMatcher(definitions) private val unvalidatedTypes = mutableSetOf>() private val queue = linkedSetOf() private val dictionary = ScanDictionary(options, log, typesByName, typeClassMatcher, this.initialDictionary, ::enqueue, ::handleFoundScalarType) private val sealedSubclassMatcher = SealedSubclassMatcher(dictionary) - private val fieldResolversByType = mutableMapOf>() - private val notCallableOnResolver = mutableListOf() + private val resolverPlansByType = mutableMapOf>() + private val notCallableOnResolver = mutableListOf() init { initialDictionary.forEach { (name, clazz) -> @@ -270,17 +262,17 @@ internal class SchemaClassScanner( log.warn("Schema type was defined but can never be accessed, and can be safely deleted: ${definition.name}") } - val fieldResolvers = fieldResolversByType.flatMap { entry -> entry.value.map { it.value } } - val observedNormalResolverInfos = fieldResolvers.map { it.resolverInfo }.filterIsInstance().toSet() - val observedMultiResolverInfos = fieldResolvers.map { it.resolverInfo }.filterIsInstance().flatMap { it.resolverInfoList }.toSet() + val resolverPlans = resolverPlansByType.flatMap { entry -> entry.value.map { it.value } } + val observedNormalResolverInfos = resolverPlans.map { it.resolverInfo }.filterIsInstance().toSet() + val observedMultiResolverInfos = resolverPlans.map { it.resolverInfo }.filterIsInstance().flatMap { it.resolverInfoList }.toSet() (resolverInfos - observedNormalResolverInfos - observedMultiResolverInfos).forEach { resolverInfo -> log.warn("Resolver was provided but no methods on it were used in data fetchers, and can be safely deleted: ${resolverInfo.resolver}") } - validateRootResolversWereUsed(rootTypeHolder.query, fieldResolvers) - validateRootResolversWereUsed(rootTypeHolder.mutation, fieldResolvers) - validateRootResolversWereUsed(rootTypeHolder.subscription, fieldResolvers) + validateRootResolversWereUsed(rootTypeHolder.query, resolverPlans) + validateRootResolversWereUsed(rootTypeHolder.mutation, resolverPlans) + validateRootResolversWereUsed(rootTypeHolder.subscription, resolverPlans) // The enums in unvalidatedTypes come from directives without a class, so they can only be built when no field uses them. // A field hands the enum's values to user code even when the scanner found no class through it, e.g. an input field bound @@ -288,15 +280,15 @@ internal class SchemaClassScanner( val typeNamesUsedByFields = typeNamesUsedByFields(observedDefinitions) val directiveOnlyEnums = unvalidatedTypes.filterIsInstance().filter { it.name !in typeNamesUsedByFields }.toSet() - return ScannedSchemaObjects(dictionary, definitions, observedDefinitions, scalars, fieldResolversByType.toMap(), unusedDefinitions, directiveOnlyEnums) + return ScannedSchemaObjects(dictionary, definitions, observedDefinitions, scalars, resolverPlansByType.toMap(), unusedDefinitions, directiveOnlyEnums) } - private fun validateRootResolversWereUsed(rootType: RootType?, fieldResolvers: List) { + private fun validateRootResolversWereUsed(rootType: RootType?, resolverPlans: List) { if (rootType == null) { return } - val observedRootTypes = fieldResolvers.asSequence().filter { it.resolverInfo is RootResolverInfo && it.resolverInfo == rootType.resolverInfo }.map { it.search.type }.toSet() + val observedRootTypes = resolverPlans.asSequence().filter { it.resolverInfo is RootResolverInfo && it.resolverInfo == rootType.resolverInfo }.map { it.search.type }.toSet() rootType.resolvers.forEach { resolver -> if (rootType.resolverInfo.getRealResolverClass(resolver, options) !in observedRootTypes) { log.warn("Root ${rootType.name} resolver was provided but no methods on it were used in data fetchers for GraphQL type '${rootType.type.name}'! Either remove the ${rootType.resolverInterface.name} interface from the resolver or remove the resolver entirely: $resolver") @@ -424,36 +416,18 @@ internal class SchemaClassScanner( private fun scanResolverInfoForPotentialMatches(type: MergedType.Object, resolverInfo: ResolverInfo) { type.fields.forEach { field -> - val fieldResolver = fieldResolverScanner.findFieldResolver(field, resolverInfo) - collectIfNotCallableOnResolver(type, fieldResolver) + val plan = resolverPlans.find(field, resolverInfo) + plan.notCallableOnResolver(type.name)?.let { notCallableOnResolver += it } - fieldResolversByType.getOrPut(type) { mutableMapOf() }[fieldResolver.field] = fieldResolver + resolverPlansByType.getOrPut(type) { mutableMapOf() }[plan.field] = plan - fieldResolver.scanForMatches().forEach { shape -> + plan.typeShapes().forEach { shape -> dictionary.handleFoundType(typeClassMatcher.match(shape)) } - requireParameterForEachArgument(type, fieldResolver) + plan.requireParameterForEachArgument(type.name) } } - private fun collectIfNotCallableOnResolver(type: MergedType.Object, fieldResolver: FieldResolver) { - val source = fieldResolver.search.source ?: return - val member: Member = when (fieldResolver) { - is MethodFieldResolver -> fieldResolver.method - is PropertyFieldResolver -> fieldResolver.property - else -> return - } - if (Modifier.isStatic(member.modifiers) || member.declaringClass.isInstance(source)) { - return - } - - notCallableOnResolver += NotCallableOnResolver( - "Field '${type.name}.${fieldResolver.field.name}' resolves to ${member.declaringClass.name}.${member.name}, but the resolver is a " + - "${source.javaClass.name}, which isn't a ${member.declaringClass.name}, so every query of the field will fail.", - member is Field - ) - } - private fun throwIfNotCallableOnResolver() { if (notCallableOnResolver.isEmpty()) { return @@ -466,26 +440,6 @@ internal class SchemaClassScanner( ) } - private fun requireParameterForEachArgument(type: MergedType.Object, fieldResolver: FieldResolver) { - if (fieldResolver !is MethodFieldResolver) { - return - } - - fieldResolver.field.inputValueDefinitions.forEachIndexed { index, argument -> - val parameter = fieldResolver.getMethodParameterType(index)?.let { TypeUtils.getRawType(it, fieldResolver.search.type) } ?: return@forEachIndexed - if (!fieldResolverScanner.isContextParameter(parameter, argument)) { - return@forEachIndexed - } - - val method = fieldResolver.method - throw FieldResolverError( - "Field '${type.name}.${fieldResolver.field.name}' has no parameter for its argument '${argument.name}: " + - "${TypeUtil.simplePrint(argument.type)}' in ${method.declaringClass.name}.${method.name}, so the ${parameter.simpleName} " + - "parameter gets the argument instead. Add a parameter for each argument, in order, before the ${parameter.simpleName} parameter." - ) - } - } - private fun handleFoundScalarType(type: MergedType.Scalar) { unvalidatedTypes.add(type) } @@ -496,8 +450,6 @@ internal class SchemaClassScanner( private data class QueueItem(val type: MergedType.Object, val clazz: JavaType) - private data class NotCallableOnResolver(val message: String, val isField: Boolean) - private class RootTypesHolder( options: SchemaParserOptions, rootInfo: RootTypeInfo, diff --git a/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt b/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt index 501a41bc..5f941d24 100644 --- a/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt +++ b/src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt @@ -6,7 +6,6 @@ import graphql.introspection.Introspection.DirectiveLocation.ENUM_VALUE import graphql.introspection.Introspection.DirectiveLocation.FIELD_DEFINITION import graphql.introspection.Introspection.DirectiveLocation.INPUT_FIELD_DEFINITION import graphql.kickstart.tools.directive.DirectiveWiringHelper -import graphql.kickstart.tools.resolver.MethodFieldResolver import graphql.kickstart.tools.util.describe import graphql.kickstart.tools.util.getDocumentation import graphql.kickstart.tools.util.unwrap @@ -39,7 +38,7 @@ class SchemaParser internal constructor( private val types = scanResult.types private val customScalars = scanResult.customScalars private val rootInfo = definitions.rootInfo - private val fieldResolversByType = scanResult.fieldResolversByType + private val resolverPlansByType = scanResult.resolverPlansByType private val unusedDefinitions = definitions.definitionsOf(scanResult.unusedTypes) private val directiveOnlyEnums = scanResult.directiveOnlyEnums @@ -120,7 +119,7 @@ class SchemaParser internal constructor( val wiredInputObjects = wiredObjects.dictionary.filterIsInstance().associateBy { it.name } val checker = UnmappedInputFieldChecker(wiredInputObjects, options.unmappedInputFields) objectDefinitions.forEach { type -> - fieldResolversByType[type].orEmpty().values.filterIsInstance().forEach { checker.check(type.name, it) } + resolverPlansByType[type].orEmpty().values.forEach { checker.check(type.name, it) } } checker.report() } @@ -168,7 +167,7 @@ class SchemaParser internal constructor( createField(field, fieldDefinition, inputObjects) codeRegistryBuilder.dataFetcher( FieldCoordinates.coordinates(objectDefinition.name, fieldDefinition.name), - fieldResolversByType[objectDefinition]?.get(fieldDefinition)?.createDataFetcher() + resolverPlansByType[objectDefinition]?.get(fieldDefinition)?.dataFetcher() ?: throw SchemaError("No resolver method found for object type '${objectDefinition.name}' and field '${fieldDefinition.name}', this is most likely a bug with graphql-java-tools") ) diff --git a/src/main/kotlin/graphql/kickstart/tools/UnmappedInputFieldChecker.kt b/src/main/kotlin/graphql/kickstart/tools/UnmappedInputFieldChecker.kt index dcee5d8b..c1f374e6 100644 --- a/src/main/kotlin/graphql/kickstart/tools/UnmappedInputFieldChecker.kt +++ b/src/main/kotlin/graphql/kickstart/tools/UnmappedInputFieldChecker.kt @@ -1,6 +1,6 @@ package graphql.kickstart.tools -import graphql.kickstart.tools.resolver.MethodFieldResolver +import graphql.kickstart.tools.resolver.ResolverPlan import graphql.kickstart.tools.util.unwrap import graphql.schema.GraphQLInputObjectField import graphql.schema.GraphQLInputObjectType @@ -32,14 +32,13 @@ internal class UnmappedInputFieldChecker( private val messages = linkedMapOf() - fun check(objectType: String, resolver: MethodFieldResolver) { - resolver.field.inputValueDefinitions.forEachIndexed { index, argument -> - val inputObject = inputObjects[argument.type.unwrap().name] ?: return@forEachIndexed - val usage = "argument '${argument.name}' of field '$objectType.${resolver.field.name}'" + fun check(objectType: String, plan: ResolverPlan) { + plan.argumentTargets.forEach { (argument, parameterType) -> + val inputObject = inputObjects[argument.type.unwrap().name] ?: return@forEach + val usage = "argument '${argument.name}' of field '$objectType.${plan.field.name}'" try { - val parameterType = resolver.getMethodParameterType(index) ?: return@forEachIndexed - val reads = StrictReads(resolver.objectMapper) + val reads = StrictReads(plan.objectMapper) val deserializer = reads.context.findRootValueDeserializer(reads.mapper.typeFactory.constructType(parameterType)) checkFields(reads, deserializer, null, inputObject, usage) } catch (e: VirtualMachineError) { diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt deleted file mode 100644 index 22a93e03..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolver.kt +++ /dev/null @@ -1,49 +0,0 @@ -package graphql.kickstart.tools.resolver - -import graphql.kickstart.tools.* -import graphql.language.FieldDefinition -import graphql.schema.DataFetcher -import graphql.schema.DataFetchingEnvironment -import org.apache.commons.lang3.reflect.TypeUtils - -/** - * @author Andrew Potter - */ -internal abstract class FieldResolver( - val field: FieldDefinition, - val search: FieldResolverScanner.Search, - val options: SchemaParserOptions -) { - val resolverInfo: ResolverInfo = search.resolverInfo - - abstract fun scanForMatches(): Sequence - - abstract fun createDataFetcher(): DataFetcher<*> - - /** - * Add source resolver depending on whether or not this is a resolver method - */ - protected fun createSourceResolver(): SourceResolver { - return if (this.search.source != null) { - SourceResolver { _, _ -> this.search.source } - } else { - SourceResolver { environment, sourceObject -> - // if source object is known, environment is null as an optimization (LightDataFetcher) - val source = sourceObject - ?: environment?.getSource() - ?: throw ResolverError("Expected DataFetchingEnvironment and source object to not be null!") - - if (!TypeUtils.isAssignable(source.javaClass, this.search.type)) { - throw ResolverError("Expected source object to be an instance of '${TypeUtils.getRawType(this.search.type, this.search.type).name}' but instead got '${source.javaClass.name}'") - } - - source - } - } - } -} - -fun interface SourceResolver { - - fun resolve(environment: DataFetchingEnvironment?, source: Any?): Any -} diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolverScanner.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolverScanner.kt deleted file mode 100644 index 561096b6..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/FieldResolverScanner.kt +++ /dev/null @@ -1,292 +0,0 @@ -package graphql.kickstart.tools.resolver - -import graphql.GraphQLContext -import graphql.Scalars -import graphql.kickstart.tools.ResolverInfo -import graphql.kickstart.tools.RootResolverInfo -import graphql.kickstart.tools.SchemaParserOptions -import graphql.kickstart.tools.util.* -import graphql.language.FieldDefinition -import graphql.language.InputValueDefinition -import graphql.schema.DataFetchingEnvironment -import graphql.schema.idl.ScalarInfo -import kotlinx.coroutines.channels.ReceiveChannel -import org.apache.commons.lang3.ClassUtils -import org.apache.commons.lang3.reflect.FieldUtils -import org.apache.commons.lang3.reflect.TypeUtils -import org.reactivestreams.Publisher -import org.slf4j.LoggerFactory -import java.lang.reflect.* -import kotlin.reflect.full.extensionReceiverParameter -import kotlin.reflect.jvm.kotlinFunction - -/** - * @author Andrew Potter - */ -internal class FieldResolverScanner(val options: SchemaParserOptions, private val scalarNames: Set) { - - private val log = LoggerFactory.getLogger(javaClass) - - private val allowedTrailingParameterTypes = listOfNotNull(DataFetchingEnvironment::class.java, GraphQLContext::class.java, options.contextClass) - - private val methodsByNameCache = mutableMapOf, Boolean>, Map>>() - - fun findFieldResolver(field: FieldDefinition, resolverInfo: ResolverInfo): FieldResolver { - val searches = resolverInfo.getFieldSearches() - - val scanProperties = field.inputValueDefinitions.isEmpty() - val found = searches.mapNotNull { search -> findFieldResolver(field, search, scanProperties) } - - if (resolverInfo is RootResolverInfo && found.size > 1) { - throw FieldResolverError("Found more than one matching resolver for field '$field': $found") - } - - return found.firstOrNull() - ?: missingFieldResolver(field) - ?: findSourcelessFieldResolver(field, searches) - ?: throw FieldResolverError(getMissingFieldMessage(field, searches, scanProperties)) - } - - private fun findFieldResolver(field: FieldDefinition, search: Search, scanProperties: Boolean): FieldResolver? { - val method = findResolverMethod(field, search) - if (method != null) { - return MethodFieldResolver(field, search, options, method.apply(trySetAccessible(field, search.type)), scalarNames) - } - - if (scanProperties) { - val property = findResolverProperty(field, search) - if (property != null) { - return PropertyFieldResolver(field, search, options, property.apply(trySetAccessible(field, search.type))) - } - } - - if (Map::class.java.isAssignableFrom(search.type.unwrap())) { - return MapFieldResolver(field, search, options, search.type.unwrap()) - } - - return null - } - - private fun trySetAccessible(field: FieldDefinition, type: JavaType): AccessibleObject.() -> Unit = { - try { - isAccessible = true - } catch (e: RuntimeException) { - log.warn("Unable to make field ${type.unwrap().name}#${field.name} accessible. " + - "Be sure to provide a resolver or open the enclosing module if possible.") - } - } - - private fun missingFieldResolver(field: FieldDefinition): FieldResolver? { - return if (options.allowUnimplementedResolvers || options.missingResolverDataFetcherProvider != null) { - if (options.allowUnimplementedResolvers) { - log.warn("Missing resolver for field: $field") - } - - MissingFieldResolver(field, options) - } else { - null - } - } - - private fun findSourcelessFieldResolver(field: FieldDefinition, searches: List): FieldResolver? = - searches.firstNotNullOfOrNull { search -> - val sourceType = search.requiredFirstParameterType ?: return@firstNotNullOfOrNull null - val sourceless = search.withoutSourceParameter() - findMethodByName(field, sourceless) { isSourcelessMethod(it, field, sourceless, sourceType) }?.let { method -> - MethodFieldResolver(field, sourceless, options, method.apply(trySetAccessible(field, search.type)), scalarNames) - } - } - - private fun isSourcelessMethod(method: Method, field: FieldDefinition, search: Search, sourceType: Class<*>): Boolean { - val arguments = field.inputValueDefinitions - val parameterTypes = method.parameterTypes - - return method.parameterCountWithoutContinuation() > arguments.size && - arguments.indices.none { isContextParameter(parameterTypes[it], arguments[it]) } && - (arguments.isEmpty() || !couldTakeSource(parameterTypes[0], sourceType)) && - verifyMethodArguments(method, arguments.size, search) - } - - private fun couldTakeSource(parameterType: Class<*>, sourceType: Class<*>) = - sourceType.isAssignableFrom(parameterType) || parameterType.isAssignableFrom(sourceType) - - // the context class can also be an argument's type (e.g. a Map for an input object), so only spec scalars count for it - fun isContextParameter(parameter: Class<*>, argument: InputValueDefinition): Boolean = - parameter in allowedTrailingParameterTypes && - (parameter != options.contextClass || argument.type.unwrap().name in ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS) - - private fun findResolverMethod(field: FieldDefinition, search: Search): Method? { - val argumentCount = field.inputValueDefinitions.size + search.firstArgumentIndex - return findMethodByName(field, search) { verifyMethodArguments(it, argumentCount, search) } - } - - private inline fun findMethodByName(field: FieldDefinition, search: Search, matches: (Method) -> Boolean): Method? { - val methodsByName = getMethodsByName(search) - val name = field.name - val capitalizedName = name.replaceFirstChar(Char::titlecase) - - // Check for the following one by one: - // 1. Method with exact field name - // 2. Method that returns a boolean with "is" style getter - // 3. Method with "get" style getter - // 4. Method with "getField" style getter - // 5. Method with "get" style getter with the field name converted from snake_case to camelCased. ex: key_ops -> getKeyOps() - return listOfNotNull( - name, - if (isBoolean(field.type)) "is$capitalizedName" else null, - "get$capitalizedName", - "getField$capitalizedName", - "get${name.snakeToCamelCase()}" - ).firstNotNullOfOrNull { methodName -> - methodsByName[methodName]?.find { matches(it) } - } - } - - // root fields are searched on every root resolver, so each class's methods are only indexed once - private fun getMethodsByName(search: Search): Map> = - methodsByNameCache.getOrPut(search.type.unwrap() to search.isSubscription) { - getAllMethods(search).groupBy { it.name } - } - - private fun getAllMethods(search: Search): List { - val type = search.type.unwrap() - val declaredMethods = type.declaredNonProxyMethods - val superClassesMethods = ClassUtils.getAllSuperclasses(type).flatMap { it.methods.toList() } - val interfacesMethods = ClassUtils.getAllInterfaces(type).flatMap { it.methods.toList() } - - return (declaredMethods + superClassesMethods + interfacesMethods) - .asSequence() - .filter { !it.isSynthetic } - .filter { !Modifier.isPrivate(it.modifiers) } - // discard any methods that are coming off the root of the class hierarchy - // to avoid issues with duplicate method declarations - .filter { it.declaringClass != Any::class.java } - // subscription resolvers must return a publisher - .filter { !search.isSubscription || resolverMethodReturnsPublisher(it) } - .toList() - } - - private fun resolverMethodReturnsPublisher(method: Method) = - // suspend functions and unbounded type variables are erased to Object, so the actual return type is unknown here - method.returnType == Any::class.java - || Publisher::class.java.isAssignableFrom(method.returnType) - || resolverMethodReturnsPublisherFuture(method) - || receiveChannelToPublisherWrapper(method) - - private fun resolverMethodReturnsPublisherFuture(method: Method) = - method.genericReturnType.futureValueType() - ?.let { if (it is WildcardType) it.upperBounds.first() else it } - ?.let { TypeUtils.isAssignable(it, Publisher::class.java) } == true - - private fun receiveChannelToPublisherWrapper(method: Method) = - ReceiveChannel::class.java.isAssignableFrom(method.returnType) - && options.genericWrappers.any { wrapper -> - val isReceiveChannelWrapper = wrapper.type == method.returnType - // lambdas are erased to return Object, so this only checks that the transformer can return a Publisher - val hasPublisherTransformer = wrapper - .transformer.javaClass - .declaredMethods - .filter { it.name == "invoke" } - .any { it.returnType.isAssignableFrom(Publisher::class.java) } - isReceiveChannelWrapper && hasPublisherTransformer - } - - private fun isBoolean(type: GraphQLLangType) = type.unwrap().name == Scalars.GraphQLBoolean.name - - private fun verifyMethodArguments(method: Method, requiredCount: Int, search: Search): Boolean { - val appropriateFirstParameter = if (search.requiredFirstParameterType != null) { - method.genericParameterTypes.firstOrNull()?.let { - it.eraseUnboundedWildcards() == search.requiredFirstParameterType || method.declaringClass.typeParameters.contains(it) - } ?: false - } else { - // an extension receiver can only take the source object - !isExtensionFunction(method) - } - - val methodParameterCount = method.parameterCountWithoutContinuation() - - val correctParameterCount = methodParameterCount >= requiredCount && - method.parameterTypes.slice(requiredCount until methodParameterCount).all { it in allowedTrailingParameterTypes } - return correctParameterCount && appropriateFirstParameter - } - - private fun isExtensionFunction(method: Method): Boolean { - return try { - method.kotlinFunction?.extensionReceiverParameter != null - } catch (e: InternalError) { - false - } - } - - private fun findResolverProperty(field: FieldDefinition, search: Search) = - FieldUtils.getAllFields(search.type.unwrap()).find { it.name == field.name } - - private fun getMissingFieldMessage(field: FieldDefinition, searches: List, scannedProperties: Boolean): String { - val signatures = mutableListOf("") - val isBoolean = isBoolean(field.type) - var isSubscription = false - - searches.forEach { search -> - signatures.addAll(getMissingMethodSignatures(field, search, isBoolean, scannedProperties)) - isSubscription = isSubscription || search.isSubscription - } - searches.filter { it.requiredFirstParameterType != null }.forEach { search -> - signatures.addAll(getMissingMethodSignatures(field, search.withoutSourceParameter(), isBoolean, false, "")) - } - - val sourceName = field.sourceLocation?.sourceName ?: "" - val sourceLocation = field.sourceLocation?.let { "$sourceName:${it.line}" } ?: "" - - return "No method${if (scannedProperties) " or field" else ""} found as defined in schema $sourceLocation with any of the following signatures " + - "(optionally followed by any of $allowedTrailingParameterTypes), in priority order:\n${signatures.joinToString("\n ")}" + - if (isSubscription) "\n\nNote that a Subscription data fetcher must return a Publisher of events" else "" - } - - private fun getMissingMethodSignatures( - field: FieldDefinition, - search: Search, - isBoolean: Boolean, - scannedProperties: Boolean, - trailingParameter: String? = null - ): List { - val baseType = search.type.unwrap() - val signatures = mutableListOf() - val args = mutableListOf() - val sep = ", " - - if (search.requiredFirstParameterType != null) { - args.add(search.requiredFirstParameterType.name) - } - - args.addAll(field.inputValueDefinitions.map { "~${it.name}" }) - trailingParameter?.let(args::add) - - val argString = args.joinToString(sep) - - signatures.add("${baseType.name}.${field.name}($argString)") - if (isBoolean) { - signatures.add("${baseType.name}.is${field.name.replaceFirstChar(Char::titlecase)}($argString)") - } - signatures.add("${baseType.name}.get${field.name.replaceFirstChar(Char::titlecase)}($argString)") - if (scannedProperties) { - signatures.add("${baseType.name}.${field.name}") - } - - return signatures - } - - data class Search( - val type: JavaType, - val resolverInfo: ResolverInfo, - val source: Any?, - val requiredFirstParameterType: Class<*>? = null - ) { - val isSubscription get() = resolverInfo is RootResolverInfo && resolverInfo.isSubscription - - val firstArgumentIndex get() = if (requiredFirstParameterType != null) 1 else 0 - - fun withoutSourceParameter() = copy(requiredFirstParameterType = null) - } -} - -internal class FieldResolverError(msg: String) : RuntimeException(msg) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt deleted file mode 100644 index fa33e15e..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +++ /dev/null @@ -1,76 +0,0 @@ -package graphql.kickstart.tools.resolver - -import com.fasterxml.classmate.TypeResolver -import graphql.kickstart.tools.ScanDictionary -import graphql.kickstart.tools.SchemaParserOptions -import graphql.kickstart.tools.util.JavaType -import graphql.kickstart.tools.util.unwrap -import graphql.language.FieldDefinition -import graphql.schema.DataFetcher -import graphql.schema.DataFetchingEnvironment -import graphql.schema.GraphQLFieldDefinition -import graphql.schema.LightDataFetcher -import java.util.function.Supplier - -/** - * @author Nick Weedon - * - * The MapFieldResolver implements the Map (i.e. property map) specific portion of the logic within the GraphQL PropertyDataFetcher class. - */ -internal class MapFieldResolver( - field: FieldDefinition, - search: FieldResolverScanner.Search, - options: SchemaParserOptions, - mapClass: JavaType -) : FieldResolver(field, search, options) { - - private val mapGenericValue: JavaType = getMapGenericType(mapClass) - - /** - * Takes a type which implements Map and tries to find the - * value type of that map. For some reason, mapClass is losing - * its generics somewhere along the way and is always a raw - * type. - */ - private fun getMapGenericType(mapClass: JavaType): JavaType { - val resolvedType = TypeResolver().resolve(mapClass) - val typeParameters = resolvedType.typeParametersFor(Map::class.java) - - return typeParameters.elementAtOrElse(1) { Any::class.java } - } - - private val returnShape by lazy { - TypeShape.returnType(field.type, mapGenericValue, search.isSubscription, search.type, options, ScanDictionary.FieldTypeReference(field.name)) - } - - private val hasTypedValues get() = resolveTypeVariables(mapGenericValue, search.type) != Any::class.java - - override fun createDataFetcher(): DataFetcher<*> { - val unwrapper = if (hasTypedValues) TypeShape.Unwrapper(returnShape, ResolverKind.MAP_VALUE, "${search.type.unwrap().name}.${field.name}") else null - return MapFieldResolverDataFetcher(createSourceResolver(), field.name, unwrapper) - } - - override fun scanForMatches(): Sequence = sequenceOf(returnShape) - - override fun toString() = "MapFieldResolver{key=${field.name}}" -} - -internal class MapFieldResolverDataFetcher( - private val sourceResolver: SourceResolver, - private val key: String, - private val unwrapper: TypeShape.Unwrapper? -) : LightDataFetcher { - - override fun get(fieldDefinition: GraphQLFieldDefinition, sourceObject: Any?, environmentSupplier: Supplier): Any? { - if (sourceObject is Map<*, *>) { - val value = sourceObject[key] - return if (value == null || unwrapper == null) value else unwrapper.unwrap(value, environmentSupplier) - } else { - throw RuntimeException("MapFieldResolver attempt to fetch a field from an object instance that was not a map") - } - } - - override fun get(environment: DataFetchingEnvironment): Any? { - return get(environment.fieldDefinition, sourceResolver.resolve(environment, null)) { environment } - } -} diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt deleted file mode 100644 index 24ec4c19..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt +++ /dev/null @@ -1,253 +0,0 @@ -package graphql.kickstart.tools.resolver - -import graphql.GraphQLContext -import graphql.kickstart.tools.* -import graphql.kickstart.tools.util.JavaType -import graphql.kickstart.tools.util.coroutineScope -import graphql.kickstart.tools.util.isSuspendFunction -import graphql.kickstart.tools.util.parameterCountWithoutContinuation -import graphql.kickstart.tools.util.typeArgument -import graphql.kickstart.tools.util.unwrap -import graphql.language.* -import graphql.schema.DataFetcher -import graphql.schema.DataFetchingEnvironment -import graphql.schema.GraphQLFieldDefinition -import graphql.schema.LightDataFetcher -import kotlinx.coroutines.CoroutineStart -import kotlinx.coroutines.ensureActive -import kotlinx.coroutines.future.future -import org.apache.commons.lang3.reflect.TypeUtils -import tools.jackson.databind.ObjectMapper -import java.lang.reflect.InvocationTargetException -import java.lang.reflect.Method -import java.util.* -import java.util.function.Supplier -import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn -import kotlin.reflect.jvm.javaType -import kotlin.reflect.jvm.kotlinFunction - -/** - * @author Andrew Potter - */ -internal class MethodFieldResolver( - field: FieldDefinition, - search: FieldResolverScanner.Search, - options: SchemaParserOptions, - val method: Method, - private val scalarNames: Set -) : FieldResolver(field, search, options) { - - private val isSuspendFunction = method.isSuspendFunction() - private val numberOfParameters = method.parameterCountWithoutContinuation() - - internal val objectMapper: ObjectMapper by lazy { options.objectMapperProvider.provide(field) } - - override fun createDataFetcher(): DataFetcher<*> { - val args = mutableListOf() - val mapper = objectMapper - - if (this.search.requiredFirstParameterType != null) { - val expectedType = this.search.requiredFirstParameterType - - args.add { environment -> - val source = environment.getSource() - ?: throw ResolverError("Expected source object to not be null!") - if (!expectedType.isAssignableFrom(source.javaClass)) { - throw ResolverError("Source type (${source.javaClass.name}) is not expected type (${expectedType.name})!") - } - - source - } - } - - // Add an argument for each argument defined in the GraphQL schema - this.field.inputValueDefinitions.forEachIndexed { index, definition -> - - val parameterType = this.getMethodParameterType(index) - ?: throw ResolverError("Missing method type at position ${this.getJavaMethodParameterIndex(index)}, this is most likely a bug with graphql-java-tools") - - val isNonNull = definition.type is NonNullType - val isOptional = TypeUtils.getRawType(parameterType, search.type) == Optional::class.java - val argumentConverter = ArgumentConverter(mapper, parameterType) - val parameterClass = parameterType.unwrap() - val isConcreteScalar = isConcreteScalarType(definition.type, parameterType) - - args.add { environment -> - val argumentPresent = environment.arguments.containsKey(definition.name) - if (!argumentPresent && isNonNull) { - throw ResolverError("Missing required argument with name '${definition.name}', this is most likely a bug with graphql-java-tools") - } - - val value = environment.arguments[definition.name] - - if (value == null && isOptional) { - if (options.inputArgumentOptionalDetectOmission && !environment.containsArgument(definition.name)) { - return@add null - } - return@add Optional.empty() - } - - if (value == null || !isConcreteScalar || !parameterClass.isInstance(value)) { - return@add argumentConverter.convert(value) - } - - return@add value - } - } - - // Add DataFetchingEnvironment/Context arguments, stopping before the Continuation parameter of a suspend function - val firstTrailingParameter = field.inputValueDefinitions.size + search.firstArgumentIndex - method.parameterTypes.slice(firstTrailingParameter until numberOfParameters).forEach { parameterType -> - when (parameterType) { - GraphQLContext::class.java -> args.add { environment -> environment.graphQlContext } - - options.contextClass -> args.add { environment -> - environment.graphQlContext.get(parameterType) ?: throw ResolverError( - "Resolver method '${method.declaringClass.name}.${method.name}' has a parameter of the context class " + - "'${parameterType.name}', but the GraphQLContext has no value for it. Put it in the GraphQLContext under " + - "the class key when building the ExecutionInput, for example " + - "graphQLContext(mapOf(${parameterType.simpleName}::class.java to context))." - ) - } - - else -> args.add { environment -> environment } - } - } - - val unwrapper = TypeShape.Unwrapper(returnShape, ResolverKind.METHOD, "${method.declaringClass.name}.${method.name}", isSuspendFunction) - - return if (numberOfParameters > 0 || isSuspendFunction) { - // requires arguments and environment or is a suspend function - MethodFieldResolverDataFetcher(createSourceResolver(), this.method, args, options, isSuspendFunction, unwrapper) - } else { - // if there are no parameters an optimized version of the data fetcher can be used - LightMethodFieldResolverDataFetcher(createSourceResolver(), this.method, unwrapper) - } - } - - /** - * A concrete scalar type is a scalar type where values always coerce to the same Java type. The ID scalar type is not concrete - * because values can be coerced to multiple different Java types (eg. String, Long, UUID). All values of a non-concrete scalar - * type must be converted to the target method parameter type. - */ - private fun isConcreteScalarType(type: Type<*>, genericParameterType: JavaType): Boolean { - return when (type) { - is ListType -> genericParameterType.typeArgument(List::class.java) - ?.let { isConcreteScalarType(type.type, it) } ?: false - - is TypeName -> type.name in scalarNames && type.name != "ID" - is NonNullType -> isConcreteScalarType(type.type, genericParameterType) - else -> false - } - } - - // each shape is walked only when the scanner gets to it, so an earlier match's dictionary error is reported first - override fun scanForMatches(): Sequence = sequence { - field.inputValueDefinitions.forEachIndexed { i, inputDefinition -> - yield(TypeShape.parameterType(inputDefinition.type, getMethodParameterType(i)!!, search.type, options, ScanDictionary.MethodParameterReference(method, i))) - } - yield(returnShape) - } - - private val returnShape by lazy { - val declaredType = try { - method.kotlinFunction?.returnType?.javaType ?: method.genericReturnType - } catch (e: InternalError) { - method.genericReturnType - } - TypeShape.returnType(field.type, resolveTypeVariables(declaredType, search.type), search.isSubscription, search.type, options, ScanDictionary.ReturnValueReference(method)) - } - - private fun getJavaMethodParameterIndex(index: Int) = index + search.firstArgumentIndex - - internal fun getMethodParameterType(index: Int): JavaType? { - val methodIndex = getJavaMethodParameterIndex(index) - val parameters = method.parameterTypes - - return if (parameters.size > methodIndex) { - resolveTypeVariables(method.genericParameterTypes[methodIndex], search.type) - } else { - null - } - } - - override fun toString() = "MethodFieldResolver{method=$method}" -} - -internal class MethodFieldResolverDataFetcher( - private val sourceResolver: SourceResolver, - private val method: Method, - private val args: List, - private val options: SchemaParserOptions, - private val isSuspendFunction: Boolean, - private val unwrapper: TypeShape.Unwrapper -) : DataFetcher { - - override fun get(environment: DataFetchingEnvironment): Any? { - val source = sourceResolver.resolve(environment, null) - val args = this.args.map { it(environment) }.toTypedArray() - - return if (isSuspendFunction) { - // start undispatched so DataLoader loads are queued before graphql-java dispatches them, - // which runs the block even if the context is already cancelled, hence ensureActive - environment.coroutineScope().future(options.coroutineContextProvider.provide(), CoroutineStart.UNDISPATCHED) { - ensureActive() - invokeSuspend(source, method, args)?.let { unwrapper.unwrapSuspending(it) { environment } } - } - } else { - invoke(method, source, args)?.let { unwrapper.unwrap(it) { environment } } - } - } - - /** - * Function that returns the object used to fetch the data. It can be a DataFetcher or an entity. - */ - @Suppress("unused") - fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any { - return sourceResolver.resolve(environment, null) - } -} - -/** - * Similar to [MethodFieldResolverDataFetcher] but for light data fetchers which do not require the environment to be supplied unless generic wrappers are used. - */ -internal class LightMethodFieldResolverDataFetcher( - private val sourceResolver: SourceResolver, - private val method: Method, - private val unwrapper: TypeShape.Unwrapper -) : LightDataFetcher { - - override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? { - val source = sourceResolver.resolve(null, sourceObject) - - return invoke(method, source, emptyArray())?.let { unwrapper.unwrap(it, environmentSupplier) } - } - - override fun get(environment: DataFetchingEnvironment): Any? { - return get(environment.fieldDefinition, sourceResolver.resolve(environment, null)) { environment } - } - - /** - * Function that returns the object used to fetch the data. It can be a DataFetcher or an entity. - */ - @Suppress("unused") - fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any { - return sourceResolver.resolve(environment, null) - } -} - -private suspend inline fun invokeSuspend(target: Any, resolverMethod: Method, args: Array): Any? { - return suspendCoroutineUninterceptedOrReturn { continuation -> - invoke(resolverMethod, target, args + continuation) - } -} - -private fun invoke(method: Method, instance: Any, args: Array): Any? { - try { - return method.invoke(instance, *args) - } catch (e: InvocationTargetException) { - throw e.cause ?: RuntimeException("Unknown error occurred while invoking resolver method") - } -} - -internal typealias ArgumentPlaceholder = (DataFetchingEnvironment) -> Any? diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt deleted file mode 100644 index 98f6f00a..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/MissingFieldResolver.kt +++ /dev/null @@ -1,17 +0,0 @@ -package graphql.kickstart.tools.resolver - -import graphql.kickstart.tools.MissingResolverInfo -import graphql.kickstart.tools.SchemaParserOptions -import graphql.language.FieldDefinition -import graphql.schema.DataFetcher - -internal class MissingFieldResolver( - field: FieldDefinition, - options: SchemaParserOptions -) : FieldResolver(field, FieldResolverScanner.Search(Any::class.java, MissingResolverInfo(), null), options) { - - private val missingResolverDataFetcherProvider: MissingResolverDataFetcherProvider = options.missingResolverDataFetcherProvider - ?: MissingResolverDataFetcherProvider { _, _ -> DataFetcher { TODO("Schema resolver not implemented") } } - override fun scanForMatches(): Sequence = emptySequence() - override fun createDataFetcher(): DataFetcher<*> = missingResolverDataFetcherProvider.createDataFetcher(field, options) -} diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt deleted file mode 100644 index 112ead6c..00000000 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt +++ /dev/null @@ -1,50 +0,0 @@ -package graphql.kickstart.tools.resolver - -import graphql.kickstart.tools.ScanDictionary -import graphql.kickstart.tools.SchemaParserOptions -import graphql.language.FieldDefinition -import graphql.schema.DataFetcher -import graphql.schema.DataFetchingEnvironment -import graphql.schema.GraphQLFieldDefinition -import graphql.schema.LightDataFetcher -import java.lang.reflect.Field -import java.util.function.Supplier - -/** - * @author Andrew Potter - */ -internal class PropertyFieldResolver( - field: FieldDefinition, - search: FieldResolverScanner.Search, - options: SchemaParserOptions, - val property: Field -) : FieldResolver(field, search, options) { - - private val returnShape by lazy { - TypeShape.returnType(field.type, property.genericType, search.isSubscription, search.type, options, ScanDictionary.FieldTypeReference(property.toString())) - } - - override fun createDataFetcher(): DataFetcher<*> { - val unwrapper = TypeShape.Unwrapper(returnShape, ResolverKind.FIELD, "${property.declaringClass.name}.${property.name}") - return PropertyFieldResolverDataFetcher(createSourceResolver(), property, unwrapper) - } - - override fun scanForMatches(): Sequence = sequenceOf(returnShape) - - override fun toString() = "PropertyFieldResolver{property=$property}" -} - -internal class PropertyFieldResolverDataFetcher( - private val sourceResolver: SourceResolver, - private val field: Field, - private val unwrapper: TypeShape.Unwrapper -) : LightDataFetcher { - - override fun get(fieldDefinition: GraphQLFieldDefinition, sourceObject: Any?, environmentSupplier: Supplier): Any? { - return field.get(sourceResolver.resolve(null, sourceObject))?.let { unwrapper.unwrap(it, environmentSupplier) } - } - - override fun get(environment: DataFetchingEnvironment): Any? { - return get(environment.fieldDefinition, sourceResolver.resolve(environment, null)) { environment } - } -} diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt new file mode 100644 index 00000000..df227b3f --- /dev/null +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt @@ -0,0 +1,670 @@ +package graphql.kickstart.tools.resolver + +import com.fasterxml.classmate.TypeResolver +import graphql.GraphQLContext +import graphql.Scalars +import graphql.kickstart.tools.MissingResolverInfo +import graphql.kickstart.tools.ResolverError +import graphql.kickstart.tools.ResolverInfo +import graphql.kickstart.tools.ResolverSearch +import graphql.kickstart.tools.RootResolverInfo +import graphql.kickstart.tools.ScanDictionary +import graphql.kickstart.tools.SchemaParserOptions +import graphql.kickstart.tools.util.GraphQLLangType +import graphql.kickstart.tools.util.JavaType +import graphql.kickstart.tools.util.coroutineScope +import graphql.kickstart.tools.util.eraseUnboundedWildcards +import graphql.kickstart.tools.util.snakeToCamelCase +import graphql.kickstart.tools.util.unwrap +import graphql.language.FieldDefinition +import graphql.language.InputValueDefinition +import graphql.language.NonNullType +import graphql.schema.DataFetcher +import graphql.schema.DataFetchingEnvironment +import graphql.schema.GraphQLFieldDefinition +import graphql.schema.LightDataFetcher +import graphql.schema.idl.ScalarInfo +import graphql.schema.idl.TypeUtil +import kotlinx.coroutines.CoroutineStart +import kotlinx.coroutines.ensureActive +import kotlinx.coroutines.future.future +import org.apache.commons.lang3.ClassUtils +import org.apache.commons.lang3.reflect.FieldUtils +import org.apache.commons.lang3.reflect.TypeUtils +import org.slf4j.LoggerFactory +import tools.jackson.databind.ObjectMapper +import java.lang.reflect.AccessibleObject +import java.lang.reflect.Field +import java.lang.reflect.InvocationTargetException +import java.lang.reflect.Method +import java.lang.reflect.Modifier +import java.lang.reflect.Proxy +import java.util.* +import java.util.function.Supplier +import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn +import kotlin.reflect.full.extensionReceiverParameter +import kotlin.reflect.jvm.javaType +import kotlin.reflect.jvm.kotlinFunction + +/** + * How one object field is resolved: the Java member behind it, the type shapes the scan matches, and its data fetcher. Every + * fact about the member's signature is read here once, so the scan, the data fetcher and the checks after the build can't + * disagree about it. + */ +internal class ResolverPlan private constructor( + val field: FieldDefinition, + val search: ResolverSearch, + private val options: SchemaParserOptions, + // null when the field has no resolver and the options allow that + private val member: Member? +) { + val resolverInfo: ResolverInfo get() = search.resolverInfo + + // provided at parse time, once per method field, so the user's provider doesn't run for a schema that fails to scan + val objectMapper: ObjectMapper by lazy { options.objectMapperProvider.provide(field) } + + val argumentTargets: List get() = (member as? MethodMember)?.arguments.orEmpty().map { ArgumentTarget(it.definition, it.type) } + + private val returnShape by lazy { + member?.let { TypeShape.returnType(field.type, it.declaredValueType, search.isSubscription, search.type, options, it.reference) } + } + + // each shape is walked only when the scanner gets to it, so an earlier match's dictionary error is reported first + fun typeShapes(): Sequence = sequence { + (member as? MethodMember)?.arguments?.forEach { yield(it.shape) } + returnShape?.let { yield(it) } + } + + fun dataFetcher(): DataFetcher<*> { + val member = member + ?: return (options.missingResolverDataFetcherProvider ?: notImplemented).createDataFetcher(field, options) + val source = sourceResolver() + return when (member) { + is MethodMember -> { + val slots = member.slots(objectMapper) + val unwrapper = TypeShape.Unwrapper(returnShape!!, ResolverKind.METHOD, member.name, member.isSuspend) + if (slots.isNotEmpty() || member.isSuspend) Fetcher(source, member, slots, options, unwrapper) else LightFetcher(source, source, member, unwrapper) + } + + is PropertyMember -> LightFetcher(source, source, member, TypeShape.Unwrapper(returnShape!!, ResolverKind.FIELD, member.name)) + + is MapMember -> { + val unwrapper = if (member.hasTypedValues) TypeShape.Unwrapper(returnShape!!, ResolverKind.MAP_VALUE, member.name) else null + LightFetcher(source, MapMember.sourceResolver, member, unwrapper) + } + } + } + + private fun sourceResolver(): SourceResolver { + val resolver = search.source + if (resolver != null) { + return SourceResolver { _, _ -> resolver } + } + + return SourceResolver { environment, sourceObject -> + // if source object is known, environment is null as an optimization (LightDataFetcher) + val source = sourceObject + ?: environment?.getSource() + ?: throw ResolverError("Expected DataFetchingEnvironment and source object to not be null!") + + if (!TypeUtils.isAssignable(source.javaClass, search.type)) { + throw ResolverError("Expected source object to be an instance of '${TypeUtils.getRawType(search.type, search.type).name}' but instead got '${source.javaClass.name}'") + } + + source + } + } + + fun notCallableOnResolver(objectType: String): NotCallableOnResolver? { + val source = search.source ?: return null + val javaMember = member?.javaMember ?: return null + if (Modifier.isStatic(javaMember.modifiers) || javaMember.declaringClass.isInstance(source)) { + return null + } + + return NotCallableOnResolver( + "Field '$objectType.${field.name}' resolves to ${javaMember.declaringClass.name}.${javaMember.name}, but the resolver is a " + + "${source.javaClass.name}, which isn't a ${javaMember.declaringClass.name}, so every query of the field will fail.", + javaMember is Field + ) + } + + fun requireParameterForEachArgument(objectType: String) { + val member = member as? MethodMember ?: return + val method = member.method + member.arguments.forEach { argument -> + val parameter = TypeUtils.getRawType(argument.type, search.type) ?: return@forEach + if (!ExtraParameter.takesArgumentSlot(parameter, argument.definition, options)) { + return@forEach + } + + throw FieldResolverError( + "Field '$objectType.${field.name}' has no parameter for its argument '${argument.definition.name}: " + + "${TypeUtil.simplePrint(argument.definition.type)}' in ${method.declaringClass.name}.${method.name}, so the ${parameter.simpleName} " + + "parameter gets the argument instead. Add a parameter for each argument, in order, before the ${parameter.simpleName} parameter." + ) + } + } + + override fun toString() = member.toString() + + data class ArgumentTarget(val definition: InputValueDefinition, val type: JavaType) + + data class NotCallableOnResolver(val message: String, val isField: Boolean) + + /** + * Finds the member behind each field. Root fields are searched on every root resolver, so it indexes each class's methods + * only once. + */ + class Finder(private val options: SchemaParserOptions, private val scalarNames: Set) { + + private val log = LoggerFactory.getLogger(javaClass) + + private val methodsByNameCache = mutableMapOf, Boolean>, Map>>() + + fun find(field: FieldDefinition, resolverInfo: ResolverInfo): ResolverPlan { + val searches = resolverInfo.getFieldSearches() + + val scanProperties = field.inputValueDefinitions.isEmpty() + val found = searches.mapNotNull { search -> findMember(field, search, scanProperties)?.let { plan(field, search, it) } } + + if (resolverInfo is RootResolverInfo && found.size > 1) { + throw FieldResolverError("Found more than one matching resolver for field '$field': $found") + } + + return found.firstOrNull() + ?: missingResolver(field) + ?: findSourcelessResolver(field, searches) + ?: throw FieldResolverError(getMissingFieldMessage(field, searches, scanProperties)) + } + + private fun plan(field: FieldDefinition, search: ResolverSearch, member: Member?) = ResolverPlan(field, search, options, member) + + private fun findMember(field: FieldDefinition, search: ResolverSearch, scanProperties: Boolean): Member? = + ResolverKind.entries.firstNotNullOfOrNull { kind -> + when (kind) { + ResolverKind.METHOD -> findResolverMethod(field, search) + ?.let { MethodMember(field, search, it.accessible(field, search.type), options, scalarNames) } + + ResolverKind.FIELD -> if (scanProperties) { + findResolverProperty(field, search)?.let { PropertyMember(it.accessible(field, search.type)) } + } else { + null + } + + ResolverKind.MAP_VALUE -> if (Map::class.java.isAssignableFrom(search.type.unwrap())) MapMember(field, search) else null + } + } + + private fun T.accessible(field: FieldDefinition, type: JavaType): T = apply { + try { + isAccessible = true + } catch (e: RuntimeException) { + log.warn("Unable to make field ${type.unwrap().name}#${field.name} accessible. " + + "Be sure to provide a resolver or open the enclosing module if possible.") + } + } + + private fun missingResolver(field: FieldDefinition): ResolverPlan? { + return if (options.allowUnimplementedResolvers || options.missingResolverDataFetcherProvider != null) { + if (options.allowUnimplementedResolvers) { + log.warn("Missing resolver for field: $field") + } + + plan(field, ResolverSearch(Any::class.java, MissingResolverInfo(), null), null) + } else { + null + } + } + + private fun findSourcelessResolver(field: FieldDefinition, searches: List): ResolverPlan? = + searches.firstNotNullOfOrNull { search -> + val sourceType = search.requiredFirstParameterType ?: return@firstNotNullOfOrNull null + val sourceless = search.withoutSourceParameter() + findMethodByName(field, sourceless) { isSourcelessMethod(it, field, sourceless, sourceType) }?.let { method -> + plan(field, sourceless, MethodMember(field, sourceless, method.accessible(field, search.type), options, scalarNames)) + } + } + + private fun isSourcelessMethod(method: Method, field: FieldDefinition, search: ResolverSearch, sourceType: Class<*>): Boolean { + val arguments = field.inputValueDefinitions + val parameterTypes = method.parameterTypes + + return method.parameterCountWithoutContinuation() > arguments.size && + arguments.indices.none { ExtraParameter.takesArgumentSlot(parameterTypes[it], arguments[it], options) } && + (arguments.isEmpty() || !couldTakeSource(parameterTypes[0], sourceType)) && + verifyMethodArguments(method, arguments.size, search) + } + + private fun couldTakeSource(parameterType: Class<*>, sourceType: Class<*>) = + sourceType.isAssignableFrom(parameterType) || parameterType.isAssignableFrom(sourceType) + + private fun findResolverMethod(field: FieldDefinition, search: ResolverSearch): Method? { + val argumentCount = field.inputValueDefinitions.size + search.firstArgumentIndex + return findMethodByName(field, search) { verifyMethodArguments(it, argumentCount, search) } + } + + private inline fun findMethodByName(field: FieldDefinition, search: ResolverSearch, matches: (Method) -> Boolean): Method? { + val methodsByName = getMethodsByName(search) + val name = field.name + val capitalizedName = name.replaceFirstChar(Char::titlecase) + + // Check for the following one by one: + // 1. Method with exact field name + // 2. Method that returns a boolean with "is" style getter + // 3. Method with "get" style getter + // 4. Method with "getField" style getter + // 5. Method with "get" style getter with the field name converted from snake_case to camelCased. ex: key_ops -> getKeyOps() + return listOfNotNull( + name, + if (isBoolean(field.type)) "is$capitalizedName" else null, + "get$capitalizedName", + "getField$capitalizedName", + "get${name.snakeToCamelCase()}" + ).firstNotNullOfOrNull { methodName -> + methodsByName[methodName]?.find { matches(it) } + } + } + + private fun getMethodsByName(search: ResolverSearch): Map> = + methodsByNameCache.getOrPut(search.type.unwrap() to search.isSubscription) { + getAllMethods(search).groupBy { it.name } + } + + private fun getAllMethods(search: ResolverSearch): List { + val type = search.type.unwrap() + val declaredMethods = if (Proxy.isProxyClass(type)) emptyList() else type.declaredMethods.toList() + val superClassesMethods = ClassUtils.getAllSuperclasses(type).flatMap { it.methods.toList() } + val interfacesMethods = ClassUtils.getAllInterfaces(type).flatMap { it.methods.toList() } + + return (declaredMethods + superClassesMethods + interfacesMethods) + .asSequence() + .filter { !it.isSynthetic } + .filter { !Modifier.isPrivate(it.modifiers) } + // discard any methods that are coming off the root of the class hierarchy + // to avoid issues with duplicate method declarations + .filter { it.declaringClass != Any::class.java } + .filter { !search.isSubscription || returnsPublisher(it.returnType, it.genericReturnType, options.genericWrappers) } + .toList() + } + + private fun isBoolean(type: GraphQLLangType) = type.unwrap().name == Scalars.GraphQLBoolean.name + + private fun verifyMethodArguments(method: Method, requiredCount: Int, search: ResolverSearch): Boolean { + val appropriateFirstParameter = if (search.requiredFirstParameterType != null) { + method.genericParameterTypes.firstOrNull()?.let { + it.eraseUnboundedWildcards() == search.requiredFirstParameterType || method.declaringClass.typeParameters.contains(it) + } ?: false + } else { + // an extension receiver can only take the source object + !isExtensionFunction(method) + } + + val methodParameterCount = method.parameterCountWithoutContinuation() + + val correctParameterCount = methodParameterCount >= requiredCount && + method.parameterTypes.slice(requiredCount until methodParameterCount).all { ExtraParameter.of(it, options) != null } + return correctParameterCount && appropriateFirstParameter + } + + private fun isExtensionFunction(method: Method): Boolean { + return try { + method.kotlinFunction?.extensionReceiverParameter != null + } catch (e: InternalError) { + false + } + } + + private fun findResolverProperty(field: FieldDefinition, search: ResolverSearch) = + FieldUtils.getAllFields(search.type.unwrap()).find { it.name == field.name } + + private fun getMissingFieldMessage(field: FieldDefinition, searches: List, scannedProperties: Boolean): String { + val signatures = mutableListOf("") + val isBoolean = isBoolean(field.type) + var isSubscription = false + + searches.forEach { search -> + signatures.addAll(getMissingMethodSignatures(field, search, isBoolean, scannedProperties)) + isSubscription = isSubscription || search.isSubscription + } + searches.filter { it.requiredFirstParameterType != null }.forEach { search -> + signatures.addAll(getMissingMethodSignatures(field, search.withoutSourceParameter(), isBoolean, false, "")) + } + + val sourceName = field.sourceLocation?.sourceName ?: "" + val sourceLocation = field.sourceLocation?.let { "$sourceName:${it.line}" } ?: "" + + return "No method${if (scannedProperties) " or field" else ""} found as defined in schema $sourceLocation with any of the following signatures " + + "(optionally followed by any of ${ExtraParameter.types(options)}), in priority order:\n${signatures.joinToString("\n ")}" + + if (isSubscription) "\n\nNote that a Subscription data fetcher must return a Publisher of events" else "" + } + + private fun getMissingMethodSignatures( + field: FieldDefinition, + search: ResolverSearch, + isBoolean: Boolean, + scannedProperties: Boolean, + trailingParameter: String? = null + ): List { + val baseType = search.type.unwrap() + val signatures = mutableListOf() + val args = mutableListOf() + val sep = ", " + + if (search.requiredFirstParameterType != null) { + args.add(search.requiredFirstParameterType.name) + } + + args.addAll(field.inputValueDefinitions.map { "~${it.name}" }) + trailingParameter?.let(args::add) + + val argString = args.joinToString(sep) + + signatures.add("${baseType.name}.${field.name}($argString)") + if (isBoolean) { + signatures.add("${baseType.name}.is${field.name.replaceFirstChar(Char::titlecase)}($argString)") + } + signatures.add("${baseType.name}.get${field.name.replaceFirstChar(Char::titlecase)}($argString)") + if (scannedProperties) { + signatures.add("${baseType.name}.${field.name}") + } + + return signatures + } + } + + private companion object { + val notImplemented = MissingResolverDataFetcherProvider { _, _ -> DataFetcher { TODO("Schema resolver not implemented") } } + } +} + +/** + * The kinds of Java member a field can resolve to. The [ResolverPlan.Finder] looks for them in this order. + */ +internal enum class ResolverKind(val noun: String, val holdCompletionStage: String) { + METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."), + FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead."), + MAP_VALUE("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.") +} + +/** + * The parameters a resolver method may have after its arguments, listed in the order the missing-resolver error names them. + */ +internal enum class ExtraParameter(private val bindingPrecedence: Int) { + ENVIRONMENT(bindingPrecedence = 2) { + override fun type(options: SchemaParserOptions): Class<*> = DataFetchingEnvironment::class.java + override fun takesArgumentSlotOf(argument: InputValueDefinition) = true + override fun bind(parameterType: Class<*>, method: Method): (DataFetchingEnvironment) -> Any? = { environment -> environment } + }, + GRAPHQL_CONTEXT(bindingPrecedence = 0) { + override fun type(options: SchemaParserOptions): Class<*> = GraphQLContext::class.java + override fun takesArgumentSlotOf(argument: InputValueDefinition) = true + override fun bind(parameterType: Class<*>, method: Method): (DataFetchingEnvironment) -> Any? = { environment -> environment.graphQlContext } + }, + CONTEXT_CLASS(bindingPrecedence = 1) { + override fun type(options: SchemaParserOptions): Class<*>? = options.contextClass + + // the context class can also be an argument's type (e.g. a Map for an input object), so only spec scalars count for it + override fun takesArgumentSlotOf(argument: InputValueDefinition) = + argument.type.unwrap().name in ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS + + override fun bind(parameterType: Class<*>, method: Method): (DataFetchingEnvironment) -> Any? = { environment -> + environment.graphQlContext.get(parameterType) ?: throw ResolverError( + "Resolver method '${method.declaringClass.name}.${method.name}' has a parameter of the context class " + + "'${parameterType.name}', but the GraphQLContext has no value for it. Put it in the GraphQLContext under " + + "the class key when building the ExecutionInput, for example " + + "graphQLContext(mapOf(${parameterType.simpleName}::class.java to context))." + ) + } + }; + + abstract fun type(options: SchemaParserOptions): Class<*>? + + abstract fun takesArgumentSlotOf(argument: InputValueDefinition): Boolean + + abstract fun bind(parameterType: Class<*>, method: Method): (DataFetchingEnvironment) -> Any? + + companion object { + private val byBindingPrecedence = entries.sortedBy { it.bindingPrecedence } + + fun types(options: SchemaParserOptions): List> = entries.mapNotNull { it.type(options) } + + // a class can be the type of more than one entry, e.g. a context class of DataFetchingEnvironment + fun of(parameterType: Class<*>, options: SchemaParserOptions): ExtraParameter? = + byBindingPrecedence.find { it.type(options) == parameterType } + + // whether a parameter of this type in an argument's position is an extra parameter rather than the argument's + fun takesArgumentSlot(parameterType: Class<*>, argument: InputValueDefinition, options: SchemaParserOptions): Boolean { + val matching = entries.filter { it.type(options) == parameterType } + return matching.isNotEmpty() && matching.all { it.takesArgumentSlotOf(argument) } + } + } +} + +internal class FieldResolverError(msg: String) : RuntimeException(msg) + +private sealed class Member { + abstract val name: String + abstract val declaredValueType: JavaType + abstract val reference: ScanDictionary.Reference + abstract val javaMember: java.lang.reflect.Member? + + abstract fun read(target: Any, arguments: Array): Any? +} + +private class MethodMember( + field: FieldDefinition, + private val search: ResolverSearch, + val method: Method, + private val options: SchemaParserOptions, + private val scalarNames: Set +) : Member() { + val isSuspend = method.isSuspendFunction() + private val parameterCount = if (isSuspend) method.parameterCount - 1 else method.parameterCount + + override val name get() = "${method.declaringClass.name}.${method.name}" + override val javaMember get() = method + override val reference get() = ScanDictionary.ReturnValueReference(method) + + override val declaredValueType: JavaType + get() { + val declaredType = try { + method.kotlinFunction?.returnType?.javaType ?: method.genericReturnType + } catch (e: InternalError) { + method.genericReturnType + } + return resolveTypeVariables(declaredType, search.type) + } + + val arguments: List = field.inputValueDefinitions.mapIndexed { index, definition -> + val type = resolveTypeVariables(method.genericParameterTypes[index + search.firstArgumentIndex], search.type) + Argument(definition, type, lazy { TypeShape.parameterType(definition.type, type, search.type, options, ScanDictionary.MethodParameterReference(method, index)) }) + } + + class Argument(val definition: InputValueDefinition, val type: JavaType, private val lazyShape: Lazy) { + val shape by lazyShape + } + + /** + * What to pass for each parameter in the method's order, leaving out the Continuation of a suspend function. + */ + fun slots(mapper: ObjectMapper): List<(DataFetchingEnvironment) -> Any?> { + val slots = mutableListOf<(DataFetchingEnvironment) -> Any?>() + + search.requiredFirstParameterType?.let { expectedType -> + slots.add { environment -> + val source = environment.getSource() + ?: throw ResolverError("Expected source object to not be null!") + if (!expectedType.isAssignableFrom(source.javaClass)) { + throw ResolverError("Source type (${source.javaClass.name}) is not expected type (${expectedType.name})!") + } + + source + } + } + + arguments.forEach { slots.add(argumentSlot(it, mapper)) } + + method.parameterTypes.slice(slots.size until parameterCount).forEach { parameterType -> + slots.add(ExtraParameter.of(parameterType, options)!!.bind(parameterType, method)) + } + + return slots + } + + private fun argumentSlot(argument: Argument, mapper: ObjectMapper): (DataFetchingEnvironment) -> Any? { + val definition = argument.definition + val isNonNull = definition.type is NonNullType + val isOptional = isOptionalParameter(argument.type, search.type) + val argumentConverter = ArgumentConverter(mapper, argument.type) + val parameterClass = argument.type.unwrap() + val isConcreteScalar = isConcreteScalarType(definition.type, argument.type, scalarNames) + + return slot@{ environment -> + val argumentPresent = environment.arguments.containsKey(definition.name) + if (!argumentPresent && isNonNull) { + throw ResolverError("Missing required argument with name '${definition.name}', this is most likely a bug with graphql-java-tools") + } + + val value = environment.arguments[definition.name] + + if (value == null && isOptional) { + if (options.inputArgumentOptionalDetectOmission && !environment.containsArgument(definition.name)) { + return@slot null + } + return@slot Optional.empty() + } + + if (value == null || !isConcreteScalar || !parameterClass.isInstance(value)) { + return@slot argumentConverter.convert(value) + } + + return@slot value + } + } + + override fun read(target: Any, arguments: Array): Any? = invoke(method, target, arguments) + + suspend fun readSuspending(target: Any, arguments: Array): Any? = + suspendCoroutineUninterceptedOrReturn { continuation -> + arguments[arguments.lastIndex] = continuation + invoke(method, target, arguments) + } + + override fun toString() = "MethodFieldResolver{method=$method}" +} + +private class PropertyMember(private val property: Field) : Member() { + override val name get() = "${property.declaringClass.name}.${property.name}" + override val javaMember get() = property + override val declaredValueType: JavaType get() = property.genericType + override val reference get() = ScanDictionary.FieldTypeReference(property.toString()) + + override fun read(target: Any, arguments: Array): Any? = property.get(target) + + override fun toString() = "PropertyFieldResolver{property=$property}" +} + +private class MapMember(field: FieldDefinition, private val search: ResolverSearch) : Member() { + private val key = field.name + + // Classmate keeps the value type a Map subclass fixes, e.g. a class extending HashMap + override val declaredValueType: JavaType = + TypeResolver().resolve(search.type.unwrap()).typeParametersFor(Map::class.java).elementAtOrElse(1) { Any::class.java } + + val hasTypedValues get() = resolveTypeVariables(declaredValueType, search.type) != Any::class.java + + override val name get() = "${search.type.unwrap().name}.$key" + override val javaMember: java.lang.reflect.Member? get() = null + override val reference get() = ScanDictionary.FieldTypeReference(key) + + override fun read(target: Any, arguments: Array): Any? = (target as Map<*, *>)[key] + + override fun toString() = "MapFieldResolver{key=$key}" + + companion object { + // the light data fetcher reads any Map it's given, without checking its class against the search type + val sourceResolver = SourceResolver { _, source -> + source as? Map<*, *> ?: throw RuntimeException("MapFieldResolver attempt to fetch a field from an object instance that was not a map") + } + } +} + +private val noArguments = emptyArray() + +private class Fetcher( + private val source: SourceResolver, + private val member: MethodMember, + private val slots: List<(DataFetchingEnvironment) -> Any?>, + private val options: SchemaParserOptions, + private val unwrapper: TypeShape.Unwrapper +) : DataFetcher { + + override fun get(environment: DataFetchingEnvironment): Any? { + val target = source.resolve(environment, null) + val arguments = arrayOfNulls(if (member.isSuspend) slots.size + 1 else slots.size) + slots.forEachIndexed { index, slot -> arguments[index] = slot(environment) } + + return if (member.isSuspend) { + // start undispatched so DataLoader loads are queued before graphql-java dispatches them, + // which runs the block even if the context is already cancelled, hence ensureActive + environment.coroutineScope().future(options.coroutineContextProvider.provide(), CoroutineStart.UNDISPATCHED) { + ensureActive() + member.readSuspending(target, arguments)?.let { unwrapper.unwrapSuspending(it) { environment } } + } + } else { + member.read(target, arguments)?.let { unwrapper.unwrap(it) { environment } } + } + } + + /** + * Function that returns the object used to fetch the data. It can be a DataFetcher or an entity. + */ + @Suppress("unused") + fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) +} + +/** + * For a member without parameters, which needs the environment only if a generic wrapper's transformer asks for it. + */ +private class LightFetcher( + private val source: SourceResolver, + private val lightSource: SourceResolver, + private val member: Member, + private val unwrapper: TypeShape.Unwrapper? +) : LightDataFetcher { + + override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? { + val value = member.read(lightSource.resolve(null, sourceObject), noArguments) + return if (value == null || unwrapper == null) value else unwrapper.unwrap(value, environmentSupplier) + } + + override fun get(environment: DataFetchingEnvironment): Any? = + get(environment.fieldDefinition, source.resolve(environment, null)) { environment } + + /** + * Function that returns the object used to fetch the data. It can be a DataFetcher or an entity. + */ + @Suppress("unused") + fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) +} + +private fun invoke(method: Method, instance: Any, arguments: Array): Any? { + try { + return method.invoke(instance, *arguments) + } catch (e: InvocationTargetException) { + throw e.cause ?: RuntimeException("Unknown error occurred while invoking resolver method") + } +} + +private fun Method.isSuspendFunction(): Boolean { + return try { + this.kotlinFunction?.isSuspend == true + } catch (e: InternalError) { + false + } +} + +// the trailing Continuation of a suspend function isn't a resolver argument +private fun Method.parameterCountWithoutContinuation(): Int = + if (isSuspendFunction()) parameterCount - 1 else parameterCount diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/SourceResolver.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/SourceResolver.kt new file mode 100644 index 00000000..90dd4676 --- /dev/null +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/SourceResolver.kt @@ -0,0 +1,8 @@ +package graphql.kickstart.tools.resolver + +import graphql.schema.DataFetchingEnvironment + +fun interface SourceResolver { + + fun resolve(environment: DataFetchingEnvironment?, source: Any?): Any +} diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index 609d7ed4..acbb83da 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -16,8 +16,10 @@ import graphql.kickstart.tools.util.isSubtypeOf import graphql.kickstart.tools.util.typeArgument import graphql.language.ListType import graphql.language.NonNullType +import graphql.language.TypeName import graphql.schema.DataFetchingEnvironment import graphql.schema.idl.TypeUtil +import kotlinx.coroutines.channels.ReceiveChannel import kotlinx.coroutines.future.asDeferred import org.apache.commons.lang3.reflect.TypeUtils import org.reactivestreams.Publisher @@ -259,6 +261,43 @@ private fun JavaType.asPublisher(): JavaType = ?.let { TypeUtils.parameterize(Publisher::class.java, it) } ?: this +// picks the subscription method before its return type is walked, so it reads the erased type, where suspend functions and +// unbounded type variables are Object and the actual return type is unknown +internal fun returnsPublisher(erasedType: Class<*>, genericType: JavaType, wrappers: List): Boolean = + erasedType == Any::class.java + || Publisher::class.java.isAssignableFrom(erasedType) + || returnsPublisherFuture(genericType) + || ReceiveChannel::class.java.isAssignableFrom(erasedType) && wrappers.any { it.type == erasedType && it.canTransformToPublisher() } + +private fun returnsPublisherFuture(genericType: JavaType) = + genericType.futureValueType() + ?.let { if (it is WildcardType) it.upperBounds.first() else it } + ?.let { TypeUtils.isAssignable(it, Publisher::class.java) } == true + +// lambdas are erased to return Object, so this only checks that the transformer can return a Publisher +private fun GenericWrapper.canTransformToPublisher() = + transformer.javaClass.declaredMethods + .filter { it.name == "invoke" } + .any { it.returnType.isAssignableFrom(Publisher::class.java) } + +internal fun isOptionalParameter(parameterType: JavaType, containingType: JavaType): Boolean = + TypeUtils.getRawType(parameterType, containingType) == Optional::class.java + +/** + * A concrete scalar type is a scalar type where values always coerce to the same Java type. The ID scalar type is not concrete + * because values can be coerced to multiple different Java types (eg. String, Long, UUID). All values of a non-concrete scalar + * type must be converted to the target method parameter type. + */ +internal fun isConcreteScalarType(type: GraphQLLangType, parameterType: JavaType, scalarNames: Set): Boolean = + when (type) { + is ListType -> parameterType.typeArgument(List::class.java) + ?.let { isConcreteScalarType(type.type, it, scalarNames) } ?: false + + is TypeName -> type.name in scalarNames && type.name != "ID" + is NonNullType -> isConcreteScalarType(type.type, parameterType, scalarNames) + else -> false + } + // The two rules differ on purpose: making the build pick by instance would unwrap a Flux as a Publisher, and making the fetch // pick by declared type would stop a CompletableFuture returned for a declared Future from getting its own wrapper private class GenericWrappers(private val wrappers: List) { @@ -391,12 +430,6 @@ private fun List.awaitAll(): Any { private fun Any?.asCompletionStage(): CompletionStage = this as? CompletionStage ?: CompletableFuture.completedFuture(this) -internal enum class ResolverKind(val noun: String, val holdCompletionStage: String) { - METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."), - FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead."), - MAP_VALUE("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.") -} - // graphql-java only waits on a CompletionStage returned by a data fetcher, so any other future, or a future // that a suspend function completes with, would reach it as the field value private class Awaitable( diff --git a/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt b/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt index 14c156ed..06450246 100644 --- a/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt +++ b/src/main/kotlin/graphql/kickstart/tools/util/Utils.kt @@ -8,12 +8,9 @@ import graphql.schema.idl.TypeUtil import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import org.apache.commons.lang3.reflect.TypeUtils -import java.lang.reflect.Method import java.lang.reflect.ParameterizedType -import java.lang.reflect.Proxy import java.util.concurrent.CompletionStage import java.util.concurrent.Future -import kotlin.reflect.jvm.kotlinFunction /** * @author Andrew Potter @@ -22,7 +19,6 @@ import kotlin.reflect.jvm.kotlinFunction internal typealias GraphQLRootResolver = GraphQLResolver internal typealias JavaType = java.lang.reflect.Type -internal typealias JavaMethod = Method internal typealias GraphQLLangType = Type<*> internal fun Type<*>.unwrap(): TypeName = TypeUtil.unwrapAll(this) @@ -61,26 +57,6 @@ internal fun DataFetchingEnvironment.coroutineScope(): CoroutineScope { return CoroutineScope(Dispatchers.Default) } -internal val Class<*>.declaredNonProxyMethods: List - get() { - return when { - Proxy.isProxyClass(this) -> emptyList() - else -> this.declaredMethods.toList() - } - } - -internal fun JavaMethod.isSuspendFunction(): Boolean { - return try { - this.kotlinFunction?.isSuspend == true - } catch (e: InternalError) { - false - } -} - -// the trailing Continuation of a suspend function isn't a resolver argument -internal fun JavaMethod.parameterCountWithoutContinuation(): Int = - if (isSuspendFunction()) parameterCount - 1 else parameterCount - internal fun getDocumentation(node: AbstractNode<*>, options: SchemaParserOptions): String? = when { node is AbstractDescribedNode<*> && node.description != null -> node.description?.content diff --git a/src/test/kotlin/graphql/kickstart/tools/MethodFieldResolverDataFetcherTest.kt b/src/test/kotlin/graphql/kickstart/tools/MethodFieldResolverDataFetcherTest.kt index 607ef081..fee6571f 100644 --- a/src/test/kotlin/graphql/kickstart/tools/MethodFieldResolverDataFetcherTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/MethodFieldResolverDataFetcherTest.kt @@ -5,7 +5,7 @@ import graphql.GraphQLContext import graphql.execution.* import graphql.execution.instrumentation.SimplePerformantInstrumentation import graphql.kickstart.tools.resolver.FieldResolverError -import graphql.kickstart.tools.resolver.FieldResolverScanner +import graphql.kickstart.tools.resolver.ResolverPlan import graphql.language.FieldDefinition import graphql.language.InputValueDefinition import graphql.language.NonNullType @@ -461,7 +461,7 @@ class MethodFieldResolverDataFetcherTest { } else { NormalResolverInfo(resolver, options) } - return FieldResolverScanner(options, GRAPHQL_SCALARS.keys).findFieldResolver(field, resolverInfo).createDataFetcher() + return ResolverPlan.Finder(options, GRAPHQL_SCALARS.keys).find(field, resolverInfo).dataFetcher() } private fun createEnvironment( diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt index ddf81e21..1c2bd759 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt @@ -6,6 +6,8 @@ import graphql.GraphQL import graphql.GraphQLContext import graphql.execution.DataFetcherResult import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper +import graphql.kickstart.tools.resolver.ExtraParameter +import graphql.kickstart.tools.resolver.ResolverKind import graphql.schema.DataFetchingEnvironment import kotlinx.coroutines.flow.toList import kotlinx.coroutines.reactive.asFlow @@ -91,6 +93,54 @@ class ResolverCompatibilityTest { ) } + @Test + fun `every resolver kind serves a field`() { + ResolverKind.entries.forEach { kind -> + val holder: Any = when (kind) { + ResolverKind.METHOD -> NounMethodHolder(kind.noun) + ResolverKind.FIELD -> NounFieldHolder(kind.noun) + ResolverKind.MAP_VALUE -> hashMapOf("value" to kind.noun) + } + val schema = SchemaParser.newParser() + .schemaString("type Query { holder: Holder } type Holder { value: String }") + .resolvers(object : GraphQLQueryResolver { + fun holder(): Any = holder + }) + .dictionary("Holder", holder.javaClass) + .build() + .makeExecutableSchema() + + assertEquals(GraphQL.newGraphQL(schema).build().execute("{ holder { value } }").render(), "{holder={value=${kind.noun}}}") + } + } + + @Test + fun `every extra parameter binds after the arguments`() { + val options = SchemaParserOptions.newOptions().contextClass(AppContext::class).build() + val context = mapOf(AppContext::class.java to AppContext("ann"), "key" to "k") + + ExtraParameter.entries.forEach { parameter -> + val (resolver, expected) = when (parameter) { + ExtraParameter.ENVIRONMENT -> object : GraphQLQueryResolver { + fun value(first: String, env: DataFetchingEnvironment) = "$first ${env.field.name}" + } to "x value" + + ExtraParameter.GRAPHQL_CONTEXT -> object : GraphQLQueryResolver { + fun value(first: String, context: GraphQLContext) = "$first ${context.get("key")}" + } to "x k" + + ExtraParameter.CONTEXT_CLASS -> object : GraphQLQueryResolver { + fun value(first: String, context: AppContext) = "$first ${context.user}" + } to "x ann" + } + + assertEquals( + execute("type Query { value(first: String!): String }", "{ value(first: \"x\") }", resolver, options = options, context = context), + "{value=$expected}" + ) + } + } + @Test fun `omitted arguments reach primitive parameters as their default, and a type variable parameter gets a value of its resolved type argument`() { val result = execute( @@ -349,6 +399,12 @@ class ResolverCompatibilityTest { class AppContext(val user: String) + class NounMethodHolder(private val noun: String) { + fun value() = noun + } + + class NounFieldHolder(@JvmField val value: String) + class ContextResolver : GraphQLQueryResolver { fun extras(first: String, env: DataFetchingEnvironment, context: AppContext, graphQLContext: GraphQLContext, again: DataFetchingEnvironment) = "$first ${env.field.name} ${context.user} ${graphQLContext.get("key")} ${again === env}" diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt new file mode 100644 index 00000000..5f76cffd --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt @@ -0,0 +1,176 @@ +package graphql.kickstart.tools + +import com.tngtech.archunit.base.DescribedPredicate +import com.tngtech.archunit.core.domain.JavaAccess +import com.tngtech.archunit.core.domain.JavaClass +import com.tngtech.archunit.core.domain.JavaClasses +import com.tngtech.archunit.core.importer.ClassFileImporter +import com.tngtech.archunit.lang.ArchCondition +import com.tngtech.archunit.lang.ConditionEvents +import com.tngtech.archunit.lang.SimpleConditionEvent +import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes +import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses +import graphql.execution.DataFetcherResult +import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper +import graphql.kickstart.tools.resolver.ArgumentConverter +import graphql.kickstart.tools.resolver.ResolverPlan +import graphql.kickstart.tools.resolver.TypeShape +import graphql.schema.DataFetcher +import org.apache.commons.lang3.reflect.FieldUtils +import org.junit.Test +import tools.jackson.databind.ObjectMapper +import tools.jackson.databind.ObjectReader +import tools.jackson.databind.ObjectWriter +import tools.jackson.databind.util.TokenBuffer +import java.lang.reflect.AccessibleObject +import java.lang.reflect.Executable +import java.lang.reflect.Field +import java.lang.reflect.Method +import java.nio.file.Paths + +class ResolverOwnershipTest { + + companion object { + private val classes: JavaClasses = ClassFileImporter() + .importPath(Paths.get(ResolverPlan::class.java.protectionDomain.codeSource.location.toURI())) + + private val resolverPackage = ResolverPlan::class.java.packageName + private const val MEMBER = "graphql.kickstart.tools.resolver.Member" + } + + private fun declaredIn(fileName: String) = object : DescribedPredicate("are declared in $resolverPackage's $fileName") { + override fun test(javaClass: JavaClass) = + javaClass.packageName == resolverPackage && javaClass.source.flatMap { it.fileName }.orElse(null) == fileName + } + + private fun DescribedPredicate.orOwnerOf(vararg allowed: Class<*>): DescribedPredicate { + val names = allowed.map { it.name } + return object : DescribedPredicate("${this@orOwnerOf.description} or are ${names.joinToString()}") { + override fun test(javaClass: JavaClass) = this@orOwnerOf.test(javaClass) || javaClass.name.substringBefore('$') in names + } + } + + private class Calls(description: String, private val targets: Map>) : DescribedPredicate>(description) { + override fun test(access: JavaAccess<*>) = + targets.any { (owner, names) -> access.target.owner.isAssignableTo(owner) && access.target.name in names } + } + + private val memberReflection = Calls( + "reads, invokes or opens a Java member by reflection", + mapOf( + Method::class.java.name to setOf("invoke"), + Field::class.java.name to setOf("get", "getGenericType"), + Executable::class.java.name to setOf("getGenericParameterTypes", "getGenericReturnType", "getParameterTypes", "getParameterCount"), + AccessibleObject::class.java.name to setOf("setAccessible", "trySetAccessible"), + "kotlin.reflect.jvm.ReflectJvmMapping" to setOf("getKotlinFunction"), + FieldUtils::class.java.name to setOf("getAllFields", "getAllFieldsList"), + ) + ) + + // input-object field types are guessed from getters until they come from the mapping Jackson uses + private val guessesInputFieldTypes = object : DescribedPredicate>("is in ScanDictionary.findInputValueTypeInType") { + override fun test(access: JavaAccess<*>) = + access.origin.owner.isEquivalentTo(ScanDictionary::class.java) && access.origin.name.startsWith("findInputValueTypeInType") + } + + private val tokenBufferConversion = Calls( + "converts a value through a Jackson TokenBuffer", + mapOf( + TokenBuffer::class.java.name to setOf("", "forInputParsing", "forGeneration", "asParser"), + ObjectWriter::class.java.name to setOf("writeValueIntoBuffer"), + ObjectMapper::class.java.name to setOf("readValue", "convertValue", "treeToValue", "valueToTree"), + ObjectReader::class.java.name to setOf("readValue", "readValues", "treeToValue"), + ) + ) + + private val argumentConversion = Calls( + "builds or calls an ArgumentConverter", + mapOf(ArgumentConverter::class.java.name to setOf("", "convert")) + ) + + private val genericWrapperDispatch = Calls( + "reads a generic wrapper's type, schema wrapper or transformer", + mapOf(GenericWrapper::class.java.name to setOf("getType", "getIndex", "getSchemaWrapper", "getTransformer", "getTransformerReturnsCompletionStage")) + ) + + private val buildsAnUnwrapper = object : DescribedPredicate>("builds a TypeShape.Unwrapper") { + override fun test(access: JavaAccess<*>) = + access.target.owner.isEquivalentTo(TypeShape.Unwrapper::class.java) && access.target.name == "" + } + + private val holdsAnUnwrapper =object : ArchCondition("hold a TypeShape.Unwrapper") { + override fun check(javaClass: JavaClass, events: ConditionEvents) { + if (javaClass.allFields.none { it.rawType.isEquivalentTo(TypeShape.Unwrapper::class.java) }) { + events.add(SimpleConditionEvent.violated(javaClass, "${javaClass.name} implements DataFetcher without a TypeShape.Unwrapper field")) + } + } + } + + @Test + fun `imports the compiled resolver classes`() { + assert(classes.contain(MEMBER)) { "expected $MEMBER, the member variants' base class in ResolverPlan.kt, among ${classes.size} classes" } + assert(classes.any { declaredIn("ResolverPlan.kt").test(it) }) { "no class compiled from ResolverPlan.kt was imported" } + } + + @Test + fun `only the resolver plan reflects on resolver members`() { + noClasses().that(DescribedPredicate.not(declaredIn("ResolverPlan.kt"))) + .should().accessTargetWhere(DescribedPredicate.and(memberReflection, DescribedPredicate.not(guessesInputFieldTypes))) + .because("ResolverPlan.kt reads each field's member once, at schema build, and is the only place that invokes it. " + + "Read what you need from the ResolverPlan, such as its argument targets or type shapes, or add it there") + .check(classes) + } + + @Test + fun `member variants expose raw invocation, never a data fetcher`() { + noClasses().that().areAssignableTo(MEMBER) + .should().dependOnClassesThat().areAssignableTo(DataFetcher::class.java) + .orShould().dependOnClassesThat().areAssignableTo(TypeShape.Unwrapper::class.java) + .because("ResolverPlan builds every data fetcher around a member's read and unwraps its value with TypeShape.Unwrapper, " + + "so a member that builds its own fetcher skips the unwrapping. Give the member a read and let ResolverPlan.dataFetcher wrap it") + .check(classes) + } + + @Test + fun `every library data fetcher unwraps through TypeShape`() { + classes().that().implement(DataFetcher::class.java) + .should(holdsAnUnwrapper) + .because("a resolver's value reaches graphql-java fully unwrapped only through TypeShape.Unwrapper. Add the member to ResolverPlan instead of a new fetcher") + .check(classes) + } + + @Test + fun `only the resolver plan builds an unwrapper`() { + noClasses().that(DescribedPredicate.not(declaredIn("ResolverPlan.kt").orOwnerOf(TypeShape::class.java))) + .should().accessTargetWhere(buildsAnUnwrapper) + .because("ResolverPlan.dataFetcher builds one unwrapper per field from the type shape the scan matched") + .check(classes) + } + + @Test + fun `only TypeShape dispatches on containers`() { + noClasses().that(DescribedPredicate.not(declaredIn("TypeShape.kt").orOwnerOf(GenericWrapper::class.java))) + .should().accessTargetWhere(genericWrapperDispatch) + .orShould().dependOnClassesThat().areAssignableTo(DataFetcherResult::class.java) + .because("TypeShape.kt walks a declared type once and unwraps values by the same layers, so a container handled anywhere else " + + "can disagree with it. Add a ContainerKind or a generic wrapper, or ask TypeShape") + .check(classes) + } + + @Test + fun `only the argument converter converts through a TokenBuffer`() { + noClasses().that(DescribedPredicate.not(declaredIn("ArgumentConverter.kt"))) + .should().accessTargetWhere(tokenBufferConversion) + .orShould().dependOnClassesThat().areAssignableTo(TokenBuffer::class.java) + .because("ArgumentConverter is the one entry point that turns a coerced argument into a parameter's type, with its fallbacks for scalars Jackson can't convert. Use the ResolverPlan's ArgumentConverter") + .check(classes) + } + + @Test + fun `only the resolver plan converts arguments`() { + noClasses().that(DescribedPredicate.not(declaredIn("ResolverPlan.kt").orOwnerOf(ArgumentConverter::class.java))) + .should().accessTargetWhere(argumentConversion) + .because("ResolverPlan builds one ArgumentConverter per argument at schema build, next to the argument's Optional and scalar handling. Read the plan's argument targets instead") + .check(classes) + } +} diff --git a/src/test/kotlin/graphql/kickstart/tools/FieldResolverScannerTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt similarity index 58% rename from src/test/kotlin/graphql/kickstart/tools/FieldResolverScannerTest.kt rename to src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt index c760c2a7..ff48e52c 100644 --- a/src/test/kotlin/graphql/kickstart/tools/FieldResolverScannerTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt @@ -2,9 +2,7 @@ package graphql.kickstart.tools import graphql.kickstart.tools.SchemaParserOptions.Companion.defaultOptions import graphql.kickstart.tools.resolver.FieldResolverError -import graphql.kickstart.tools.resolver.FieldResolverScanner -import graphql.kickstart.tools.resolver.MethodFieldResolver -import graphql.kickstart.tools.resolver.PropertyFieldResolver +import graphql.kickstart.tools.resolver.ResolverPlan import graphql.language.FieldDefinition import graphql.language.InputValueDefinition import graphql.language.TypeName @@ -15,91 +13,90 @@ import graphql.schema.DataFetchingEnvironment import org.junit.Test import java.util.* -class FieldResolverScannerTest { +class ResolverPlanTest { private val options = defaultOptions() - private val scanner = FieldResolverScanner(options, GRAPHQL_SCALARS.keys) + private val finder = ResolverPlan.Finder(options, GRAPHQL_SCALARS.keys) + + private fun ResolverPlan.reference() = typeShapes().last().reference.toString() @Test - fun `scanner finds fields on multiple root types`() { + fun `finder finds fields on multiple root types`() { val resolver = RootResolverInfo(listOf(RootQuery1(), RootQuery2()), options) - val result1 = scanner.findFieldResolver(FieldDefinition("field1", TypeName("String")), resolver) - val result2 = scanner.findFieldResolver(FieldDefinition("field2", TypeName("String")), resolver) + val result1 = finder.find(FieldDefinition("field1", TypeName("String")), resolver) + val result2 = finder.find(FieldDefinition("field2", TypeName("String")), resolver) assertNotEquals(result1.search.source, result2.search.source) } @Test(expected = FieldResolverError::class) - fun `scanner throws exception when more than one resolver method is found`() { + fun `finder throws exception when more than one resolver method is found`() { val resolver = RootResolverInfo(listOf(RootQuery1(), DuplicateQuery()), options) - scanner.findFieldResolver(FieldDefinition("field1", TypeName("String")), resolver) + finder.find(FieldDefinition("field1", TypeName("String")), resolver) } @Test(expected = FieldResolverError::class) - fun `scanner throws exception when no resolver methods are found`() { + fun `finder throws exception when no resolver methods are found`() { val resolver = RootResolverInfo(listOf(), options) - scanner.findFieldResolver(FieldDefinition("field1", TypeName("String")), resolver) + finder.find(FieldDefinition("field1", TypeName("String")), resolver) } @Test - fun `scanner finds properties when no method is found`() { + fun `finder finds properties when no method is found`() { val resolver = RootResolverInfo(listOf(PropertyQuery()), options) - val name = scanner.findFieldResolver(FieldDefinition("name", TypeName("String")), resolver) - val version = scanner.findFieldResolver(FieldDefinition("version", TypeName("Integer")), resolver) + val name = finder.find(FieldDefinition("name", TypeName("String")), resolver) + val version = finder.find(FieldDefinition("version", TypeName("Integer")), resolver) - assert(name is PropertyFieldResolver) - assert(version is PropertyFieldResolver) + assertEquals(name.reference(), "type of field ${PropertyQuery::class.java.getDeclaredField("name")}") + assertEquals(version.reference(), "type of field ${ParentPropertyQuery::class.java.getDeclaredField("version")}") } @Test - fun `scanner finds generic return type`() { + fun `finder finds generic return type`() { val resolver = RootResolverInfo(listOf(GenericQuery()), options) - val users = scanner.findFieldResolver(FieldDefinition("users", TypeName("UserConnection")), resolver) + val users = finder.find(FieldDefinition("users", TypeName("UserConnection")), resolver) - assert(users is MethodFieldResolver) + assertEquals(users.reference(), "return type of method ${GenericQuery::class.java.getMethod("getUsers")}") } @Test - fun `scanner prefers concrete resolver`() { + fun `finder prefers concrete resolver`() { val resolver = DataClassResolverInfo(Kayak::class.java) - val meta = scanner.findFieldResolver(FieldDefinition("information", TypeName("VehicleInformation")), resolver) + val meta = finder.find(FieldDefinition("information", TypeName("VehicleInformation")), resolver) - assert(meta is MethodFieldResolver) - assertEquals((meta as MethodFieldResolver).method.returnType, BoatInformation::class.java) + assertEquals(meta.typeShapes().last().leafJavaType, BoatInformation::class.java) } @Test - fun `scanner finds field resolver method using camelCase for snake_cased field_name`() { + fun `finder finds field resolver method using camelCase for snake_cased field_name`() { val resolver = RootResolverInfo(listOf(CamelCaseQuery1()), options) - val meta = scanner.findFieldResolver(FieldDefinition("hull_type", TypeName("HullType")), resolver) + val meta = finder.find(FieldDefinition("hull_type", TypeName("HullType")), resolver) - assert(meta is MethodFieldResolver) - assertEquals((meta as MethodFieldResolver).method.returnType, HullType::class.java) + assertEquals(meta.reference(), "return type of method ${CamelCaseQuery1::class.java.getMethod("getHullType")}") } @Test - fun `scanner finds field resolver method using capitalize field_name in different locale`() { + fun `finder finds field resolver method using capitalize field_name in different locale`() { val default = Locale.getDefault() Locale.setDefault(Locale.forLanguageTag("tr-TR")) val resolverInfo = RootResolverInfo(listOf(CapitalizeQuery()), options) - val fieldResolver = scanner.findFieldResolver(FieldDefinition("id", TypeName("HullType")), resolverInfo) + val plan = finder.find(FieldDefinition("id", TypeName("HullType")), resolverInfo) - assert(fieldResolver is MethodFieldResolver) - assertEquals((fieldResolver as MethodFieldResolver).method.returnType, HullType::class.java) + assertEquals(plan.reference(), "return type of method ${CapitalizeQuery::class.java.getMethod("getId")}") Locale.setDefault(default) } @Test - fun `scanner ignores extension functions on root resolvers`() { + fun `finder ignores extension functions on root resolvers`() { val resolver = RootResolverInfo(listOf(UserQuery(), ExtensionQuery()), options) val field = FieldDefinition.newFieldDefinition() .name("user") @@ -107,18 +104,17 @@ class FieldResolverScannerTest { .inputValueDefinition(InputValueDefinition("id", TypeName("ID"))) .build() - val user = scanner.findFieldResolver(field, resolver) + val user = finder.find(field, resolver) - assert(user is MethodFieldResolver) - assertEquals((user as MethodFieldResolver).method.declaringClass, UserQuery::class.java) + assertEquals(user.reference(), "return type of method ${UserQuery::class.java.getMethod("user", String::class.java)}") } @Test - fun `scanner finds field resolver methods in priority order`() { + fun `finder finds field resolver methods in priority order`() { val resolverInfo = RootResolverInfo(listOf(PriorityQuery()), options) fun methodName(name: String, type: String) = - (scanner.findFieldResolver(FieldDefinition(name, TypeName(type)), resolverInfo) as MethodFieldResolver).method.name + finder.find(FieldDefinition(name, TypeName(type)), resolverInfo).reference().substringAfter("${PriorityQuery::class.java.name}.").substringBefore("(") assertEquals(methodName("name", "String"), "name") assertEquals(methodName("active", "Boolean"), "isActive") diff --git a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt index deb1adee..24b00af3 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TypeClassMatcherTest.kt @@ -2,7 +2,7 @@ package graphql.kickstart.tools import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper.Companion.listCollectionWithTransformer -import graphql.kickstart.tools.resolver.FieldResolverScanner +import graphql.kickstart.tools.resolver.ResolverPlan import graphql.kickstart.tools.util.ParameterizedTypeImpl import graphql.language.* import graphql.language.Type @@ -45,11 +45,11 @@ class TypeClassMatcherTest { ) { x -> x } ).build() - private val scanner: FieldResolverScanner = FieldResolverScanner(options, GRAPHQL_SCALARS.keys) + private val finder = ResolverPlan.Finder(options, GRAPHQL_SCALARS.keys) private val resolver = RootResolverInfo(listOf(QueryMethods()), options) private fun matchReturnType(methodName: String, graphQLType: Type<*>): TypeClassMatcher.Match = - matcher.match(scanner.findFieldResolver(FieldDefinition(methodName, graphQLType), resolver).scanForMatches().single()) + matcher.match(finder.find(FieldDefinition(methodName, graphQLType), resolver).typeShapes().single()) private fun list(other: Type<*> = customType): Type<*> = ListType(other) private fun nonNull(other: Type<*> = customType): Type<*> = NonNullType(other) From 948c1ca65e10570a31aef2468b0434cd93223baf Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 21:54:50 -0500 Subject: [PATCH 56/64] Trim the resolver plan's comments and per-argument state, and pin the member lookup order Argument shapes are walked when the scan asks for them instead of being kept for the schema's lifetime, the method fetcher's slots are an array, and the source check captures only the search type. A test pins that a method wins over a field and a field over a Map key, and ResolverOwnershipTest keeps ArgumentConverter construction in ResolverPlan.kt. --- .../kickstart/tools/resolver/ResolverPlan.kt | 80 +++++-------------- .../kickstart/tools/resolver/TypeShape.kt | 5 -- .../kickstart/tools/ResolverOwnershipTest.kt | 1 - .../kickstart/tools/ResolverPlanTest.kt | 23 ++++++ 4 files changed, 42 insertions(+), 67 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt index df227b3f..ef076ed7 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt @@ -46,24 +46,18 @@ import kotlin.reflect.full.extensionReceiverParameter import kotlin.reflect.jvm.javaType import kotlin.reflect.jvm.kotlinFunction -/** - * How one object field is resolved: the Java member behind it, the type shapes the scan matches, and its data fetcher. Every - * fact about the member's signature is read here once, so the scan, the data fetcher and the checks after the build can't - * disagree about it. - */ internal class ResolverPlan private constructor( val field: FieldDefinition, val search: ResolverSearch, private val options: SchemaParserOptions, - // null when the field has no resolver and the options allow that private val member: Member? ) { val resolverInfo: ResolverInfo get() = search.resolverInfo - // provided at parse time, once per method field, so the user's provider doesn't run for a schema that fails to scan + // provided at parse time, so the user's provider doesn't run for a schema that fails to scan val objectMapper: ObjectMapper by lazy { options.objectMapperProvider.provide(field) } - val argumentTargets: List get() = (member as? MethodMember)?.arguments.orEmpty().map { ArgumentTarget(it.definition, it.type) } + val argumentTargets: List get() = (member as? MethodMember)?.arguments.orEmpty() private val returnShape by lazy { member?.let { TypeShape.returnType(field.type, it.declaredValueType, search.isSubscription, search.type, options, it.reference) } @@ -71,7 +65,7 @@ internal class ResolverPlan private constructor( // each shape is walked only when the scanner gets to it, so an earlier match's dictionary error is reported first fun typeShapes(): Sequence = sequence { - (member as? MethodMember)?.arguments?.forEach { yield(it.shape) } + (member as? MethodMember)?.let { yieldAll(it.parameterShapes()) } returnShape?.let { yield(it) } } @@ -90,7 +84,7 @@ internal class ResolverPlan private constructor( is MapMember -> { val unwrapper = if (member.hasTypedValues) TypeShape.Unwrapper(returnShape!!, ResolverKind.MAP_VALUE, member.name) else null - LightFetcher(source, MapMember.sourceResolver, member, unwrapper) + LightFetcher(source, MapMember.anyMap, member, unwrapper) } } } @@ -101,14 +95,14 @@ internal class ResolverPlan private constructor( return SourceResolver { _, _ -> resolver } } + val type = search.type return SourceResolver { environment, sourceObject -> - // if source object is known, environment is null as an optimization (LightDataFetcher) val source = sourceObject ?: environment?.getSource() ?: throw ResolverError("Expected DataFetchingEnvironment and source object to not be null!") - if (!TypeUtils.isAssignable(source.javaClass, search.type)) { - throw ResolverError("Expected source object to be an instance of '${TypeUtils.getRawType(search.type, search.type).name}' but instead got '${source.javaClass.name}'") + if (!TypeUtils.isAssignable(source.javaClass, type)) { + throw ResolverError("Expected source object to be an instance of '${TypeUtils.getRawType(type, type).name}' but instead got '${source.javaClass.name}'") } source @@ -152,10 +146,6 @@ internal class ResolverPlan private constructor( data class NotCallableOnResolver(val message: String, val isField: Boolean) - /** - * Finds the member behind each field. Root fields are searched on every root resolver, so it indexes each class's methods - * only once. - */ class Finder(private val options: SchemaParserOptions, private val scalarNames: Set) { private val log = LoggerFactory.getLogger(javaClass) @@ -249,12 +239,6 @@ internal class ResolverPlan private constructor( val name = field.name val capitalizedName = name.replaceFirstChar(Char::titlecase) - // Check for the following one by one: - // 1. Method with exact field name - // 2. Method that returns a boolean with "is" style getter - // 3. Method with "get" style getter - // 4. Method with "getField" style getter - // 5. Method with "get" style getter with the field name converted from snake_case to camelCased. ex: key_ops -> getKeyOps() return listOfNotNull( name, if (isBoolean(field.type)) "is$capitalizedName" else null, @@ -281,8 +265,6 @@ internal class ResolverPlan private constructor( .asSequence() .filter { !it.isSynthetic } .filter { !Modifier.isPrivate(it.modifiers) } - // discard any methods that are coming off the root of the class hierarchy - // to avoid issues with duplicate method declarations .filter { it.declaringClass != Any::class.java } .filter { !search.isSubscription || returnsPublisher(it.returnType, it.genericReturnType, options.genericWrappers) } .toList() @@ -296,7 +278,6 @@ internal class ResolverPlan private constructor( it.eraseUnboundedWildcards() == search.requiredFirstParameterType || method.declaringClass.typeParameters.contains(it) } ?: false } else { - // an extension receiver can only take the source object !isExtensionFunction(method) } @@ -378,18 +359,12 @@ internal class ResolverPlan private constructor( } } -/** - * The kinds of Java member a field can resolve to. The [ResolverPlan.Finder] looks for them in this order. - */ internal enum class ResolverKind(val noun: String, val holdCompletionStage: String) { METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."), FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead."), MAP_VALUE("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.") } -/** - * The parameters a resolver method may have after its arguments, listed in the order the missing-resolver error names them. - */ internal enum class ExtraParameter(private val bindingPrecedence: Int) { ENVIRONMENT(bindingPrecedence = 2) { override fun type(options: SchemaParserOptions): Class<*> = DataFetchingEnvironment::class.java @@ -404,7 +379,6 @@ internal enum class ExtraParameter(private val bindingPrecedence: Int) { CONTEXT_CLASS(bindingPrecedence = 1) { override fun type(options: SchemaParserOptions): Class<*>? = options.contextClass - // the context class can also be an argument's type (e.g. a Map for an input object), so only spec scalars count for it override fun takesArgumentSlotOf(argument: InputValueDefinition) = argument.type.unwrap().name in ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS @@ -429,11 +403,9 @@ internal enum class ExtraParameter(private val bindingPrecedence: Int) { fun types(options: SchemaParserOptions): List> = entries.mapNotNull { it.type(options) } - // a class can be the type of more than one entry, e.g. a context class of DataFetchingEnvironment fun of(parameterType: Class<*>, options: SchemaParserOptions): ExtraParameter? = byBindingPrecedence.find { it.type(options) == parameterType } - // whether a parameter of this type in an argument's position is an extra parameter rather than the argument's fun takesArgumentSlot(parameterType: Class<*>, argument: InputValueDefinition, options: SchemaParserOptions): Boolean { val matching = entries.filter { it.type(options) == parameterType } return matching.isNotEmpty() && matching.all { it.takesArgumentSlotOf(argument) } @@ -476,19 +448,15 @@ private class MethodMember( return resolveTypeVariables(declaredType, search.type) } - val arguments: List = field.inputValueDefinitions.mapIndexed { index, definition -> - val type = resolveTypeVariables(method.genericParameterTypes[index + search.firstArgumentIndex], search.type) - Argument(definition, type, lazy { TypeShape.parameterType(definition.type, type, search.type, options, ScanDictionary.MethodParameterReference(method, index)) }) + val arguments: List = field.inputValueDefinitions.mapIndexed { index, definition -> + ResolverPlan.ArgumentTarget(definition, resolveTypeVariables(method.genericParameterTypes[index + search.firstArgumentIndex], search.type)) } - class Argument(val definition: InputValueDefinition, val type: JavaType, private val lazyShape: Lazy) { - val shape by lazyShape + fun parameterShapes(): Sequence = arguments.asSequence().mapIndexed { index, (definition, type) -> + TypeShape.parameterType(definition.type, type, search.type, options, ScanDictionary.MethodParameterReference(method, index)) } - /** - * What to pass for each parameter in the method's order, leaving out the Continuation of a suspend function. - */ - fun slots(mapper: ObjectMapper): List<(DataFetchingEnvironment) -> Any?> { + fun slots(mapper: ObjectMapper): Array<(DataFetchingEnvironment) -> Any?> { val slots = mutableListOf<(DataFetchingEnvironment) -> Any?>() search.requiredFirstParameterType?.let { expectedType -> @@ -509,10 +477,10 @@ private class MethodMember( slots.add(ExtraParameter.of(parameterType, options)!!.bind(parameterType, method)) } - return slots + return slots.toTypedArray() } - private fun argumentSlot(argument: Argument, mapper: ObjectMapper): (DataFetchingEnvironment) -> Any? { + private fun argumentSlot(argument: ResolverPlan.ArgumentTarget, mapper: ObjectMapper): (DataFetchingEnvironment) -> Any? { val definition = argument.definition val isNonNull = definition.type is NonNullType val isOptional = isOptionalParameter(argument.type, search.type) @@ -568,7 +536,6 @@ private class PropertyMember(private val property: Field) : Member() { private class MapMember(field: FieldDefinition, private val search: ResolverSearch) : Member() { private val key = field.name - // Classmate keeps the value type a Map subclass fixes, e.g. a class extending HashMap override val declaredValueType: JavaType = TypeResolver().resolve(search.type.unwrap()).typeParametersFor(Map::class.java).elementAtOrElse(1) { Any::class.java } @@ -583,8 +550,7 @@ private class MapMember(field: FieldDefinition, private val search: ResolverSear override fun toString() = "MapFieldResolver{key=$key}" companion object { - // the light data fetcher reads any Map it's given, without checking its class against the search type - val sourceResolver = SourceResolver { _, source -> + val anyMap = SourceResolver { _, source -> source as? Map<*, *> ?: throw RuntimeException("MapFieldResolver attempt to fetch a field from an object instance that was not a map") } } @@ -595,7 +561,7 @@ private val noArguments = emptyArray() private class Fetcher( private val source: SourceResolver, private val member: MethodMember, - private val slots: List<(DataFetchingEnvironment) -> Any?>, + private val slots: Array<(DataFetchingEnvironment) -> Any?>, private val options: SchemaParserOptions, private val unwrapper: TypeShape.Unwrapper ) : DataFetcher { @@ -603,7 +569,9 @@ private class Fetcher( override fun get(environment: DataFetchingEnvironment): Any? { val target = source.resolve(environment, null) val arguments = arrayOfNulls(if (member.isSuspend) slots.size + 1 else slots.size) - slots.forEachIndexed { index, slot -> arguments[index] = slot(environment) } + for (index in slots.indices) { + arguments[index] = slots[index](environment) + } return if (member.isSuspend) { // start undispatched so DataLoader loads are queued before graphql-java dispatches them, @@ -617,16 +585,10 @@ private class Fetcher( } } - /** - * Function that returns the object used to fetch the data. It can be a DataFetcher or an entity. - */ @Suppress("unused") fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) } -/** - * For a member without parameters, which needs the environment only if a generic wrapper's transformer asks for it. - */ private class LightFetcher( private val source: SourceResolver, private val lightSource: SourceResolver, @@ -642,9 +604,6 @@ private class LightFetcher( override fun get(environment: DataFetchingEnvironment): Any? = get(environment.fieldDefinition, source.resolve(environment, null)) { environment } - /** - * Function that returns the object used to fetch the data. It can be a DataFetcher or an entity. - */ @Suppress("unused") fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) } @@ -665,6 +624,5 @@ private fun Method.isSuspendFunction(): Boolean { } } -// the trailing Continuation of a suspend function isn't a resolver argument private fun Method.parameterCountWithoutContinuation(): Int = if (isSuspendFunction()) parameterCount - 1 else parameterCount diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index acbb83da..5d38376f 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -283,11 +283,6 @@ private fun GenericWrapper.canTransformToPublisher() = internal fun isOptionalParameter(parameterType: JavaType, containingType: JavaType): Boolean = TypeUtils.getRawType(parameterType, containingType) == Optional::class.java -/** - * A concrete scalar type is a scalar type where values always coerce to the same Java type. The ID scalar type is not concrete - * because values can be coerced to multiple different Java types (eg. String, Long, UUID). All values of a non-concrete scalar - * type must be converted to the target method parameter type. - */ internal fun isConcreteScalarType(type: GraphQLLangType, parameterType: JavaType, scalarNames: Set): Boolean = when (type) { is ListType -> parameterType.typeArgument(List::class.java) diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt index 5f76cffd..6ceb40c3 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt @@ -67,7 +67,6 @@ class ResolverOwnershipTest { ) ) - // input-object field types are guessed from getters until they come from the mapping Jackson uses private val guessesInputFieldTypes = object : DescribedPredicate>("is in ScanDictionary.findInputValueTypeInType") { override fun test(access: JavaAccess<*>) = access.origin.owner.isEquivalentTo(ScanDictionary::class.java) && access.origin.name.startsWith("findInputValueTypeInType") diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt index ff48e52c..f8ec035b 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverPlanTest.kt @@ -122,6 +122,29 @@ class ResolverPlanTest { assertEquals(methodName("count", "Int"), "getFieldCount") } + @Test + fun `finder takes a method before a field and a field before a Map key`() { + fun reference(dataClass: Class<*>) = finder.find(FieldDefinition("value", TypeName("String")), DataClassResolverInfo(dataClass)).reference() + + assertEquals(reference(MapWithMethod::class.java), "return type of method ${MapWithMethod::class.java.getMethod("getValue")}") + assertEquals(reference(MapWithField::class.java), "type of field ${MapWithField::class.java.getField("value")}") + assertEquals(reference(PlainMap::class.java), "type of field value") + } + + class PlainMap : HashMap() + + class MapWithField : HashMap() { + @JvmField + val value: String = "field" + } + + class MapWithMethod : HashMap() { + @JvmField + val value: String = "field" + + fun getValue(): String = "method" + } + class RootQuery1 : GraphQLQueryResolver { fun field1() {} } From 7f71049ac8bd1adf205d9a7f2ad2ed53547e037b Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 21:55:01 -0500 Subject: [PATCH 57/64] Describe the resolver plan in the rule table and the bounded check skill The rows for deciding a method's signature once and for one argument conversion entry point now name ResolverPlan, ArgumentConverter and ResolverOwnershipTest. The bounded check skill names ResolverPlan.kt where it named the deleted resolver files. --- .../verify-return-value-unwrapping/SKILL.md | 24 +++++++++---------- AGENTS.md | 7 +++--- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index f0a32b40..0a35bd1c 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -1,6 +1,6 @@ --- name: verify-return-value-unwrapping -description: Exhaustively check, up to a bound, that the value of a resolver method, a field with no matching getter or a typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to TypeShape (the type walk, ContainerKind, the generic wrapper rules or the Unwrapper), the data fetchers in MethodFieldResolver, PropertyFieldResolver or MapFieldResolver, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. +description: Exhaustively check, up to a bound, that the value of a resolver method, a field with no matching getter or a typed Map reaches graphql-java fully unwrapped. Futures are awaited, generic wrappers are transformed, Optional and DataFetcherResult are handled, and list order, nulls and failures are kept, for every return type nested up to 3 containers deep. Use it before pushing any change to TypeShape (the type walk, ContainerKind, the generic wrapper rules or the Unwrapper), the data fetchers in ResolverPlan, or the GenericWrapper defaults, and whenever a bug report says graphql-java got a CompletableFuture, Optional or wrapper object as a field value. --- # Verify return value unwrapping @@ -38,11 +38,11 @@ and an all-non-null GraphQL type. Each return type runs as three kinds of resolver, each compiled as a Java class at runtime: -| Kind | Generated resolver | Data fetcher | +| Kind | Generated resolver | Member in `ResolverPlan.kt` | |---|---|---| -| `method` | `public field()` on the query resolver | `MethodFieldResolver` | -| `property` | `public field;` on the query resolver, which is also what a Kotlin `@JvmField` compiles to | `PropertyFieldResolver` | -| `map` | `extends HashMap>`, bound to `type Holder` and returned by `Query.holder` | `MapFieldResolver` | +| `method` | `public field()` on the query resolver | `MethodMember` | +| `property` | `public field;` on the query resolver, which is also what a Kotlin `@JvmField` compiles to | `PropertyMember` | +| `map` | `extends HashMap>`, bound to `type Holder` and returned by `Query.holder` | `MapMember` | The check builds each schema through the public `SchemaParser` API, which rejects about a fifth of the combinations, such as `Optional` below the top level. For every accepted one it executes the query once for each value that makes at most @@ -154,8 +154,8 @@ or delete it when none fail, so that a regression shows up as `FAIL`. ## What this does not cover - Suspend functions, subscriptions and `Publisher`, arrays, and Kotlin-declared resolver methods. The generated resolvers - are Java methods without parameters, so only `LightMethodFieldResolverDataFetcher` runs, not - `MethodFieldResolverDataFetcher`. + are Java methods without parameters, so only `LightFetcher` in `ResolverPlan.kt` runs, not + `Fetcher`. - Wrappers picked by a subclass of the value (`Box` and `SpecialBox` in `NestedGenericWrapperTest`), wrappers with a type argument index other than 0, custom `schemaWrapper`s other than the list one, transformers that return a `FutureTask`, and DataLoader futures. @@ -169,20 +169,18 @@ or delete it when none fail, so that a regression shows up as `FAIL`. ## Coverage and sync -Last confirmed to describe the code at commit `5ce3d1db` (2026-11-05). It covers: +Last confirmed to describe the code at commit `948c1ca6` (2026-11-06). It covers: | File | What | |---|---| -| `src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt` | all of it: the walk, `ContainerKind`, `GenericWrappers`, `resolveTypeVariables`, the `Unwrapper` and its steps | -| `src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt` | `createDataFetcher` (the `TypeShape.Unwrapper`), `returnShape`, `LightMethodFieldResolverDataFetcher` | +| `src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt` | the walk, `ContainerKind`, `GenericWrappers`, `resolveTypeVariables`, the `Unwrapper` and its steps | +| `src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt` | `dataFetcher` (the `TypeShape.Unwrapper` per kind), `returnShape`, the members' `declaredValueType` and `read`, `Fetcher` and `LightFetcher` | | `src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt` | `GenericWrapper` and the default wrappers in `build()` | -| `src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt` | all of it | -| `src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt` | all of it, for Map subclasses with a typed value | To see whether a change needs another look: ```bash -git log --oneline 5ce3d1db..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/MethodFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt src/main/kotlin/graphql/kickstart/tools/resolver/PropertyFieldResolver.kt src/main/kotlin/graphql/kickstart/tools/resolver/MapFieldResolver.kt +git log --oneline 948c1ca6..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt ``` Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and diff --git a/AGENTS.md b/AGENTS.md index 23b1caf9..cd466de8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,7 +7,8 @@ resolver classes. Published to Maven Central. Kotlin, with a few Java files, tar - `src/main/kotlin/graphql/kickstart/tools`: `SchemaParser` and its builder and options, `MergedDefinitions.kt` (merges each SDL type with its extensions into a `MergedType`. Other code, apart from the Relay factory, reads SDL types only through - it), `SchemaClassScanner` (matches schema types to classes), `resolver/` (field resolvers and data fetchers), `directive/`, + it), `SchemaClassScanner` (matches schema types to classes), `resolver/` (`ResolverPlan.kt` finds the Java member behind each field and builds its data fetcher, `TypeShape.kt` walks + declared types and unwraps values, `ArgumentConverter.kt` converts arguments), `directive/`, `relay/`, `proxy/` (finds the class behind a Spring, Guice, Weld or Javassist proxied resolver), `util/` - `src/test/kotlin`: JUnit tests, one class per feature. A test for an issue goes into the class for its feature. `EndToEndTest` and `EndToEndSpecHelper` hold the shared schema and resolvers @@ -93,13 +94,13 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| | The value of a resolver method, a field with no matching getter or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | -| A resolver method's parameter layout, type variables and source are decided once, at schema build | docs only | +| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt` and expose a raw read, never a data fetcher. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, and the fixture tests in `ResolverCompatibilityTest` don't compile until they build a sample of each. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (apart from the input-field getters in `ScanDictionary.findInputValueTypeInType`), on a member that depends on a data fetcher, on a data fetcher without a `TypeShape.Unwrapper`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt` | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so a value that differs on a return type they run fails the build. The bounded check also pins how many return types it generates, and for each kind how many the build rejects and how many executions run, so a change that stops running some fails until the same diff updates `pinnedCoverage`. It doesn't judge whether a newly rejected return type should build | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it. `TypeExtensionTest` builds and queries a schema with an extension of every kind, so a build that leaves an extension's fields, interfaces, members, values, input fields or directives out of the built type fails it, however the code read them | | Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | | Reuse an existing structure before you add a parallel one | docs only | -| Argument conversion goes through one entry point | docs only | +| Argument conversion goes through one entry point | `ArgumentConverter`, which `ResolverPlan` builds once per argument. `ResolverOwnershipTest` fails on a TokenBuffer or a Jackson `readValue`, `convertValue`, `treeToValue` or `valueToTree` outside `ArgumentConverter.kt`, and on an `ArgumentConverter` built or called outside `ResolverPlan.kt`. Jackson's per-call retry for scalars it can't convert stays inside `ArgumentConverter` | | An input field's Java type comes from the mapping Jackson uses, not from guessed getters | docs only | | Every recursive walk over the type graph handles cycles, and a test covers a cycle | docs only | | Public signatures stay binary compatible, data class `copy()` and `componentN` included | japicmp with `build/japicmp-kotlin-public.groovy` at `mvn verify`, which allows excludes and other narrowing options only at an X.0.0 version | From 145f5b1f72e15cbb82f65eeeb01d08df0b40ea19 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 22:00:43 -0500 Subject: [PATCH 58/64] Keep logging resolver lookup warnings under the scanner's logger name The probe diff against trunk showed the missing-resolver and inaccessible-field WARNs moving from graphql.kickstart.tools.resolver.FieldResolverScanner to ResolverPlan$Finder, which would change what an app's logging config raises or silences. MissingFieldResolverTest now checks the logger names. --- .../graphql/kickstart/tools/resolver/ResolverPlan.kt | 3 ++- .../kickstart/tools/MissingFieldResolverTest.kt | 10 +++++----- src/test/kotlin/graphql/kickstart/tools/TestUtils.kt | 7 ++++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt index ef076ed7..b58fb0d9 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt @@ -148,7 +148,8 @@ internal class ResolverPlan private constructor( class Finder(private val options: SchemaParserOptions, private val scalarNames: Set) { - private val log = LoggerFactory.getLogger(javaClass) + // apps raise or silence these warnings by logger name in their logging config + private val log = LoggerFactory.getLogger("graphql.kickstart.tools.resolver.FieldResolverScanner") private val methodsByNameCache = mutableMapOf, Boolean>, Map>>() diff --git a/src/test/kotlin/graphql/kickstart/tools/MissingFieldResolverTest.kt b/src/test/kotlin/graphql/kickstart/tools/MissingFieldResolverTest.kt index 9272f70e..e2143786 100644 --- a/src/test/kotlin/graphql/kickstart/tools/MissingFieldResolverTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/MissingFieldResolverTest.kt @@ -30,8 +30,8 @@ class MissingFieldResolverTest { } @Test - fun `should warn about each missing field when unimplemented resolvers are allowed`() { - val (schema, warnings) = withWarnings { + fun `should warn about each missing field when unimplemented resolvers are allowed, from the loggers apps configure`() { + val (schema, events) = withWarningEvents { SchemaParser.newParser() .schemaString( """ @@ -51,10 +51,10 @@ class MissingFieldResolverTest { // missingField has no resolver, so querying it throws schema.assertEveryFieldResolves(except = setOf("Query.missingField")) - assertEquals(warnings, listOf( - "Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved " + + assertEquals(events.map { "${it.loggerName}: ${it.formattedMessage}" }, listOf( + "graphql.kickstart.tools.SchemaClassScanner: Option 'allowUnimplementedResolvers' should only be set to true during development, as it can cause schema errors to be moved " + "to query time instead of schema creation time. Make sure this is turned off in production.", - "Missing resolver for field: ${schema.queryType.getFieldDefinition("missingField").definition}" + "graphql.kickstart.tools.resolver.FieldResolverScanner: Missing resolver for field: ${schema.queryType.getFieldDefinition("missingField").definition}" )) } diff --git a/src/test/kotlin/graphql/kickstart/tools/TestUtils.kt b/src/test/kotlin/graphql/kickstart/tools/TestUtils.kt index 2874c8f7..36e060a3 100644 --- a/src/test/kotlin/graphql/kickstart/tools/TestUtils.kt +++ b/src/test/kotlin/graphql/kickstart/tools/TestUtils.kt @@ -41,6 +41,11 @@ fun assertNotNull(actual: T) { } fun withWarnings(block: () -> T): Pair> { + val (result, events) = withWarningEvents(block) + return result to events.map { it.formattedMessage } +} + +fun withWarningEvents(block: () -> T): Pair> { // the tests run in the library's module, which doesn't read logback's listOf("ch.qos.logback.classic", "ch.qos.logback.core").forEach { name -> ModuleLayer.boot().findModule(name).ifPresent { SchemaParser::class.java.module.addReads(it) } @@ -50,7 +55,7 @@ fun withWarnings(block: () -> T): Pair> { logger.addAppender(appender) try { val result = block() - return result to appender.list.filter { it.level.isGreaterOrEqual(Level.WARN) }.map { it.formattedMessage } + return result to appender.list.filter { it.level.isGreaterOrEqual(Level.WARN) } } finally { logger.detachAppender(appender) } From ce6c5e822a093fa8121a757c04940fdf411ee203 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 22:32:14 -0500 Subject: [PATCH 59/64] Keep the data fetcher class names apps reach the resolver through Apps call getWrappedFetchingObject by reflection from Instrumentation.instrumentDataFetcher, and some check a fetcher's class, so the fetchers keep their names and stay public in bytecode. Each member's fetcher is a ResolverDataFetcher, whose constructor takes the unwrapper, and the member's class decides its ResolverKind. The bounded check now fails with MODEL ERROR when a ResolverKind has no kind in Check.java, and the fixture tests name the fixture to add instead of offering an else branch. --- .../kickstart/tools/resolver/ResolverPlan.kt | 159 +++++++++++------- .../kickstart/tools/resolver/TypeShape.kt | 4 + .../tools/ResolverCompatibilityTest.kt | 81 ++++++--- .../tools/WrappedFetchingObjectTest.kt | 66 ++++++++ .../returnvalue/ReturnValueUnwrappingTest.kt | 4 +- src/test/resources/returnvalue/Check.java | 11 ++ 6 files changed, 238 insertions(+), 87 deletions(-) create mode 100644 src/test/kotlin/graphql/kickstart/tools/WrappedFetchingObjectTest.kt diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt index b58fb0d9..3d5ce430 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt @@ -69,23 +69,24 @@ internal class ResolverPlan private constructor( returnShape?.let { yield(it) } } - fun dataFetcher(): DataFetcher<*> { - val member = member - ?: return (options.missingResolverDataFetcherProvider ?: notImplemented).createDataFetcher(field, options) + fun dataFetcher(): DataFetcher<*> = + member?.let(::fetcherOf) ?: (options.missingResolverDataFetcherProvider ?: notImplemented).createDataFetcher(field, options) + + private fun fetcherOf(member: Member): ResolverDataFetcher { val source = sourceResolver() + val unwrapper = TypeShape.Unwrapper(returnShape!!, member.kind, member.name, member.isSuspend) return when (member) { is MethodMember -> { val slots = member.slots(objectMapper) - val unwrapper = TypeShape.Unwrapper(returnShape!!, ResolverKind.METHOD, member.name, member.isSuspend) - if (slots.isNotEmpty() || member.isSuspend) Fetcher(source, member, slots, options, unwrapper) else LightFetcher(source, source, member, unwrapper) + if (slots.isNotEmpty() || member.isSuspend) { + MethodFieldResolverDataFetcher(source, member.method, slots, member.isSuspend, options, unwrapper) + } else { + LightMethodFieldResolverDataFetcher(source, member.method, unwrapper) + } } - is PropertyMember -> LightFetcher(source, source, member, TypeShape.Unwrapper(returnShape!!, ResolverKind.FIELD, member.name)) - - is MapMember -> { - val unwrapper = if (member.hasTypedValues) TypeShape.Unwrapper(returnShape!!, ResolverKind.MAP_VALUE, member.name) else null - LightFetcher(source, MapMember.anyMap, member, unwrapper) - } + is PropertyMember -> PropertyFieldResolverDataFetcher(source, member.property, unwrapper) + is MapMember -> MapFieldResolverDataFetcher(source, member.key, unwrapper) } } @@ -360,10 +361,15 @@ internal class ResolverPlan private constructor( } } -internal enum class ResolverKind(val noun: String, val holdCompletionStage: String) { +internal enum class ResolverKind(val noun: String, val holdCompletionStage: String, val unwrapsObjectValues: Boolean = true) { METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."), FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead."), - MAP_VALUE("map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.") + + // an untyped Map declares no value type, so unwrapping its values would mean inspecting each one at runtime + MAP_VALUE( + "map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.", + unwrapsObjectValues = false + ) } internal enum class ExtraParameter(private val bindingPrecedence: Int) { @@ -380,6 +386,7 @@ internal enum class ExtraParameter(private val bindingPrecedence: Int) { CONTEXT_CLASS(bindingPrecedence = 1) { override fun type(options: SchemaParserOptions): Class<*>? = options.contextClass + // the context class can also be an argument's type (e.g. a Map for an input object), so only spec scalars count for it override fun takesArgumentSlotOf(argument: InputValueDefinition) = argument.type.unwrap().name in ScalarInfo.GRAPHQL_SPECIFICATION_SCALARS_DEFINITIONS @@ -416,13 +423,12 @@ internal enum class ExtraParameter(private val bindingPrecedence: Int) { internal class FieldResolverError(msg: String) : RuntimeException(msg) -private sealed class Member { +private sealed class Member(val kind: ResolverKind) { abstract val name: String abstract val declaredValueType: JavaType abstract val reference: ScanDictionary.Reference abstract val javaMember: java.lang.reflect.Member? - - abstract fun read(target: Any, arguments: Array): Any? + open val isSuspend get() = false } private class MethodMember( @@ -431,9 +437,8 @@ private class MethodMember( val method: Method, private val options: SchemaParserOptions, private val scalarNames: Set -) : Member() { - val isSuspend = method.isSuspendFunction() - private val parameterCount = if (isSuspend) method.parameterCount - 1 else method.parameterCount +) : Member(ResolverKind.METHOD) { + override val isSuspend = method.isSuspendFunction() override val name get() = "${method.declaringClass.name}.${method.name}" override val javaMember get() = method @@ -474,7 +479,7 @@ private class MethodMember( arguments.forEach { slots.add(argumentSlot(it, mapper)) } - method.parameterTypes.slice(slots.size until parameterCount).forEach { parameterType -> + method.parameterTypes.slice(slots.size until method.parameterCountWithoutContinuation()).forEach { parameterType -> slots.add(ExtraParameter.of(parameterType, options)!!.bind(parameterType, method)) } @@ -512,103 +517,127 @@ private class MethodMember( } } - override fun read(target: Any, arguments: Array): Any? = invoke(method, target, arguments) - - suspend fun readSuspending(target: Any, arguments: Array): Any? = - suspendCoroutineUninterceptedOrReturn { continuation -> - arguments[arguments.lastIndex] = continuation - invoke(method, target, arguments) - } - + // the build error for a field more than one root resolver serves lists the resolvers by these names override fun toString() = "MethodFieldResolver{method=$method}" } -private class PropertyMember(private val property: Field) : Member() { +private class PropertyMember(val property: Field) : Member(ResolverKind.FIELD) { override val name get() = "${property.declaringClass.name}.${property.name}" override val javaMember get() = property override val declaredValueType: JavaType get() = property.genericType override val reference get() = ScanDictionary.FieldTypeReference(property.toString()) - override fun read(target: Any, arguments: Array): Any? = property.get(target) - override fun toString() = "PropertyFieldResolver{property=$property}" } -private class MapMember(field: FieldDefinition, private val search: ResolverSearch) : Member() { - private val key = field.name +private class MapMember(field: FieldDefinition, private val search: ResolverSearch) : Member(ResolverKind.MAP_VALUE) { + val key: String = field.name override val declaredValueType: JavaType = TypeResolver().resolve(search.type.unwrap()).typeParametersFor(Map::class.java).elementAtOrElse(1) { Any::class.java } - val hasTypedValues get() = resolveTypeVariables(declaredValueType, search.type) != Any::class.java - override val name get() = "${search.type.unwrap().name}.$key" override val javaMember: java.lang.reflect.Member? get() = null override val reference get() = ScanDictionary.FieldTypeReference(key) - override fun read(target: Any, arguments: Array): Any? = (target as Map<*, *>)[key] - override fun toString() = "MapFieldResolver{key=$key}" - - companion object { - val anyMap = SourceResolver { _, source -> - source as? Map<*, *> ?: throw RuntimeException("MapFieldResolver attempt to fetch a field from an object instance that was not a map") - } - } } -private val noArguments = emptyArray() +// the only data fetchers a member gets, so every resolver value goes through the unwrapper the scan matched for its field +internal sealed class ResolverDataFetcher(protected val source: SourceResolver, protected val unwrapper: TypeShape.Unwrapper) : DataFetcher -private class Fetcher( - private val source: SourceResolver, - private val member: MethodMember, +internal class MethodFieldResolverDataFetcher( + source: SourceResolver, + private val method: Method, private val slots: Array<(DataFetchingEnvironment) -> Any?>, + private val isSuspend: Boolean, private val options: SchemaParserOptions, - private val unwrapper: TypeShape.Unwrapper -) : DataFetcher { + unwrapper: TypeShape.Unwrapper +) : ResolverDataFetcher(source, unwrapper) { override fun get(environment: DataFetchingEnvironment): Any? { val target = source.resolve(environment, null) - val arguments = arrayOfNulls(if (member.isSuspend) slots.size + 1 else slots.size) + val arguments = arrayOfNulls(if (isSuspend) slots.size + 1 else slots.size) for (index in slots.indices) { arguments[index] = slots[index](environment) } - return if (member.isSuspend) { + return if (isSuspend) { // start undispatched so DataLoader loads are queued before graphql-java dispatches them, // which runs the block even if the context is already cancelled, hence ensureActive environment.coroutineScope().future(options.coroutineContextProvider.provide(), CoroutineStart.UNDISPATCHED) { ensureActive() - member.readSuspending(target, arguments)?.let { unwrapper.unwrapSuspending(it) { environment } } + invokeSuspending(method, target, arguments)?.let { unwrapper.unwrapSuspending(it) { environment } } } } else { - member.read(target, arguments)?.let { unwrapper.unwrap(it) { environment } } + invoke(method, target, arguments)?.let { unwrapper.unwrap(it) { environment } } } } - @Suppress("unused") + /** + * The object the method is called on, the resolver or the source object. Apps call this by reflection from graphql-java's + * `Instrumentation.instrumentDataFetcher` to reach the resolver behind a field. + */ fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) } -private class LightFetcher( - private val source: SourceResolver, - private val lightSource: SourceResolver, - private val member: Member, - private val unwrapper: TypeShape.Unwrapper? -) : LightDataFetcher { +/** + * [MethodFieldResolverDataFetcher] for a method without parameters, which graphql-java calls without building an environment. + */ +internal class LightMethodFieldResolverDataFetcher( + source: SourceResolver, + private val method: Method, + unwrapper: TypeShape.Unwrapper +) : ResolverDataFetcher(source, unwrapper), LightDataFetcher { - override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? { - val value = member.read(lightSource.resolve(null, sourceObject), noArguments) - return if (value == null || unwrapper == null) value else unwrapper.unwrap(value, environmentSupplier) - } + override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? = + invoke(method, source.resolve(null, sourceObject), noArguments)?.let { unwrapper.unwrap(it, environmentSupplier) } override fun get(environment: DataFetchingEnvironment): Any? = get(environment.fieldDefinition, source.resolve(environment, null)) { environment } - @Suppress("unused") + /** + * See [MethodFieldResolverDataFetcher.getWrappedFetchingObject]. + */ fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) } +internal class PropertyFieldResolverDataFetcher( + source: SourceResolver, + private val property: Field, + unwrapper: TypeShape.Unwrapper +) : ResolverDataFetcher(source, unwrapper), LightDataFetcher { + + override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? = + property.get(source.resolve(null, sourceObject))?.let { unwrapper.unwrap(it, environmentSupplier) } + + override fun get(environment: DataFetchingEnvironment): Any? = + get(environment.fieldDefinition, source.resolve(environment, null)) { environment } +} + +internal class MapFieldResolverDataFetcher( + source: SourceResolver, + private val key: String, + unwrapper: TypeShape.Unwrapper +) : ResolverDataFetcher(source, unwrapper), LightDataFetcher { + + override fun get(fieldDefinition: GraphQLFieldDefinition?, sourceObject: Any?, environmentSupplier: Supplier): Any? { + val map = sourceObject as? Map<*, *> ?: throw RuntimeException("MapFieldResolver attempt to fetch a field from an object instance that was not a map") + return map[key]?.let { unwrapper.unwrap(it, environmentSupplier) } + } + + override fun get(environment: DataFetchingEnvironment): Any? = + get(environment.fieldDefinition, source.resolve(environment, null)) { environment } +} + +private val noArguments = emptyArray() + +private suspend fun invokeSuspending(method: Method, instance: Any, arguments: Array): Any? = + suspendCoroutineUninterceptedOrReturn { continuation -> + arguments[arguments.lastIndex] = continuation + invoke(method, instance, arguments) + } + private fun invoke(method: Method, instance: Any, arguments: Array): Any? { try { return method.invoke(instance, *arguments) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index 5d38376f..de203674 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -49,6 +49,7 @@ internal class TypeShape private constructor( fun error(msg: String) = matchError(graphQLType, reference, javaType, msg) class Unwrapper(shape: TypeShape, resolverKind: ResolverKind, resolverName: String, isSuspendFunction: Boolean = false) { + private val returnsValueAsIs = !resolverKind.unwrapsObjectValues && shape.declaredType == Any::class.java private val wrappers = shape.wrappers private val awaitable: Awaitable private val isOutermostFuture: Boolean @@ -71,6 +72,9 @@ internal class TypeShape private constructor( } fun unwrap(value: Any, environmentSupplier: Supplier): Any? { + if (returnsValueAsIs) { + return value + } val wrapper = wrappers.ofValue(value) val transformed = if (wrapper == null) value else wrapper.transformer(value, environmentSupplier.get()) val unwrapped = awaitable.requireOutermost(transformed) diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt index 1c2bd759..ffeeea07 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverCompatibilityTest.kt @@ -7,12 +7,15 @@ import graphql.GraphQLContext import graphql.execution.DataFetcherResult import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper import graphql.kickstart.tools.resolver.ExtraParameter +import graphql.kickstart.tools.resolver.FieldResolverError import graphql.kickstart.tools.resolver.ResolverKind import graphql.schema.DataFetchingEnvironment +import graphql.schema.FieldCoordinates import kotlinx.coroutines.flow.toList import kotlinx.coroutines.reactive.asFlow import kotlinx.coroutines.reactive.publish import kotlinx.coroutines.runBlocking +import org.junit.Assert.assertThrows import org.junit.Assert.fail import org.junit.Test import org.reactivestreams.Publisher @@ -94,45 +97,49 @@ class ResolverCompatibilityTest { } @Test - fun `every resolver kind serves a field`() { + fun `every resolver kind gets its own data fetcher, which unwraps the value`() { ResolverKind.entries.forEach { kind -> - val holder: Any = when (kind) { - ResolverKind.METHOD -> NounMethodHolder(kind.noun) - ResolverKind.FIELD -> NounFieldHolder(kind.noun) - ResolverKind.MAP_VALUE -> hashMapOf("value" to kind.noun) - } + val fixture = kindFixtures[kind] + ?: throw AssertionError("ResolverKind.$kind has no entry in ResolverCompatibilityTest.kindFixtures. Add a holder whose 'value' resolves through it as a Box, and the name of the data fetcher it gets") + val holder = fixture.holder(kind.noun) val schema = SchemaParser.newParser() .schemaString("type Query { holder: Holder } type Holder { value: String }") .resolvers(object : GraphQLQueryResolver { fun holder(): Any = holder }) .dictionary("Holder", holder.javaClass) + .options(SchemaParserOptions.newOptions().genericWrappers(boxWrapper).build()) .build() .makeExecutableSchema() + val holderType = schema.getObjectType("Holder")!! + val dataFetcher = schema.codeRegistry.getDataFetcher(FieldCoordinates.coordinates(holderType, "value"), holderType.getFieldDefinition("value")) + assertEquals(dataFetcher.javaClass.simpleName, fixture.dataFetcher) assertEquals(GraphQL.newGraphQL(schema).build().execute("{ holder { value } }").render(), "{holder={value=${kind.noun}}}") } } + @Test + fun `a field more than one root resolver serves fails the build, naming each resolver`() { + val error = assertThrows(FieldResolverError::class.java) { + SchemaParser.newParser().schemaString("type Query { value: String }").resolvers(ValueMethodRoot(), ValueFieldRoot()).build().makeExecutableSchema() + } + + assertEquals( + error.message!!.substringAfter("': "), + "[MethodFieldResolver{method=public final java.lang.String ${ValueMethodRoot::class.java.name}.value()}, " + + "PropertyFieldResolver{property=public final java.lang.String ${ValueFieldRoot::class.java.name}.value}]" + ) + } + @Test fun `every extra parameter binds after the arguments`() { val options = SchemaParserOptions.newOptions().contextClass(AppContext::class).build() val context = mapOf(AppContext::class.java to AppContext("ann"), "key" to "k") ExtraParameter.entries.forEach { parameter -> - val (resolver, expected) = when (parameter) { - ExtraParameter.ENVIRONMENT -> object : GraphQLQueryResolver { - fun value(first: String, env: DataFetchingEnvironment) = "$first ${env.field.name}" - } to "x value" - - ExtraParameter.GRAPHQL_CONTEXT -> object : GraphQLQueryResolver { - fun value(first: String, context: GraphQLContext) = "$first ${context.get("key")}" - } to "x k" - - ExtraParameter.CONTEXT_CLASS -> object : GraphQLQueryResolver { - fun value(first: String, context: AppContext) = "$first ${context.user}" - } to "x ann" - } + val (resolver, expected) = extraParameterFixtures[parameter] + ?: throw AssertionError("ExtraParameter.$parameter has no entry in ResolverCompatibilityTest.extraParameterFixtures. Add a resolver whose value(first) takes it last, and what it returns") assertEquals( execute("type Query { value(first: String!): String }", "{ value(first: \"x\") }", resolver, options = options, context = context), @@ -400,10 +407,24 @@ class ResolverCompatibilityTest { class AppContext(val user: String) class NounMethodHolder(private val noun: String) { - fun value() = noun + fun value() = Box(noun) + } + + class NounFieldHolder(noun: String) { + @JvmField val value = Box(noun) + } + + class NounMap : HashMap>() + + class KindFixture(val holder: (String) -> Any, val dataFetcher: String) + + class ValueMethodRoot : GraphQLQueryResolver { + fun value() = "method" } - class NounFieldHolder(@JvmField val value: String) + class ValueFieldRoot : GraphQLQueryResolver { + @JvmField val value = "field" + } class ContextResolver : GraphQLQueryResolver { fun extras(first: String, env: DataFetchingEnvironment, context: AppContext, graphQLContext: GraphQLContext, again: DataFetchingEnvironment) = @@ -443,6 +464,24 @@ class ResolverCompatibilityTest { val leftWrapper = GenericWrapper.withTransformer(Left::class, 0, { wrapper -> wrapper.left }) val rightWrapper = GenericWrapper.withTransformer(Right::class, 0, { wrapper -> wrapper.right }) + val kindFixtures = mapOf( + ResolverKind.METHOD to KindFixture(::NounMethodHolder, "LightMethodFieldResolverDataFetcher"), + ResolverKind.FIELD to KindFixture(::NounFieldHolder, "PropertyFieldResolverDataFetcher"), + ResolverKind.MAP_VALUE to KindFixture({ noun -> NounMap().apply { put("value", Box(noun)) } }, "MapFieldResolverDataFetcher") + ) + + val extraParameterFixtures = mapOf( + ExtraParameter.ENVIRONMENT to (object : GraphQLQueryResolver { + fun value(first: String, env: DataFetchingEnvironment) = "$first ${env.field.name}" + } to "x value"), + ExtraParameter.GRAPHQL_CONTEXT to (object : GraphQLQueryResolver { + fun value(first: String, context: GraphQLContext) = "$first ${context.get("key")}" + } to "x k"), + ExtraParameter.CONTEXT_CLASS to (object : GraphQLQueryResolver { + fun value(first: String, context: AppContext) = "$first ${context.user}" + } to "x ann") + ) + val shapes = listOf( Shape("future", "Foo", "{name=a}") { FutureMap().apply { put("future", it.future) } }, Shape("futureOfListOfFutures", "[Foo]", "[{name=a}, {name=b}]") { FutureOfListOfFuturesMap().apply { put("futureOfListOfFutures", it.futureOfListOfFutures) } }, diff --git a/src/test/kotlin/graphql/kickstart/tools/WrappedFetchingObjectTest.kt b/src/test/kotlin/graphql/kickstart/tools/WrappedFetchingObjectTest.kt new file mode 100644 index 00000000..1fc37cbb --- /dev/null +++ b/src/test/kotlin/graphql/kickstart/tools/WrappedFetchingObjectTest.kt @@ -0,0 +1,66 @@ +package graphql.kickstart.tools + +import graphql.GraphQL +import graphql.execution.instrumentation.Instrumentation +import graphql.execution.instrumentation.InstrumentationState +import graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters +import graphql.schema.DataFetcher +import graphql.schema.DataFetchingEnvironment +import org.junit.Test + +class WrappedFetchingObjectTest { + + @Test + fun `an instrumentation in another package reaches the object behind a method's data fetcher by reflection`() { + val holder = Holder() + val query = Query(holder) + val holderResolver = HolderResolver() + val wrapped = mutableMapOf() + val instrumentation = object : Instrumentation { + override fun instrumentDataFetcher(dataFetcher: DataFetcher<*>, parameters: InstrumentationFieldFetchParameters, state: InstrumentationState?): DataFetcher<*> = + DataFetcher { environment -> + val fetchingObject = dataFetcher.javaClass.getMethod("getWrappedFetchingObject", DataFetchingEnvironment::class.java).invoke(dataFetcher, environment) + wrapped[environment.field.name] = "${dataFetcher.javaClass.name} -> ${identify(fetchingObject, query, holderResolver, holder)}" + dataFetcher.get(environment) + } + } + val schema = SchemaParser.newParser() + .schemaString("type Query { holder: Holder } type Holder { method: String withArgument(x: String): String resolved: String }") + .resolvers(query, holderResolver) + .build() + .makeExecutableSchema() + + val result = GraphQL.newGraphQL(schema).instrumentation(instrumentation).build().execute("{ holder { method withArgument(x: \"a\") resolved } }") + + assertEquals(result.errors, listOf()) + assertEquals( + wrapped, + mapOf( + "holder" to "graphql.kickstart.tools.resolver.LightMethodFieldResolverDataFetcher -> query resolver", + "method" to "graphql.kickstart.tools.resolver.LightMethodFieldResolverDataFetcher -> source object", + "withArgument" to "graphql.kickstart.tools.resolver.MethodFieldResolverDataFetcher -> source object", + "resolved" to "graphql.kickstart.tools.resolver.MethodFieldResolverDataFetcher -> holder resolver" + ) + ) + } + + private fun identify(fetchingObject: Any, query: Query, holderResolver: HolderResolver, holder: Holder) = when { + fetchingObject === query -> "query resolver" + fetchingObject === holderResolver -> "holder resolver" + fetchingObject === holder -> "source object" + else -> "unexpected $fetchingObject" + } + + class Query(private val holder: Holder) : GraphQLQueryResolver { + fun holder() = holder + } + + class Holder { + fun method() = "method" + fun withArgument(x: String) = "argument $x" + } + + class HolderResolver : GraphQLResolver { + fun resolved(holder: Holder) = "resolved ${holder.method()}" + } +} diff --git a/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt b/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt index 6e3da8c0..b2620193 100644 --- a/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/returnvalue/ReturnValueUnwrappingTest.kt @@ -1,5 +1,6 @@ package graphql.kickstart.tools.returnvalue +import graphql.kickstart.tools.resolver.ResolverKind import graphql.kickstart.tools.resolver.TypeShape import org.junit.Assert.fail import org.junit.Test @@ -24,7 +25,8 @@ class ReturnValueUnwrappingTest { val args = System.getProperty("unwrapping.args", "").split(" ").filter { it.isNotBlank() } + listOf( "--known", copy("known-findings.txt", dir).toString(), - "--container-kinds", TypeShape.containerTypes.joinToString(",") { it.canonicalName } + "--container-kinds", TypeShape.containerTypes.joinToString(",") { it.canonicalName }, + "--resolver-kinds", ResolverKind.entries.joinToString(",") { it.noun } ) val report = ByteArrayOutputStream() val passed = URLClassLoader(arrayOf(dir.toUri().toURL()), javaClass.classLoader).use { loader -> diff --git a/src/test/resources/returnvalue/Check.java b/src/test/resources/returnvalue/Check.java index 815dce54..ee8fa9ea 100644 --- a/src/test/resources/returnvalue/Check.java +++ b/src/test/resources/returnvalue/Check.java @@ -338,6 +338,17 @@ public static boolean check(String[] args, String classpath, PrintStream out) th return false; } + Set exercised = Arrays.stream(Kind.values()).map(it -> it.resolverKind).collect(Collectors.toSet()); + List unexercised = Arrays.stream(stringArg(args, "--resolver-kinds").split(",")) + .filter(it -> !exercised.contains(it)) + .collect(Collectors.toList()); + if (!unexercised.isEmpty()) { + out.println("MODEL ERROR: ResolverPlan.kt has a ResolverKind with these nouns, but no Kind in Check.java resolves through them, so a pass would prove nothing about them:"); + unexercised.forEach(it -> out.println(" " + it)); + out.println("Add a Kind for each to Check.java with its holdCompletionStage text, and build its resolver in the switches over Kind."); + return false; + } + List cases = cases(depth); Map> resolvers = compile(cases, classpath); From 6cb39afe079f49bece693427eb97090388b61e6c Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 22:32:18 -0500 Subject: [PATCH 60/64] Scope the resolver ownership rules to exact classes and close their reflection gaps Exemptions now name the top-level classes each owning file declares and count nested and lambda classes through their enclosing class, so neither a file of the same name elsewhere nor a '$' in a class name inherits one. The ScanDictionary exception covers only the type reads findInputValueTypeInType makes. The reflection rule also covers MethodHandles, kotlin-reflect calls and return types, Field writes and primitive reads, and commons-lang3 field and method utilities, and the TokenBuffer rule covers updateValue and readValueAs. Every library data fetcher must be a ResolverDataFetcher. --- .../kickstart/tools/ResolverOwnershipTest.kt | 134 ++++++++++++------ 1 file changed, 87 insertions(+), 47 deletions(-) diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt index 6ceb40c3..dd2b5e5d 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt @@ -5,23 +5,25 @@ import com.tngtech.archunit.core.domain.JavaAccess import com.tngtech.archunit.core.domain.JavaClass import com.tngtech.archunit.core.domain.JavaClasses import com.tngtech.archunit.core.importer.ClassFileImporter -import com.tngtech.archunit.lang.ArchCondition -import com.tngtech.archunit.lang.ConditionEvents -import com.tngtech.archunit.lang.SimpleConditionEvent import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses import graphql.execution.DataFetcherResult import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper import graphql.kickstart.tools.resolver.ArgumentConverter +import graphql.kickstart.tools.resolver.ResolverDataFetcher import graphql.kickstart.tools.resolver.ResolverPlan import graphql.kickstart.tools.resolver.TypeShape import graphql.schema.DataFetcher import org.apache.commons.lang3.reflect.FieldUtils +import org.apache.commons.lang3.reflect.MethodUtils import org.junit.Test +import tools.jackson.core.JsonParser import tools.jackson.databind.ObjectMapper import tools.jackson.databind.ObjectReader import tools.jackson.databind.ObjectWriter import tools.jackson.databind.util.TokenBuffer +import java.lang.invoke.MethodHandle +import java.lang.invoke.MethodHandles import java.lang.reflect.AccessibleObject import java.lang.reflect.Executable import java.lang.reflect.Field @@ -35,41 +37,77 @@ class ResolverOwnershipTest { .importPath(Paths.get(ResolverPlan::class.java.protectionDomain.codeSource.location.toURI())) private val resolverPackage = ResolverPlan::class.java.packageName - private const val MEMBER = "graphql.kickstart.tools.resolver.Member" - } + private val MEMBER = "$resolverPackage.Member" - private fun declaredIn(fileName: String) = object : DescribedPredicate("are declared in $resolverPackage's $fileName") { - override fun test(javaClass: JavaClass) = - javaClass.packageName == resolverPackage && javaClass.source.flatMap { it.fileName }.orElse(null) == fileName + private val resolverPlanFile = OwningFile( + "ResolverPlan.kt", "ResolverPlan", "ResolverPlanKt", "ResolverKind", "ExtraParameter", "FieldResolverError", "Member", "MethodMember", + "PropertyMember", "MapMember", "ResolverDataFetcher", "MethodFieldResolverDataFetcher", "LightMethodFieldResolverDataFetcher", + "PropertyFieldResolverDataFetcher", "MapFieldResolverDataFetcher" + ) + private val typeShapeFile = OwningFile( + "TypeShape.kt", "TypeShape", "TypeShapeKt", "Position", "Walk", "GenericWrappers", "CompareGenericWrappers", "Layer", "ContainerKind", "Step", + "Await", "Peel", "EachElement", "DataOf", "ValueOf", "Awaitable" + ) + private val argumentConverterFile = OwningFile("ArgumentConverter.kt", "ArgumentConverter", "ArgumentConverterKt") + private val owningFiles = listOf(resolverPlanFile, typeShapeFile, argumentConverterFile) } - private fun DescribedPredicate.orOwnerOf(vararg allowed: Class<*>): DescribedPredicate { - val names = allowed.map { it.name } - return object : DescribedPredicate("${this@orOwnerOf.description} or are ${names.joinToString()}") { - override fun test(javaClass: JavaClass) = this@orOwnerOf.test(javaClass) || javaClass.name.substringBefore('$') in names - } + // A nested, anonymous or lambda class belongs to the class that encloses it. Neither the file name a class was compiled from + // nor a '$' in its name makes it one of these, since any file can declare either + private class OwningFile(val fileName: String, vararg topLevelClasses: String) : + DescribedPredicate("are declared in $fileName") { + val names = topLevelClasses.map { "${ResolverPlan::class.java.packageName}.$it" }.toSet() + + override fun test(javaClass: JavaClass) = generateSequence(javaClass) { it.enclosingClass.orElse(null) }.last().name in names } + private fun not(predicate: DescribedPredicate) = DescribedPredicate.not(predicate) + + private fun DescribedPredicate.or(other: DescribedPredicate) = DescribedPredicate.or(this, other) + private class Calls(description: String, private val targets: Map>) : DescribedPredicate>(description) { override fun test(access: JavaAccess<*>) = targets.any { (owner, names) -> access.target.owner.isAssignableTo(owner) && access.target.name in names } } private val memberReflection = Calls( - "reads, invokes or opens a Java member by reflection", + "reads, invokes or opens a Java or Kotlin member by reflection", mapOf( Method::class.java.name to setOf("invoke"), - Field::class.java.name to setOf("get", "getGenericType"), + Field::class.java.name to setOf( + "get", "getBoolean", "getByte", "getChar", "getShort", "getInt", "getLong", "getFloat", "getDouble", "getGenericType", + "set", "setBoolean", "setByte", "setChar", "setShort", "setInt", "setLong", "setFloat", "setDouble" + ), Executable::class.java.name to setOf("getGenericParameterTypes", "getGenericReturnType", "getParameterTypes", "getParameterCount"), AccessibleObject::class.java.name to setOf("setAccessible", "trySetAccessible"), - "kotlin.reflect.jvm.ReflectJvmMapping" to setOf("getKotlinFunction"), - FieldUtils::class.java.name to setOf("getAllFields", "getAllFieldsList"), + MethodHandles::class.java.name to setOf("privateLookupIn"), + MethodHandles.Lookup::class.java.name to setOf( + "unreflect", "unreflectGetter", "unreflectSetter", "unreflectSpecial", "unreflectVarHandle", "findVirtual", "findStatic", "findSpecial", + "findGetter", "findSetter", "findStaticGetter", "findStaticSetter", "findVarHandle", "findStaticVarHandle" + ), + MethodHandle::class.java.name to setOf("invoke", "invokeExact", "invokeWithArguments"), + "kotlin.reflect.KCallable" to setOf("call", "callBy", "getReturnType"), + "kotlin.reflect.KProperty" to setOf("get", "set", "invoke", "getDelegate"), + "kotlin.reflect.jvm.ReflectJvmMapping" to setOf( + "getKotlinFunction", "getKotlinProperty", "getJavaType", "getJavaMethod", "getJavaField", "getJavaGetter", "getJavaSetter" + ), + FieldUtils::class.java.name to setOf( + "getAllFields", "getAllFieldsList", "getField", "getDeclaredField", "readField", "readDeclaredField", "readStaticField", + "readDeclaredStaticField", "writeField", "writeDeclaredField", "writeStaticField", "writeDeclaredStaticField" + ), + MethodUtils::class.java.name to setOf("invokeMethod", "invokeExactMethod", "invokeStaticMethod", "invokeExactStaticMethod"), ) ) - private val guessesInputFieldTypes = object : DescribedPredicate>("is in ScanDictionary.findInputValueTypeInType") { + // an input object's field types come from its class's getters and fields, which ScanDictionary finds before any ResolverPlan exists + private val readsInputFieldTypes = object : DescribedPredicate>("is ScanDictionary.findInputValueTypeInType reading a member's type") { + private val reads = Calls( + "reads a member's declared type", + mapOf(Executable::class.java.name to setOf("getGenericReturnType", "getParameterCount"), Field::class.java.name to setOf("getGenericType")) + ) + override fun test(access: JavaAccess<*>) = - access.origin.owner.isEquivalentTo(ScanDictionary::class.java) && access.origin.name.startsWith("findInputValueTypeInType") + access.origin.owner.isEquivalentTo(ScanDictionary::class.java) && access.origin.name == "findInputValueTypeInType" && reads.test(access) } private val tokenBufferConversion = Calls( @@ -77,8 +115,9 @@ class ResolverOwnershipTest { mapOf( TokenBuffer::class.java.name to setOf("", "forInputParsing", "forGeneration", "asParser"), ObjectWriter::class.java.name to setOf("writeValueIntoBuffer"), - ObjectMapper::class.java.name to setOf("readValue", "convertValue", "treeToValue", "valueToTree"), + ObjectMapper::class.java.name to setOf("readValue", "convertValue", "updateValue", "treeToValue", "valueToTree"), ObjectReader::class.java.name to setOf("readValue", "readValues", "treeToValue"), + JsonParser::class.java.name to setOf("readValueAs", "readValueAsTree"), ) ) @@ -92,55 +131,56 @@ class ResolverOwnershipTest { mapOf(GenericWrapper::class.java.name to setOf("getType", "getIndex", "getSchemaWrapper", "getTransformer", "getTransformerReturnsCompletionStage")) ) - private val buildsAnUnwrapper = object : DescribedPredicate>("builds a TypeShape.Unwrapper") { - override fun test(access: JavaAccess<*>) = - access.target.owner.isEquivalentTo(TypeShape.Unwrapper::class.java) && access.target.name == "" - } - - private val holdsAnUnwrapper =object : ArchCondition("hold a TypeShape.Unwrapper") { - override fun check(javaClass: JavaClass, events: ConditionEvents) { - if (javaClass.allFields.none { it.rawType.isEquivalentTo(TypeShape.Unwrapper::class.java) }) { - events.add(SimpleConditionEvent.violated(javaClass, "${javaClass.name} implements DataFetcher without a TypeShape.Unwrapper field")) - } - } - } + private val buildsAnUnwrapper = Calls("builds a TypeShape.Unwrapper", mapOf(TypeShape.Unwrapper::class.java.name to setOf(""))) @Test - fun `imports the compiled resolver classes`() { - assert(classes.contain(MEMBER)) { "expected $MEMBER, the member variants' base class in ResolverPlan.kt, among ${classes.size} classes" } - assert(classes.any { declaredIn("ResolverPlan.kt").test(it) }) { "no class compiled from ResolverPlan.kt was imported" } + fun `each owning file lists exactly the top-level classes it declares`() { + val notCompiled = owningFiles.flatMap { file -> file.names.filter { !classes.contain(it) } } + assert(notCompiled.isEmpty()) { "ResolverOwnershipTest lists classes that weren't compiled: $notCompiled. Remove or rename them in its OwningFile lists" } + + val unlisted = owningFiles.flatMap { file -> + classes.filter { it.packageName == resolverPackage && !it.enclosingClass.isPresent && it.source.flatMap { source -> source.fileName }.orElse(null) == file.fileName } + .map { it.name } + .filter { it !in file.names } + } + assert(unlisted.isEmpty()) { + "These classes were compiled from a file named like an owning file but aren't in its OwningFile list in ResolverOwnershipTest: $unlisted. " + + "Add a class declared in that file to its list. Rename any other file, since only one file in $resolverPackage owns each name" + } + assert(classes.contain(MEMBER)) { "expected $MEMBER, the member variants' base class in ResolverPlan.kt" } } @Test fun `only the resolver plan reflects on resolver members`() { - noClasses().that(DescribedPredicate.not(declaredIn("ResolverPlan.kt"))) - .should().accessTargetWhere(DescribedPredicate.and(memberReflection, DescribedPredicate.not(guessesInputFieldTypes))) + noClasses().that(not(resolverPlanFile)) + .should().accessTargetWhere(DescribedPredicate.and(memberReflection, DescribedPredicate.not(readsInputFieldTypes))) .because("ResolverPlan.kt reads each field's member once, at schema build, and is the only place that invokes it. " + "Read what you need from the ResolverPlan, such as its argument targets or type shapes, or add it there") .check(classes) } @Test - fun `member variants expose raw invocation, never a data fetcher`() { + fun `member variants never build a data fetcher`() { noClasses().that().areAssignableTo(MEMBER) .should().dependOnClassesThat().areAssignableTo(DataFetcher::class.java) .orShould().dependOnClassesThat().areAssignableTo(TypeShape.Unwrapper::class.java) - .because("ResolverPlan builds every data fetcher around a member's read and unwraps its value with TypeShape.Unwrapper, " + - "so a member that builds its own fetcher skips the unwrapping. Give the member a read and let ResolverPlan.dataFetcher wrap it") + .because("ResolverPlan builds every data fetcher for a member and unwraps its value with TypeShape.Unwrapper, " + + "so a member that builds its own fetcher skips the unwrapping. Give the member what its fetcher needs and let ResolverPlan.dataFetcher build it") .check(classes) } @Test - fun `every library data fetcher unwraps through TypeShape`() { + fun `every library data fetcher is a ResolverDataFetcher`() { classes().that().implement(DataFetcher::class.java) - .should(holdsAnUnwrapper) - .because("a resolver's value reaches graphql-java fully unwrapped only through TypeShape.Unwrapper. Add the member to ResolverPlan instead of a new fetcher") + .should().beAssignableTo(ResolverDataFetcher::class.java) + .because("ResolverDataFetcher's constructor takes the TypeShape.Unwrapper the scan matched, so a resolver's value reaches graphql-java " + + "fully unwrapped. Add the member to ResolverPlan and its fetcher as a ResolverDataFetcher in ResolverPlan.kt instead of a new fetcher") .check(classes) } @Test fun `only the resolver plan builds an unwrapper`() { - noClasses().that(DescribedPredicate.not(declaredIn("ResolverPlan.kt").orOwnerOf(TypeShape::class.java))) + noClasses().that(not(resolverPlanFile.or(typeShapeFile))) .should().accessTargetWhere(buildsAnUnwrapper) .because("ResolverPlan.dataFetcher builds one unwrapper per field from the type shape the scan matched") .check(classes) @@ -148,7 +188,7 @@ class ResolverOwnershipTest { @Test fun `only TypeShape dispatches on containers`() { - noClasses().that(DescribedPredicate.not(declaredIn("TypeShape.kt").orOwnerOf(GenericWrapper::class.java))) + noClasses().that(not(typeShapeFile)) .should().accessTargetWhere(genericWrapperDispatch) .orShould().dependOnClassesThat().areAssignableTo(DataFetcherResult::class.java) .because("TypeShape.kt walks a declared type once and unwraps values by the same layers, so a container handled anywhere else " + @@ -158,7 +198,7 @@ class ResolverOwnershipTest { @Test fun `only the argument converter converts through a TokenBuffer`() { - noClasses().that(DescribedPredicate.not(declaredIn("ArgumentConverter.kt"))) + noClasses().that(not(argumentConverterFile)) .should().accessTargetWhere(tokenBufferConversion) .orShould().dependOnClassesThat().areAssignableTo(TokenBuffer::class.java) .because("ArgumentConverter is the one entry point that turns a coerced argument into a parameter's type, with its fallbacks for scalars Jackson can't convert. Use the ResolverPlan's ArgumentConverter") @@ -167,7 +207,7 @@ class ResolverOwnershipTest { @Test fun `only the resolver plan converts arguments`() { - noClasses().that(DescribedPredicate.not(declaredIn("ResolverPlan.kt").orOwnerOf(ArgumentConverter::class.java))) + noClasses().that(not(resolverPlanFile.or(argumentConverterFile))) .should().accessTargetWhere(argumentConversion) .because("ResolverPlan builds one ArgumentConverter per argument at schema build, next to the argument's Optional and scalar handling. Read the plan's argument targets instead") .check(classes) From 1b3519349dc281866f511aa8e03da6152a54af14 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 22:43:56 -0500 Subject: [PATCH 61/64] Trim the fix round's comments and check that each listed class comes from its owning file Comment pass and /simplify: drop comments the types and tests already say, rename the Map flag to unwrapsUntypedValues, move the ScanDictionary exemption's reason into its description so a failure prints it, use ArchUnit's own not, and, or and isTopLevelClass, and fail when an OwningFile lists a class compiled from another file. --- .../kickstart/tools/resolver/ResolverPlan.kt | 10 ++----- .../kickstart/tools/resolver/TypeShape.kt | 2 +- .../kickstart/tools/ResolverOwnershipTest.kt | 30 ++++++++++--------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt index 3d5ce430..7d59234c 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt @@ -361,14 +361,12 @@ internal class ResolverPlan private constructor( } } -internal enum class ResolverKind(val noun: String, val holdCompletionStage: String, val unwrapsObjectValues: Boolean = true) { +internal enum class ResolverKind(val noun: String, val holdCompletionStage: String, val unwrapsUntypedValues: Boolean = true) { METHOD("method", "Return a CompletionStage, such as a CompletableFuture, from the method or its generic wrapper transformer instead."), FIELD("field", "Assign a CompletionStage, such as a CompletableFuture, to the field, or return one from its generic wrapper transformer instead."), - - // an untyped Map declares no value type, so unwrapping its values would mean inspecting each one at runtime MAP_VALUE( "map value", "Put a CompletionStage, such as a CompletableFuture, in the map, or return one from its generic wrapper transformer instead.", - unwrapsObjectValues = false + unwrapsUntypedValues = false ) } @@ -543,7 +541,6 @@ private class MapMember(field: FieldDefinition, private val search: ResolverSear override fun toString() = "MapFieldResolver{key=$key}" } -// the only data fetchers a member gets, so every resolver value goes through the unwrapper the scan matched for its field internal sealed class ResolverDataFetcher(protected val source: SourceResolver, protected val unwrapper: TypeShape.Unwrapper) : DataFetcher internal class MethodFieldResolverDataFetcher( @@ -581,9 +578,6 @@ internal class MethodFieldResolverDataFetcher( fun getWrappedFetchingObject(environment: DataFetchingEnvironment): Any = source.resolve(environment, null) } -/** - * [MethodFieldResolverDataFetcher] for a method without parameters, which graphql-java calls without building an environment. - */ internal class LightMethodFieldResolverDataFetcher( source: SourceResolver, private val method: Method, diff --git a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt index de203674..57c4a239 100644 --- a/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt +++ b/src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt @@ -49,7 +49,7 @@ internal class TypeShape private constructor( fun error(msg: String) = matchError(graphQLType, reference, javaType, msg) class Unwrapper(shape: TypeShape, resolverKind: ResolverKind, resolverName: String, isSuspendFunction: Boolean = false) { - private val returnsValueAsIs = !resolverKind.unwrapsObjectValues && shape.declaredType == Any::class.java + private val returnsValueAsIs = !resolverKind.unwrapsUntypedValues && shape.declaredType == Any::class.java private val wrappers = shape.wrappers private val awaitable: Awaitable private val isOutermostFuture: Boolean diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt index dd2b5e5d..cd731817 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt @@ -1,6 +1,8 @@ package graphql.kickstart.tools import com.tngtech.archunit.base.DescribedPredicate +import com.tngtech.archunit.base.DescribedPredicate.and +import com.tngtech.archunit.base.DescribedPredicate.not import com.tngtech.archunit.core.domain.JavaAccess import com.tngtech.archunit.core.domain.JavaClass import com.tngtech.archunit.core.domain.JavaClasses @@ -52,19 +54,13 @@ class ResolverOwnershipTest { private val owningFiles = listOf(resolverPlanFile, typeShapeFile, argumentConverterFile) } - // A nested, anonymous or lambda class belongs to the class that encloses it. Neither the file name a class was compiled from - // nor a '$' in its name makes it one of these, since any file can declare either private class OwningFile(val fileName: String, vararg topLevelClasses: String) : DescribedPredicate("are declared in $fileName") { val names = topLevelClasses.map { "${ResolverPlan::class.java.packageName}.$it" }.toSet() - override fun test(javaClass: JavaClass) = generateSequence(javaClass) { it.enclosingClass.orElse(null) }.last().name in names + override fun test(javaClass: JavaClass) = javaClass.topLevelClass().name in names } - private fun not(predicate: DescribedPredicate) = DescribedPredicate.not(predicate) - - private fun DescribedPredicate.or(other: DescribedPredicate) = DescribedPredicate.or(this, other) - private class Calls(description: String, private val targets: Map>) : DescribedPredicate>(description) { override fun test(access: JavaAccess<*>) = targets.any { (owner, names) -> access.target.owner.isAssignableTo(owner) && access.target.name in names } @@ -99,8 +95,9 @@ class ResolverOwnershipTest { ) ) - // an input object's field types come from its class's getters and fields, which ScanDictionary finds before any ResolverPlan exists - private val readsInputFieldTypes = object : DescribedPredicate>("is ScanDictionary.findInputValueTypeInType reading a member's type") { + private val readsInputFieldTypes = object : DescribedPredicate>( + "is ScanDictionary.findInputValueTypeInType reading an input object's getter or field type, which it needs before any ResolverPlan exists" + ) { private val reads = Calls( "reads a member's declared type", mapOf(Executable::class.java.name to setOf("getGenericReturnType", "getParameterCount"), Field::class.java.name to setOf("getGenericType")) @@ -135,11 +132,13 @@ class ResolverOwnershipTest { @Test fun `each owning file lists exactly the top-level classes it declares`() { - val notCompiled = owningFiles.flatMap { file -> file.names.filter { !classes.contain(it) } } - assert(notCompiled.isEmpty()) { "ResolverOwnershipTest lists classes that weren't compiled: $notCompiled. Remove or rename them in its OwningFile lists" } + val misplaced = owningFiles.flatMap { file -> file.names.filter { !classes.contain(it) || classes.get(it).sourceFileName() != file.fileName } } + assert(misplaced.isEmpty()) { + "ResolverOwnershipTest lists classes that weren't compiled from their OwningFile: $misplaced. Move, remove or rename them in its OwningFile lists" + } val unlisted = owningFiles.flatMap { file -> - classes.filter { it.packageName == resolverPackage && !it.enclosingClass.isPresent && it.source.flatMap { source -> source.fileName }.orElse(null) == file.fileName } + classes.filter { it.packageName == resolverPackage && it.isTopLevelClass && it.sourceFileName() == file.fileName } .map { it.name } .filter { it !in file.names } } @@ -147,13 +146,12 @@ class ResolverOwnershipTest { "These classes were compiled from a file named like an owning file but aren't in its OwningFile list in ResolverOwnershipTest: $unlisted. " + "Add a class declared in that file to its list. Rename any other file, since only one file in $resolverPackage owns each name" } - assert(classes.contain(MEMBER)) { "expected $MEMBER, the member variants' base class in ResolverPlan.kt" } } @Test fun `only the resolver plan reflects on resolver members`() { noClasses().that(not(resolverPlanFile)) - .should().accessTargetWhere(DescribedPredicate.and(memberReflection, DescribedPredicate.not(readsInputFieldTypes))) + .should().accessTargetWhere(and(memberReflection, not(readsInputFieldTypes))) .because("ResolverPlan.kt reads each field's member once, at schema build, and is the only place that invokes it. " + "Read what you need from the ResolverPlan, such as its argument targets or type shapes, or add it there") .check(classes) @@ -213,3 +211,7 @@ class ResolverOwnershipTest { .check(classes) } } + +private fun JavaClass.topLevelClass(): JavaClass = generateSequence(this) { it.enclosingClass.orElse(null) }.last() + +private fun JavaClass.sourceFileName(): String? = source.flatMap { it.fileName }.orElse(null) From 0f2352571f4cedb4d392d418ae0073a57e9e0918 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 22:43:58 -0500 Subject: [PATCH 62/64] Describe the restored data fetchers in the rule table and the bounded check skill --- .../verify-return-value-unwrapping/SKILL.md | 24 ++++++++++--------- AGENTS.md | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.claude/skills/verify-return-value-unwrapping/SKILL.md b/.claude/skills/verify-return-value-unwrapping/SKILL.md index 0a35bd1c..73bbd90e 100644 --- a/.claude/skills/verify-return-value-unwrapping/SKILL.md +++ b/.claude/skills/verify-return-value-unwrapping/SKILL.md @@ -38,11 +38,13 @@ and an all-non-null GraphQL type. Each return type runs as three kinds of resolver, each compiled as a Java class at runtime: -| Kind | Generated resolver | Member in `ResolverPlan.kt` | +| Kind | Generated resolver | Member and data fetcher in `ResolverPlan.kt` | |---|---|---| -| `method` | `public field()` on the query resolver | `MethodMember` | -| `property` | `public field;` on the query resolver, which is also what a Kotlin `@JvmField` compiles to | `PropertyMember` | -| `map` | `extends HashMap>`, bound to `type Holder` and returned by `Query.holder` | `MapMember` | +| `method` | `public field()` on the query resolver | `MethodMember`, `LightMethodFieldResolverDataFetcher` | +| `property` | `public field;` on the query resolver, which is also what a Kotlin `@JvmField` compiles to | `PropertyMember`, `PropertyFieldResolverDataFetcher` | +| `map` | `extends HashMap>`, bound to `type Holder` and returned by `Query.holder` | `MapMember`, `MapFieldResolverDataFetcher` | + +Each kind's `resolverKind` is the noun of a `ResolverKind`, and a `ResolverKind` without a kind here ends in `MODEL ERROR`. The check builds each schema through the public `SchemaParser` API, which rejects about a fifth of the combinations, such as `Optional` below the top level. For every accepted one it executes the query once for each value that makes at most @@ -73,7 +75,7 @@ as `-Dunwrapping.args`, and prints the report. On a failure it also prints the p |---|---| | 0 | `PASS`, or `PASS apart from the known findings above` | | 1 | `FAIL`: a return type that isn't a known finding breaks the property. `NEW`: a known finding matches more accepted return types than its line records | -| 2 | `MODEL ERROR`: the checkout or the check didn't compile, the build rejected a return type the check must exercise, or a `ContainerKind` in `TypeShape.kt` has no `Container` in `Check.java`, so a pass would prove nothing | +| 2 | `MODEL ERROR`: the checkout or the check didn't compile, the build rejected a return type the check must exercise, a `ContainerKind` in `TypeShape.kt` has no `Container` in `Check.java`, or a `ResolverKind` in `ResolverPlan.kt` has no `Kind`, so a pass would prove nothing | | 3 | `STALE`: a known finding matches a return type that no longer fails, or fewer accepted return types than its line records. Or the run's coverage differs from `pinnedCoverage` in `Check.java` | Options: `--depth N`, `--budget N`, `--property-budget N`, `--show N` (counterexamples and stale return types printed, default 15), and `--rejected`, which lists @@ -154,8 +156,8 @@ or delete it when none fail, so that a regression shows up as `FAIL`. ## What this does not cover - Suspend functions, subscriptions and `Publisher`, arrays, and Kotlin-declared resolver methods. The generated resolvers - are Java methods without parameters, so only `LightFetcher` in `ResolverPlan.kt` runs, not - `Fetcher`. + are Java methods without parameters, so only `LightMethodFieldResolverDataFetcher` in `ResolverPlan.kt` runs, not + `MethodFieldResolverDataFetcher`. - Wrappers picked by a subclass of the value (`Box` and `SpecialBox` in `NestedGenericWrapperTest`), wrappers with a type argument index other than 0, custom `schemaWrapper`s other than the list one, transformers that return a `FutureTask`, and DataLoader futures. @@ -169,22 +171,22 @@ or delete it when none fail, so that a regression shows up as `FAIL`. ## Coverage and sync -Last confirmed to describe the code at commit `948c1ca6` (2026-11-06). It covers: +Last confirmed to describe the code at commit `1b351934` (2026-11-05). It covers: | File | What | |---|---| | `src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt` | the walk, `ContainerKind`, `GenericWrappers`, `resolveTypeVariables`, the `Unwrapper` and its steps | -| `src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt` | `dataFetcher` (the `TypeShape.Unwrapper` per kind), `returnShape`, the members' `declaredValueType` and `read`, `Fetcher` and `LightFetcher` | +| `src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt` | `dataFetcher` (the `TypeShape.Unwrapper` per member), `returnShape`, `ResolverKind`, the members' `declaredValueType`, and the `ResolverDataFetcher` subclasses | | `src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt` | `GenericWrapper` and the default wrappers in `build()` | To see whether a change needs another look: ```bash -git log --oneline 948c1ca6..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt +git log --oneline 1b351934..HEAD -- src/main/kotlin/graphql/kickstart/tools/resolver/TypeShape.kt src/main/kotlin/graphql/kickstart/tools/resolver/ResolverPlan.kt src/main/kotlin/graphql/kickstart/tools/SchemaParserOptions.kt ``` Move the sync commit forward only after you've read those changes and confirmed that the containers, variants and expected values in `Check.java` still describe them. For example, a new default wrapper or a new kind of unwrapping step needs a new `Container` with its variants and its plain value in `build`. A new `ContainerKind` ends in -`MODEL ERROR` until it has one. After an intended change, rerun the check, +`MODEL ERROR` until it has one, and so does a new `ResolverKind` until `Check.java` has a `Kind` with its noun. After an intended change, rerun the check, and break the new code on purpose once in a scratch worktree to see the check fail before you trust its pass. diff --git a/AGENTS.md b/AGENTS.md index cd466de8..7d5d9d44 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -94,13 +94,13 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| | The value of a resolver method, a field with no matching getter or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | -| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt` and expose a raw read, never a data fetcher. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, and the fixture tests in `ResolverCompatibilityTest` don't compile until they build a sample of each. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (apart from the input-field getters in `ScanDictionary.findInputValueTypeInType`), on a member that depends on a data fetcher, on a data fetcher without a `TypeShape.Unwrapper`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt` | +| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt`, each decides its `ResolverKind`, and none builds a data fetcher. `ResolverPlan.dataFetcher` gives every member a `ResolverDataFetcher`, a sealed class whose constructor takes the `TypeShape.Unwrapper`, so a lambda or a fetcher without one doesn't compile. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, the fixture tests in `ResolverCompatibilityTest` fail, naming the fixture to add, until they build a sample of each and see its value unwrapped, and `ReturnValueUnwrappingTest` ends in `MODEL ERROR` until the bounded check runs the new kind. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (`java.lang.reflect` reads and calls, `MethodHandles`, kotlin-reflect calls and types, and commons-lang3's field and method utilities, apart from the type reads in `ScanDictionary.findInputValueTypeInType`), on a member that depends on a data fetcher, on a library data fetcher that isn't a `ResolverDataFetcher`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt`. Its exemptions name the exact classes each owning file declares. `Future`, `CompletionStage` and `Optional` checks outside `TypeShape.kt`, `Class.forName` and graphql-java's `PropertyDataFetcher` get past it, and the behavior tests catch the value they leave wrapped | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so a value that differs on a return type they run fails the build. The bounded check also pins how many return types it generates, and for each kind how many the build rejects and how many executions run, so a change that stops running some fails until the same diff updates `pinnedCoverage`. It doesn't judge whether a newly rejected return type should build | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it. `TypeExtensionTest` builds and queries a schema with an extension of every kind, so a build that leaves an extension's fields, interfaces, members, values, input fields or directives out of the built type fails it, however the code read them | | Every kind of SDL type starts its graphql-java type from the same recipe | `MergedType.prepare`, `DefinitionsBoundaryTest` and `TypeKindRecipeTest` | | Reuse an existing structure before you add a parallel one | docs only | -| Argument conversion goes through one entry point | `ArgumentConverter`, which `ResolverPlan` builds once per argument. `ResolverOwnershipTest` fails on a TokenBuffer or a Jackson `readValue`, `convertValue`, `treeToValue` or `valueToTree` outside `ArgumentConverter.kt`, and on an `ArgumentConverter` built or called outside `ResolverPlan.kt`. Jackson's per-call retry for scalars it can't convert stays inside `ArgumentConverter` | +| Argument conversion goes through one entry point | `ArgumentConverter`, which `ResolverPlan` builds once per argument. `ResolverOwnershipTest` fails on a TokenBuffer or a Jackson `readValue`, `readValueAs`, `convertValue`, `updateValue`, `treeToValue` or `valueToTree` outside `ArgumentConverter.kt`, and on an `ArgumentConverter` built or called outside `ResolverPlan.kt`. Jackson's per-call retry for scalars it can't convert stays inside `ArgumentConverter` | | An input field's Java type comes from the mapping Jackson uses, not from guessed getters | docs only | | Every recursive walk over the type graph handles cycles, and a test covers a cycle | docs only | | Public signatures stay binary compatible, data class `copy()` and `componentN` included | japicmp with `build/japicmp-kotlin-public.groovy` at `mvn verify`, which allows excludes and other narrowing options only at an X.0.0 version | From 7cd648525f5930130613cd0482d5f84d3393ad67 Mon Sep 17 00:00:00 2001 From: Oryan Date: Thu, 5 Nov 2026 23:11:23 -0500 Subject: [PATCH 63/64] Catch Kotlin reflection, signature reads and fetchers outside ResolverPlan.kt in the ownership test Any use of a KFunction or KProperty, kotlin-reflect's member lookups and JVM mappings, and the Field, Parameter and annotated type reads now fail outside ResolverPlan.kt. A ResolverDataFetcher subclass must be declared in ResolverPlan.kt, and the ScanDictionary exemption matches findInputValueTypeInType(String, Class) by signature, so an overload doesn't inherit it. AGENTS.md lists what the test still doesn't see. --- AGENTS.md | 2 +- .../kickstart/tools/ResolverOwnershipTest.kt | 37 +++++++++++++------ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7d5d9d44..2b41c5bf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -94,7 +94,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| | The value of a resolver method, a field with no matching getter or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | -| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt`, each decides its `ResolverKind`, and none builds a data fetcher. `ResolverPlan.dataFetcher` gives every member a `ResolverDataFetcher`, a sealed class whose constructor takes the `TypeShape.Unwrapper`, so a lambda or a fetcher without one doesn't compile. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, the fixture tests in `ResolverCompatibilityTest` fail, naming the fixture to add, until they build a sample of each and see its value unwrapped, and `ReturnValueUnwrappingTest` ends in `MODEL ERROR` until the bounded check runs the new kind. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (`java.lang.reflect` reads and calls, `MethodHandles`, kotlin-reflect calls and types, and commons-lang3's field and method utilities, apart from the type reads in `ScanDictionary.findInputValueTypeInType`), on a member that depends on a data fetcher, on a library data fetcher that isn't a `ResolverDataFetcher`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt`. Its exemptions name the exact classes each owning file declares. `Future`, `CompletionStage` and `Optional` checks outside `TypeShape.kt`, `Class.forName` and graphql-java's `PropertyDataFetcher` get past it, and the behavior tests catch the value they leave wrapped | +| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt`, each decides its `ResolverKind`, and none builds a data fetcher. `ResolverPlan.dataFetcher` gives every member a `ResolverDataFetcher`, a sealed class whose constructor takes the `TypeShape.Unwrapper`, so a lambda or a fetcher without one doesn't compile. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, the fixture tests in `ResolverCompatibilityTest` fail, naming the fixture to add, until they build a sample of each and see its value unwrapped, and `ReturnValueUnwrappingTest` ends in `MODEL ERROR` until the bounded check runs the new kind. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (`java.lang.reflect` calls and signature reads, `MethodHandles`, kotlin-reflect member lookups and any use of a `KFunction` or `KProperty`, and commons-lang3's field and method utilities, apart from the type reads in `ScanDictionary.findInputValueTypeInType(String, Class)`), on a member that depends on a data fetcher, on a library data fetcher that isn't a `ResolverDataFetcher` declared in `ResolverPlan.kt`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt`. Its exemptions name the exact classes each owning file declares. It doesn't see `Future`, `CompletionStage` or `Optional` checks outside `TypeShape.kt`, `Class.forName` lookups, `Method.getReturnType`, reflection a library does for you (graphql-java's `PropertyDataFetcher`, `java.beans.Expression`), a new helper in an owning file that reflects for another file, or a `DataFetcher { }` lambda outside `ResolverPlan.kt`. The fixture tests and the bounded check catch a value these leave wrapped only in the fetchers `ResolverPlan` builds | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so a value that differs on a return type they run fails the build. The bounded check also pins how many return types it generates, and for each kind how many the build rejects and how many executions run, so a change that stops running some fails until the same diff updates `pinnedCoverage`. It doesn't judge whether a newly rejected return type should build | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it. `TypeExtensionTest` builds and queries a schema with an extension of every kind, so a build that leaves an extension's fields, interfaces, members, values, input fields or directives out of the built type fails it, however the code read them | diff --git a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt index cd731817..7343a92d 100644 --- a/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt +++ b/src/test/kotlin/graphql/kickstart/tools/ResolverOwnershipTest.kt @@ -5,8 +5,12 @@ import com.tngtech.archunit.base.DescribedPredicate.and import com.tngtech.archunit.base.DescribedPredicate.not import com.tngtech.archunit.core.domain.JavaAccess import com.tngtech.archunit.core.domain.JavaClass +import com.tngtech.archunit.core.domain.JavaClass.Predicates.assignableTo +import com.tngtech.archunit.core.domain.JavaClass.Predicates.resideInAPackage +import com.tngtech.archunit.core.domain.JavaClass.Predicates.resideInAnyPackage import com.tngtech.archunit.core.domain.JavaClasses import com.tngtech.archunit.core.importer.ClassFileImporter +import com.tngtech.archunit.lang.conditions.ArchConditions.be import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses import graphql.execution.DataFetcherResult @@ -30,6 +34,7 @@ import java.lang.reflect.AccessibleObject import java.lang.reflect.Executable import java.lang.reflect.Field import java.lang.reflect.Method +import java.lang.reflect.Parameter import java.nio.file.Paths class ResolverOwnershipTest { @@ -63,18 +68,27 @@ class ResolverOwnershipTest { private class Calls(description: String, private val targets: Map>) : DescribedPredicate>(description) { override fun test(access: JavaAccess<*>) = - targets.any { (owner, names) -> access.target.owner.isAssignableTo(owner) && access.target.name in names } + targets.any { (owner, names) -> access.target.name in names && access.target.owner.isAssignableTo(owner) } } + // KCallable only from kotlin.reflect itself, since Kotlin compiles a callable reference such as Type::name into a class implementing it + private val kotlinReflection = resideInAnyPackage("kotlin.reflect.full", "kotlin.reflect.jvm") + .or(resideInAPackage("kotlin.reflect").and(assignableTo("kotlin.reflect.KCallable"))) + .`as`("are kotlin-reflect's member lookups and JVM mappings, or a KFunction, a KProperty or their getters and setters") + private val memberReflection = Calls( "reads, invokes or opens a Java or Kotlin member by reflection", mapOf( Method::class.java.name to setOf("invoke"), Field::class.java.name to setOf( - "get", "getBoolean", "getByte", "getChar", "getShort", "getInt", "getLong", "getFloat", "getDouble", "getGenericType", - "set", "setBoolean", "setByte", "setChar", "setShort", "setInt", "setLong", "setFloat", "setDouble" + "get", "getBoolean", "getByte", "getChar", "getShort", "getInt", "getLong", "getFloat", "getDouble", "getType", "getGenericType", + "getAnnotatedType", "set", "setBoolean", "setByte", "setChar", "setShort", "setInt", "setLong", "setFloat", "setDouble" + ), + Executable::class.java.name to setOf( + "getGenericParameterTypes", "getGenericReturnType", "getParameterTypes", "getParameterCount", "getAnnotatedReturnType", + "getAnnotatedParameterTypes" ), - Executable::class.java.name to setOf("getGenericParameterTypes", "getGenericReturnType", "getParameterTypes", "getParameterCount"), + Parameter::class.java.name to setOf("getType", "getParameterizedType", "getAnnotatedType"), AccessibleObject::class.java.name to setOf("setAccessible", "trySetAccessible"), MethodHandles::class.java.name to setOf("privateLookupIn"), MethodHandles.Lookup::class.java.name to setOf( @@ -82,11 +96,7 @@ class ResolverOwnershipTest { "findGetter", "findSetter", "findStaticGetter", "findStaticSetter", "findVarHandle", "findStaticVarHandle" ), MethodHandle::class.java.name to setOf("invoke", "invokeExact", "invokeWithArguments"), - "kotlin.reflect.KCallable" to setOf("call", "callBy", "getReturnType"), - "kotlin.reflect.KProperty" to setOf("get", "set", "invoke", "getDelegate"), - "kotlin.reflect.jvm.ReflectJvmMapping" to setOf( - "getKotlinFunction", "getKotlinProperty", "getJavaType", "getJavaMethod", "getJavaField", "getJavaGetter", "getJavaSetter" - ), + "kotlin.reflect.KClass" to setOf("getMembers", "getConstructors"), FieldUtils::class.java.name to setOf( "getAllFields", "getAllFieldsList", "getField", "getDeclaredField", "readField", "readDeclaredField", "readStaticField", "readDeclaredStaticField", "writeField", "writeDeclaredField", "writeStaticField", "writeDeclaredStaticField" @@ -103,8 +113,9 @@ class ResolverOwnershipTest { mapOf(Executable::class.java.name to setOf("getGenericReturnType", "getParameterCount"), Field::class.java.name to setOf("getGenericType")) ) - override fun test(access: JavaAccess<*>) = - access.origin.owner.isEquivalentTo(ScanDictionary::class.java) && access.origin.name == "findInputValueTypeInType" && reads.test(access) + private val exempt = "${ScanDictionary::class.java.name}.findInputValueTypeInType(${String::class.java.name}, ${Class::class.java.name})" + + override fun test(access: JavaAccess<*>) = access.origin.fullName == exempt && reads.test(access) } private val tokenBufferConversion = Calls( @@ -152,6 +163,7 @@ class ResolverOwnershipTest { fun `only the resolver plan reflects on resolver members`() { noClasses().that(not(resolverPlanFile)) .should().accessTargetWhere(and(memberReflection, not(readsInputFieldTypes))) + .orShould().dependOnClassesThat(kotlinReflection) .because("ResolverPlan.kt reads each field's member once, at schema build, and is the only place that invokes it. " + "Read what you need from the ResolverPlan, such as its argument targets or type shapes, or add it there") .check(classes) @@ -168,9 +180,10 @@ class ResolverOwnershipTest { } @Test - fun `every library data fetcher is a ResolverDataFetcher`() { + fun `every library data fetcher is a ResolverDataFetcher in ResolverPlan kt`() { classes().that().implement(DataFetcher::class.java) .should().beAssignableTo(ResolverDataFetcher::class.java) + .andShould(be(resolverPlanFile.`as`("declared in ${resolverPlanFile.fileName}"))) .because("ResolverDataFetcher's constructor takes the TypeShape.Unwrapper the scan matched, so a resolver's value reaches graphql-java " + "fully unwrapped. Add the member to ResolverPlan and its fetcher as a ResolverDataFetcher in ResolverPlan.kt instead of a new fetcher") .check(classes) From e73845147640669f2af45a093b6fbb32a93143a9 Mon Sep 17 00:00:00 2001 From: Oryan Date: Fri, 6 Nov 2026 00:43:08 -0500 Subject: [PATCH 64/64] Say which KFunction uses the ownership test catches --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 2b41c5bf..f9b640e8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -94,7 +94,7 @@ happening. "docs only" means nothing does yet, so the rule depends on you readin | Rule | Enforced by | |---|---| | The value of a resolver method, a field with no matching getter or a typed Map is unwrapped by one rule that the schema build and the data fetcher share | `TypeShape`, whose one walk yields both the class the schema build matches and the layers that `TypeShape.Unwrapper` unwraps in the method, field and Map data fetchers. An untyped Map's values reach graphql-java as they are. A container kind can't be added without its placement rule and its value step, since both are abstract on the enum, and `ReturnValueUnwrappingTest` fails until the bounded check builds values for it | -| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt`, each decides its `ResolverKind`, and none builds a data fetcher. `ResolverPlan.dataFetcher` gives every member a `ResolverDataFetcher`, a sealed class whose constructor takes the `TypeShape.Unwrapper`, so a lambda or a fetcher without one doesn't compile. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, the fixture tests in `ResolverCompatibilityTest` fail, naming the fixture to add, until they build a sample of each and see its value unwrapped, and `ReturnValueUnwrappingTest` ends in `MODEL ERROR` until the bounded check runs the new kind. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (`java.lang.reflect` calls and signature reads, `MethodHandles`, kotlin-reflect member lookups and any use of a `KFunction` or `KProperty`, and commons-lang3's field and method utilities, apart from the type reads in `ScanDictionary.findInputValueTypeInType(String, Class)`), on a member that depends on a data fetcher, on a library data fetcher that isn't a `ResolverDataFetcher` declared in `ResolverPlan.kt`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt`. Its exemptions name the exact classes each owning file declares. It doesn't see `Future`, `CompletionStage` or `Optional` checks outside `TypeShape.kt`, `Class.forName` lookups, `Method.getReturnType`, reflection a library does for you (graphql-java's `PropertyDataFetcher`, `java.beans.Expression`), a new helper in an owning file that reflects for another file, or a `DataFetcher { }` lambda outside `ResolverPlan.kt`. The fixture tests and the bounded check catch a value these leave wrapped only in the fetchers `ResolverPlan` builds | +| A resolver method's parameter layout, type variables and source are decided once, at schema build | `ResolverPlan`, which reads the field's member once and hands the scan its type shapes, the data fetcher its parameters and `UnmappedInputFieldChecker` its argument targets. Its member variants are private to `ResolverPlan.kt`, each decides its `ResolverKind`, and none builds a data fetcher. `ResolverPlan.dataFetcher` gives every member a `ResolverDataFetcher`, a sealed class whose constructor takes the `TypeShape.Unwrapper`, so a lambda or a fetcher without one doesn't compile. A new `ResolverKind` doesn't compile until the lookup's `when` handles it, a new `ExtraParameter` doesn't compile without its binder, the fixture tests in `ResolverCompatibilityTest` fail, naming the fixture to add, until they build a sample of each and see its value unwrapped, and `ReturnValueUnwrappingTest` ends in `MODEL ERROR` until the bounded check runs the new kind. `ResolverOwnershipTest` fails on member reflection outside `ResolverPlan.kt` (`java.lang.reflect` calls and signature reads, `MethodHandles`, `kotlin.reflect.full` and `kotlin.reflect.jvm` calls, `KClass` member lookups, a value typed as a `KFunction` or `KProperty`, and commons-lang3's field and method utilities, apart from the type reads in `ScanDictionary.findInputValueTypeInType(String, Class)`), on a member that depends on a data fetcher, on a library data fetcher that isn't a `ResolverDataFetcher` declared in `ResolverPlan.kt`, and on generic-wrapper or `DataFetcherResult` handling outside `TypeShape.kt`. Its exemptions name the exact classes each owning file declares. It doesn't see `Future`, `CompletionStage` or `Optional` checks outside `TypeShape.kt`, `Class.forName` lookups, `Method.getReturnType`, a `KFunction` held as `Any` and called through a cast, reflection a library does for you (graphql-java's `PropertyDataFetcher`, `java.beans.Expression`), a new helper in an owning file that reflects for another file, or a `DataFetcher { }` lambda outside `ResolverPlan.kt`. The fixture tests and the bounded check catch a value these leave wrapped only in the fetchers `ResolverPlan` builds | | A change to how resolvers are found, bound or unwrapped keeps what a method, a property and a Map field return | `ResolverCompatibilityTest`, which compares field and Map values with a method's, and the bounded check in `ReturnValueUnwrappingTest`, which compares all three with the plain value. Neither has known findings, so a value that differs on a return type they run fails the build. The bounded check also pins how many return types it generates, and for each kind how many the build rejects and how many executions run, so a change that stops running some fails until the same diff updates `pinnedCoverage`. It doesn't judge whether a newly rejected return type should build | | One output has one builder. Don't add a second path that builds the same thing | docs only | | Read an SDL type's members merged with its extensions, never from the raw definition | `MergedType` in `MergedDefinitions.kt` and `DefinitionsBoundaryTest`, which fails on a raw member, directive or child-node read, an extension class, an SDL node walk or a `TypeDefinitionRegistry` call outside it. A read by reflection gets past it. `TypeExtensionTest` builds and queries a schema with an extension of every kind, so a build that leaves an extension's fields, interfaces, members, values, input fields or directives out of the built type fails it, however the code read them |