Skip to content
Snippets Groups Projects
Commit 32f0d5d4 authored by Daniel Bimschas's avatar Daniel Bimschas
Browse files

NOISSUE: add graphql-playground

Simple solution to get an interactive tool to explore our GraphQL API. Please note:
graphql-playground is retiring (see
https://www.apollographql.com/docs/apollo-server/api/plugin/landing-pages/#graphql-playground-landing-page)
and will eventually be replaced with GraphiQL.
parent bc53a7cf
No related branches found
No related tags found
No related merge requests found
import { faker } from '@faker-js/faker'
import { ApolloServerPluginDrainHttpServer, gql } from 'apollo-server-core'
import {
ApolloServerPluginDrainHttpServer,
ApolloServerPluginLandingPageGraphQLPlayground,
gql,
} from 'apollo-server-core'
import { ApolloServer } from 'apollo-server-express'
import { program } from 'commander'
import express from 'express'
......@@ -101,7 +105,7 @@ const httpServer = http.createServer(app)
const server = new ApolloServer({
typeDefs,
resolvers,
plugins: [ApolloServerPluginDrainHttpServer({ httpServer })],
plugins: [ApolloServerPluginDrainHttpServer({ httpServer }), ApolloServerPluginLandingPageGraphQLPlayground()],
})
server
.start()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment