lighthouse
lighthouse copied to clipboard
Allow changing root type names
- [ ] Added or updated tests
- [ ] Documented user facing changes
- [ ] Updated CHANGELOG.md
This PR allows us to change the root type names.
I am not sure how it should be tested whether actually changing the values work?
Reference talk: https://lighthouse-php.slack.com/archives/CB28A070S/p1645698178486249
We should use native SDL for changing the name of the root types, see http://spec.graphql.org/draft/#sec-Schema
We should use native SDL for changing the name of the root types, see http://spec.graphql.org/draft/#sec-Schema
Might be a bit out of my knowledge for Lighthouse and GraphQL. Could use some help if anyone is up for it.
It is not that hard. Basically, somewhere in the schema definition - probably schema.graphql
- there can be a definition like this:
schema {
subscription: CustomSubscription
}
This definition should be accessible in DocumentAST
.
Marked this as a draft, as the implementation is not based upon SDL yet.
I am not sure how it should be tested whether actually changing the values work?
This is going to become trivial, the test schema can simply include a schema { ... }
definition with renamed root query types then.