From 6fb95f4a889d59b09e10251a564860e0beab250c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Szabo?= Date: Fri, 19 Oct 2018 13:30:42 +0200 Subject: [PATCH 1/2] Make mocking configuration less confusing. Setting mocks to false will always disable mocking. --- packages/apollo-server-core/src/ApolloServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apollo-server-core/src/ApolloServer.ts b/packages/apollo-server-core/src/ApolloServer.ts index 2a596691266..f27cd0dc394 100644 --- a/packages/apollo-server-core/src/ApolloServer.ts +++ b/packages/apollo-server-core/src/ApolloServer.ts @@ -254,7 +254,7 @@ export class ApolloServerBase { }); } - if (mocks || typeof mockEntireSchema !== 'undefined') { + if (mocks || (typeof mockEntireSchema !== 'undefined' && mocks !== false)) { addMockFunctionsToSchema({ schema: this.schema, mocks: From 07818f483aa938465989bcaeb5fb1a9a22a529ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Szabo?= Date: Tue, 30 Oct 2018 12:21:34 +0100 Subject: [PATCH 2/2] Updated CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95085da8bac..53972eadc54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### vNEXT +- Fix mocks configuration to allow disabling of mocks by using `mocks: false`, even if `mockEntireSchema` is `true` [PR #1835](https://github.com/apollographql/apollo-server/pull/1835) - Update `graphql-playground-html` to 1.7.8 - Allow an optional function to resolve the `rootValue`, passing the `DocumentNode` AST to determine the value. [PR #1555](https://github.com/apollographql/apollo-server/pull/1555) - Follow-up on the work in [PR #1516](https://github.com/apollographql/apollo-server/pull/1516) to also fix missing insertion cursor/caret when a custom GraphQL configuration is specified which doesn't specify its own `cursorShape` property. [PR #1607](https://github.com/apollographql/apollo-server/pull/1607)