Below is my simple graph ql hellow rold code which i directly used from graphql official docs toget started, somehow its giving me error: Expected undefined to be a GraphQL schema on hello world
var schema = buildSchema(`
type Query {
hello: String
}
`);
var root = { hello: () => "Hello world!" };
graphql(schema, "{ hello }", root).then((response) => {
console.log(response);
});