Kesalahan: Diharapkan tidak terdefinisi menjadi skema graphql.
/*
You're not passing in a schema to your configuration for the /graphql endpoint.
Property names are case-sensitive in javascript. Change this:
*/
app.use('/graphql',bodyParser.json(), graphqlExpress({
Schema,
context:{
Story,
User
}
}))
// to this:
app.use('/graphql',bodyParser.json(), graphqlExpress({
schema: Schema,
context:{
Story,
User
}
}))
// or make your variable lowercase and then do:
app.use('/graphql',bodyParser.json(), graphqlExpress({
schema,
context:{
Story,
User
}
}))
Sleepy Squirrel