Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

error: expected undefined to be a graphql schema.

/*
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
  }
}))
Comment

PREVIOUS NEXT
Code Example
Javascript :: npm md5 
Javascript :: animate jquery 
Javascript :: javascript autoscroll 
Javascript :: js check if string is number 
Javascript :: all inputs under div 
Javascript :: how to change checkbox state in jquery 
Javascript :: node.js f string 
Javascript :: javascript remove last element from array 
Javascript :: javascript sleep settimeout 
Javascript :: golang http POST JSON content 
Javascript :: javascript get nth element of array 
Javascript :: Calling MVC controller from Javascript ajax 
Javascript :: __dirname is not defined 
Javascript :: javascript style multiple properties 
Javascript :: get placeholder innertext 
Javascript :: hwo to cehck req header in js 
Javascript :: how to make a textarea unwritable in react native 
Javascript :: node get absolute path 
Javascript :: copy text to clipboard javascript without input 
Javascript :: angular get file from assets 
Javascript :: export default arrow function 
Javascript :: redux dev tools 
Javascript :: Find all links / pages on a website 
Javascript :: on click jquery 
Javascript :: how to remove duplicate values in array of objects using javascript 
Javascript :: javascript onsubmit 
Javascript :: nodejs mysql insert query 
Javascript :: javascript .fill 
Javascript :: get date js 
Javascript :: get element class javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =