-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(Apollo): Format Schema For Apollo Gateway #7298
Conversation
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.
Reviewable status: 0 of 10 files reviewed, 7 unresolved discussions (waiting on @minhaj-shakeel)
graphql/admin/admin.go, line 390 at r1 (raw file):
func SchemaValidate(sch string) error { schHandler, err := schema.NewHandler(sch, true, false)
for Apollo also, this should be called once when schema updates and then be stored in memory
graphql/e2e/schema/apolloServiceResponse.graphql, line 5 at r1 (raw file):
####################### type Todo @key(fields: "id") {
Rename file to apollo_service_response.graphql
graphql/schema/gqlschema.go, line 898 at r1 (raw file):
// completeSchema generates all the required types and fields for // query/mutation/update for all the types mentioned in the schema. // In case of Apollo service Query, input types from mutations and mutations
from queries and mutations
graphql/schema/gqlschema.go, line 996 at r1 (raw file):
} if apolloServiceQuery && hasExtends(defn) {
this can be moved above the params definition
graphql/schema/gqlschema.go, line 2410 at r1 (raw file):
// var "apolloServiceQuery" is used to distinguish Schema String from what should be // returned as a result of apollo service query. In case of Apollo service query, Schema // misses some of the directive definitions which are currently not supported at the GateWay.
Schema removes some of the
gateway
graphql/schema/schemagen.go, line 80 at r1 (raw file):
// some directives which are not exposed to the Apollo Gateway // as they are failing in the schema validation which is a bug // in their library.
Add link to GitHub issue on the Apollo project
graphql/schema/schemagen.go, line 81 at r1 (raw file):
// as they are failing in the schema validation which is a bug // in their library. func (s *handler) GQLSchemaWithoutApolloExtras() string {
Add some unit tests for this also where given some input schemas and the output schema that we send to Apollo.
Fixes GRAPHQL-951.
This PR modifies GraphQL generated schema in order to support federation.
It also removes some directive definitions which currently give validation error in apollo.
This PR also removes generated mutations and mutation input types from the Generated schema.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)