From f870d09dc2e7a1e1633fe4149e5bee5762147de6 Mon Sep 17 00:00:00 2001 From: Jonas Helfer Date: Sat, 23 Apr 2016 16:43:46 -0700 Subject: [PATCH] update docs for mocking --- docs/source/apollo-server/mocking.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/apollo-server/mocking.md b/docs/source/apollo-server/mocking.md index 22e2b940537..c2c282fa135 100644 --- a/docs/source/apollo-server/mocking.md +++ b/docs/source/apollo-server/mocking.md @@ -15,3 +15,4 @@ For more information about how to use the `mockServer` function, see the [Medium `addMocksToSchema` is the function that `mockServer` uses under the hood. Given an instance of GraphQLSchema and a mock object, it modifies the schema in place to return mock data for any valid query that is sent to the server. If `mocks` is not passed, the defaults will be used for each of the scalar types. If `preserveResolvers` is set to `true`, existing resolve functions will not be overwritten to provide mock data. This can be used to mock some parts of the server and not others. +`mockServer` will set the `context` to `{}` when invoking `graphql`, which means that the mock functions could use that context to store additional information for mocking, such as relationships between different types.