disable graphql landing page
This commit is contained in:
parent
e0bea64175
commit
2a8085a995
@ -7,11 +7,8 @@ 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'
|
|
||||||
import { multiAuthMiddleware } from '@/lib/auth'
|
import { multiAuthMiddleware } from '@/lib/auth'
|
||||||
|
import { ApolloServerPluginLandingPageDisabled } from '@apollo/server/plugin/disabled'
|
||||||
|
|
||||||
const apolloServer = new ApolloServer({
|
const apolloServer = new ApolloServer({
|
||||||
typeDefs,
|
typeDefs,
|
||||||
@ -45,12 +42,7 @@ const apolloServer = new ApolloServer({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, ApolloServerPluginLandingPageDisabled()]
|
||||||
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