chore: Extract error handler and graphql instance to seperate files

This commit is contained in:
Faruk AYDIN
2021-10-05 18:34:40 +02:00
committed by Ali BARIN
parent 4039e520d6
commit c41d938f9e
3 changed files with 28 additions and 23 deletions

View File

@@ -0,0 +1,11 @@
import { graphqlHTTP } from 'express-graphql';
import rootResolver from '../graphql/root-resolver'
import graphQLSchema from '../graphql/graphql-schema'
const graphQLInstance = graphqlHTTP({
schema: graphQLSchema,
rootValue: rootResolver,
graphiql: true,
})
export default graphQLInstance;