You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I follow current instructions in the graphql-ruby - Queries chapter I see following error in the GraphiQL console:
Error: Mutation fields must be an object with field names as keys or a function which returns such an object.
at invariant (http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:24179:11)
at defineFieldMap (http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:27207:27)
at GraphQLObjectType.getFields (http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:27164:44)
at typeMapReducer (http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:28869:25)
at Array.reduce (<anonymous>)
at new GraphQLSchema (http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:28758:34)
at buildClientSchema (http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:30166:10)
at http://localhost:3000/assets/graphiql/rails/graphiql-0.10.2.self-b1f3838c6df9bb8fb4d30315dcdb431c4e3c5be8f8827635360232b8019d65bd.js?body=1:2140:55
at <anonymous>
This is due to rails generate graphql:install generating a schema that includes the mutation type, but at this point in the tutorial it is still empty.
We either need to make sure that we remove mutation(Types::MutationType) from this file before opening GraphiQL or adding a dummy mutation in this chapter.
I am not the best content writer, so I did not open a PR :P
The text was updated successfully, but these errors were encountered:
If I follow current instructions in the
graphql-ruby - Queries
chapter I see following error in the GraphiQL console:This is due to
rails generate graphql:install
generating a schema that includes the mutation type, but at this point in the tutorial it is still empty.We either need to make sure that we remove
mutation(Types::MutationType)
from this file before opening GraphiQL or adding a dummy mutation in this chapter.I am not the best content writer, so I did not open a PR :P
The text was updated successfully, but these errors were encountered: