From 619fd46696c34b7945c543570c2f07f65d1b0012 Mon Sep 17 00:00:00 2001 From: Trevor Blades Date: Fri, 11 Feb 2022 11:57:24 -0800 Subject: [PATCH] Customize the production landing page --- index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 817d477..c961b59 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ import {ApolloServer, gql} from 'apollo-server'; +import {ApolloServerPluginLandingPageProductionDefault} from 'apollo-server-core'; import {buildSubgraphSchema} from '@apollo/subgraph'; import {readFileSync} from 'fs'; import {resolvers} from './resolvers.js'; @@ -7,7 +8,13 @@ const typeDefs = gql(readFileSync('./schema.graphql', 'utf-8')); const server = new ApolloServer({ schema: buildSubgraphSchema({typeDefs, resolvers}), - introspection: true + introspection: true, + plugins: [ + ApolloServerPluginLandingPageProductionDefault({ + footer: false, + graphRef: process.env.APOLLO_GRAPH_REF + }) + ] }); server.listen({port: process.env.PORT || 4000}).then(({url}) => {