I am trying to integrate with a remote schema using graphql-tools for node.
I have the remote schema but unfortunately all of the queries are defined on the Viewer
type rather than the Query
type.
I would like to use graphql-tools
to transform the schema and move some of the fields from the Viewer
type to the Query
type.
I have tried a couple of different methods: including delegateToSchema
in a custom resolver and ExtractField
transformations, but they haven't worked. delegateToSchema
seems like the correct way to do it but unfortunately it can only delegate to a root type not a type like Viewer
.
Does anyone know how I could add a field to the Query
type that delegates to a field on the Viewer
type?