From ba909628f51ebca26f3da73be2d7b72bea313ade Mon Sep 17 00:00:00 2001 From: Oustan Ding Date: Thu, 25 Aug 2022 01:02:58 -0400 Subject: [PATCH] [Fix] Re-enable GQL playground for debugging (#266) --- lib/graphql/apollo.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/graphql/apollo.ts b/lib/graphql/apollo.ts index 1f7b5f17..28ec1d17 100644 --- a/lib/graphql/apollo.ts +++ b/lib/graphql/apollo.ts @@ -15,15 +15,12 @@ const schema = applyMiddleware( export const apolloServer = new ApolloServer({ schema, - playground: - process.env.NODE_ENV === 'development' - ? { - settings: { - 'schema.polling.enable': false, // Disable infinite schema introspection - 'request.credentials': 'include', // Include auth token in requests - }, - } - : false, - introspection: process.env.NODE_ENV === 'development', + playground: { + settings: { + 'schema.polling.enable': false, // Disable infinite schema introspection + 'request.credentials': 'include', // Include auth token in requests + }, + }, + introspection: process.env.NODE_ENV !== 'production', context, });