embed graphql sandbox
This commit is contained in:
parent
70e4b27c03
commit
4a35c13ff3
@ -7,6 +7,10 @@ import typeDefs from '../../api/typeDefs'
|
|||||||
import { getServerSession } from 'next-auth/next'
|
import { getServerSession } from 'next-auth/next'
|
||||||
import { getAuthOptions } from './auth/[...nextauth]'
|
import { getAuthOptions } from './auth/[...nextauth]'
|
||||||
import search from '../../api/search'
|
import search from '../../api/search'
|
||||||
|
import {
|
||||||
|
ApolloServerPluginLandingPageLocalDefault,
|
||||||
|
ApolloServerPluginLandingPageProductionDefault
|
||||||
|
} from '@apollo/server/plugin/landingPage/default'
|
||||||
|
|
||||||
const apolloServer = new ApolloServer({
|
const apolloServer = new ApolloServer({
|
||||||
typeDefs,
|
typeDefs,
|
||||||
@ -38,7 +42,12 @@ const apolloServer = new ApolloServer({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
},
|
||||||
|
process.env.NODE_ENV === 'production'
|
||||||
|
? ApolloServerPluginLandingPageProductionDefault(
|
||||||
|
{ embed: { endpointIsEditable: false, persistExplorerState: true, displayOptions: { theme: 'dark' } }, footer: false })
|
||||||
|
: ApolloServerPluginLandingPageLocalDefault(
|
||||||
|
{ embed: { endpointIsEditable: false, persistExplorerState: true, displayOptions: { theme: 'dark' } }, footer: false })]
|
||||||
})
|
})
|
||||||
|
|
||||||
export default startServerAndCreateNextHandler(apolloServer, {
|
export default startServerAndCreateNextHandler(apolloServer, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user