-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error: Expected undefined to be a GraphQL schema. on version 16.0.1 #3359
Comments
Keeping it open since it would be a good idea to add temporary |
Also what are the arguments meant to be? I would have expected const {
graphql,
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
} = require( 'graphql');
var schema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'RootQueryType',
fields: {
hello: {
type: GraphQLString,
resolve() {
return 'world';
},
},
},
}),
});
var query = '{ hello }';
graphql({
schema,
query
}).then((result) => {
// Prints
// {
// data: { hello: "world" }
// }
console.log(result);
}); |
Seems it's expecting |
Still receiving this issue on the latest install. Are there more up to date docs? I was going to make a PR to update the README but it looked like there was a big overhaul/redo of the docs? Additionally the docs are out of date for graphql() as |
When will the documentation be updated :( |
For those real beginner like me.
|
node: 16.13.0
graphql-js: 16.0.1
I tried to run this example from official documentation :
and got this error:
No error with graphql-js version 15.7.2
The text was updated successfully, but these errors were encountered: