diff --git a/.changeset/shy-news-argue.md b/.changeset/shy-news-argue.md new file mode 100644 index 00000000000..3531b7c4ca2 --- /dev/null +++ b/.changeset/shy-news-argue.md @@ -0,0 +1,5 @@ +--- +'@keystonejs/app-graphql': patch +--- + +Fixed bug preventing configuration of apollo graph engine from `GraphQLApp()`. diff --git a/packages/app-graphql/lib/apolloServer.js b/packages/app-graphql/lib/apolloServer.js index a199a25af0a..49e753dc760 100644 --- a/packages/app-graphql/lib/apolloServer.js +++ b/packages/app-graphql/lib/apolloServer.js @@ -144,7 +144,6 @@ function createApolloServer(keystone, apolloConfig, schemaName, dev) { const server = new ApolloServer({ maxFileSize: 200 * 1024 * 1024, maxFiles: 5, - ...apolloConfig, ...keystone.getAdminSchema({ schemaName }), context: ({ req }) => ({ ...keystone.getGraphQlContext({ schemaName, req }), @@ -163,6 +162,7 @@ function createApolloServer(keystone, apolloConfig, schemaName, dev) { tracing: dev, }), formatError: _formatError, + ...apolloConfig, }); keystone.registerSchema(schemaName, server.schema);