forked from graph-gophers/graphql-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infer entry point types, and improve error messages
Consistent with [schema parsing behavior from graphql-js][1], this commit allows graphql-go to infer entry point types without an explicit `schema` declaration if there are types in the schema named "Query", "Mutation", or "Subscription". It also returns a more descriptive error message if no query type is declared, which fixes graph-gophers#125. Previously if no `schema` declaration was present a cryptic panic would be thrown at runtime. (`interface conversion: resolvable.Resolvable is nil, not *resolvable.Object`) [1]: https://github.com/graphql/graphql-js/blob/master@{2017-11-18}/src/utilities/buildASTSchema.js#L167-L221
- Loading branch information
Showing
4 changed files
with
145 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters