manifold/web/lib/api/graphql/index.ts
joy_void_joy efab3de172 graphql: Add mocked graphql endpoint
Add a graphql endpoint at /api/graphql
2022-07-20 18:15:53 +02:00

15 lines
408 B
TypeScript

import { ApolloServer } from 'apollo-server-micro'
import { ApolloServerPluginLandingPageGraphQLPlayground } from 'apollo-server-core'
import resolvers from './resolvers'
import typeDefs from 'web/generated/schema.graphql'
export const apolloServer = new ApolloServer({
csrfPrevention: true,
cache: 'bounded',
plugins: [ApolloServerPluginLandingPageGraphQLPlayground()],
resolvers,
typeDefs,
})