Skip to content

Commit

Permalink
restore landing page in prod mode
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Oct 14, 2023
1 parent 17f8be1 commit df9af7b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "NODE_ENV=production ts-node src/server.ts",
"debug": "ts-node src/server.ts",
"test": "nodemon src/server.ts",
"build": "tsc",
"build": "tsc || echo",
"restart": "webservice --backend kubernetes node16 restart"
},
"keywords": [
Expand Down
18 changes: 8 additions & 10 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ import {
resolvers,
introspection: true,
plugins: [
process.env.NODE_ENV === 'production'
? ApolloServerPluginLandingPageProductionDefault({
footer: false,
// graphRef: 'my-graph-id@my-graph-variant',
// embed: {
// runTelemetry: false,
// persistExplorerState: true
// }
})
: ApolloServerPluginLandingPageLocalDefault(),
ApolloServerPluginLandingPageLocalDefault({
embed: {
runTelemetry: false,
initialState: {
pollForSchemaUpdates: process.env.NODE_ENV !== 'production',
}
}
}),
],
});

Expand Down

0 comments on commit df9af7b

Please sign in to comment.