-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix field visibility bug with enum with enum args #2926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix field visibility bug with enum with enum args #2926
Conversation
Fixes a bug that happened when the field visibility transformation was applied to a schema that has some type(s) reachable only via directive definitions.
| // Include directive definitions as roots, since they won't be removed in the filtering process. | ||
| // Some types (enums, input types, etc.) might be reachable only by directive definitions (and | ||
| // not by other types or fields). | ||
| .addAll(schema.getDirectives()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have schema.getAdditionalTypes here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this ends up removing types that are no linked (if I recall right) so perhap no
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the opposite would happen: types that became unreachable after fields were filtered out would still show up in the final schema, because essentially all types would be root types and thus reachable.
Fixes a bug that happened when the field visibility transformation was applied to a schema that has some type(s) reachable only via directive definitions.
…) (#2944) Fixes a bug that happened when the field visibility transformation was applied to a schema that has some type(s) reachable only via directive definitions.
* 19.3: (709 commits) use class loader in getResource (graphql-java#3038) Stable port of graphql-java#2940 (graphql-java#2947) Stable port of Diff counts are the same (graphql-java#2946) Stable port of Fix printing directives when they contain something like a formatting specifier (graphql-java#2919) (graphql-java#2920) (graphql-java#2945) Stable port of Fix field visibility bug with enum with enum args (graphql-java#2926) (graphql-java#2944) Stable fix for graphql-java#2943 (graphql-java#2943) Added test fore intersection Xuorig Fix PR - Edge case with GraphQLTypeReference and Schema Transforms (graphql-java#2906) Fix typo in description of skip directive (graphql-java#2915) Add smaller set first optimisation Cheaper calculation for narrowing down possible objects in ENO Handles isDeprecated not being present in the json Defaults Locale when calling validation (graphql-java#2908) DF SelectionSet Benchmark (graphql-java#2893) Test stability (graphql-java#2903) Donna's catch! (graphql-java#2900) Deprecate Apollo Cache Control READY - Stop DOS attacks by making the lexer stop early on evil input. (graphql-java#2892) Bump java-dataloader ahead of release State is passed explicitly to instrumentation and parameters are NOT mutated (graphql-java#2769) ... # Conflicts: # README.md # build.gradle # src/main/java/graphql/GraphQL.java # src/main/java/graphql/Scalars.java # src/main/java/graphql/execution/ValuesResolver.java # src/main/java/graphql/relay/SimpleListConnection.java # src/main/java/graphql/schema/DataFetchingEnvironmentImpl.java
Fixes a bug that happened when the field visibility transformation was applied to a schema that has some types reachable only via directive definitions.