Skip to content

Commit

Permalink
Make mocking configuration less confusing. (#1835)
Browse files Browse the repository at this point in the history
* Make mocking configuration less confusing.
Setting mocks to false will always disable mocking.

* Updated CHANGELOG
  • Loading branch information
deftomat authored and JakeDawkins committed Oct 30, 2018
1 parent b841ed6 commit abbe382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-core/src/ApolloServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class ApolloServerBase {
});
}

if (mocks || typeof mockEntireSchema !== 'undefined') {
if (mocks || (typeof mockEntireSchema !== 'undefined' && mocks !== false)) {
addMockFunctionsToSchema({
schema: this.schema,
mocks:
Expand Down

0 comments on commit abbe382

Please sign in to comment.