1
0
mirror of https://github.com/yldio/copilot.git synced 2025-01-08 10:00:13 +02:00
copilot/packages/cloudapi-gql/src/endpoint.js

13 lines
280 B
JavaScript
Raw Normal View History

const { GraphQLSchema } = require('graphql');
const graphqlHTTP = require('express-graphql');
const { query, mutation } = require('./schema');
module.exports = graphqlHTTP(() => ({
schema: new GraphQLSchema({
query,
mutation
}),
graphiql: true,
pretty: true
}));