-
Notifications
You must be signed in to change notification settings - Fork 31
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
Schema Validation problems in Schema Generated by getExecutableSchema #198
Comments
RuntimeGraph is supposed to hold the executable schema for you. The expectation is you will use this part of the schema to execute the request and not reparse it. Why are you trying to parse the schema again after the runtime graph is constructed? |
Sorry for the confusion , I just need to confirm, Question 1 :
Question 2 : |
runtimeGraph.getExecutableSchema() is the supergraph schema. you are printing it correctly, but that doesn't print the directive definition by default, Look at the options it takes it to print the complete schema https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/schema/idl/SchemaPrinter.java I am curious why do you want to parse it again and going back from executable schema to TypeDefintiionRegistry. The standard path in graphql-java is TypeDefintionRegistry and then executable schema. Here you already have an executable schema. You can create an instance of GraphQLOrchestrator and use the runtimegraph to execute queries on it directly |
Describe the bug
When I use orchestrator and merge two subgraphs with Apollo Federation Directives as given below ,
The stitched Schema when output through
produces the output
When this is parsed
There are multiple issues that arise as below ,
SchemaProblem{errors=['product' [@50:3] tried to use an undeclared directive 'resolver']}
SchemaProblem{errors=['include' type [@28:1] tried to redefine existing directive 'include' type [@1:1], 'skip' type [@30:1] tried to redefine existing directive 'skip' type [@6:1]]}
When I remove the duplicate entries for @include and @Skip and add the
directive @resolver(field: String!, arguments: [ResolverArgument!]) on FIELD_DEFINITION
the validation is successful
Can you please let me know how this can be fixed.
I further want to know if this stitched graph can be considered and treated as a supergraph similar to the one in APOLLO Federation.
The text was updated successfully, but these errors were encountered: