I am using makeRemoteExecutableSchema in graphql-tools to retrieve a remote schema and I am then merging it with a local schema. I would like to add a prefix to the type names on the remote schema. Is there an easy way to do this?
0
votes
1 Answers
0
votes
Sounds like you want to do a schema transform.
I assume you want to prefix the field names with something like someprefix_field_name, like you would prefix table names in a database? There is plenty of documentation for this, first in this example:
https://github.com/hasura/schema-stitching-examples/blob/master/schema-transform/index.js
and also look at the function RenameRootFields() in graphql-tools, as documented here:
https://www.apollographql.com/docs/graphql-tools/schema-transforms#Modifying-root-fields