Closed dcousens closed 7 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 638d2509626014c8490525b5f3a51cf06cd92d1a:
Sandbox | Source |
---|---|
@keystone-6/sandbox | Configuration |
This pull request fixes
createExpressServer
to always usecontext.graphql.schema
instead of theGraphQLSchema
argument passed in.Users downstream will nearly always be interacting with their GraphQL schema using the
context.query
andcontext.db
methods. As part of https://github.com/keystonejs/keystone/pull/9028 we have deprecated theGraphQLSchema
argument that was provided, but if users are using that instead ofcontext.graphql.schema
, then I think it is a safe assumption that downstream users would have expected that the the GraphQL schema provided should have been equal to the operating schema ofcontext
.This could arguably be considered a breaking change, but I don't think anyone would have reasonably used the argument of
createExpressServer
(deprecated) to differentiate between the two possible schemas, therefore I think this is a patch that will help developers if they made an error in passing a differentGraphQLSchema
through.