Followed steps by steps just trying to integrate graphql from provided documentation of expressjs, https://github.com/graphql/graphql-http#with-express
import express from 'express'; // yarn add express
import { createHandler } from 'graphql-http/lib/use/express';
import { GraphQLSchema, GraphQLObjectType, GraphQLString } from 'graphql';
const schema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'Query',
fields: {
hello: {
type: GraphQLString,
resolve: () => 'world',
},
},
}),
});
const app = express();
app.use(
'/graphql',
createHandler({ schema:schema,graphiql:true}),
)
I am not getting UI interface to run query just getting following response
{"errors":[{"message":"Missing query"}]} 400 Bed Request
Get UI to play query strig or something to implement new query strings / APIs