Skip to content
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

Update introspection type check with queryType and mutationType #2454

Merged
merged 3 commits into from Oct 20, 2018
Merged

Update introspection type check with queryType and mutationType #2454

merged 3 commits into from Oct 20, 2018

Conversation

yishus
Copy link
Contributor

@yishus yishus commented Oct 20, 2018

Checking for queryType and mutationType instead opens up the possibility for data providers to make use of GraphQL endpoints where the type name for query and mutation types are not 'Query' and 'Mutation'.

Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks!

@djhi djhi added this to the 2.4.1 milestone Oct 20, 2018
@djhi djhi merged commit 0261237 into marmelab:next Oct 20, 2018
@BatuAksoy
Copy link

type.name !== schema.mutationType.name

I have an introspection which has mutationType = null, is it valid according to GraphQL Spec?
If it is, promise fails with a TypeError, because it cannot find 'name' in null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants