Replies: 1 comment 7 replies
-
I think you will want to use SchemaTransformer and a custom visitor that takes the 2nd schema as input and "adds" fields to type as you encounter them, merging them by what ever algo you decide on. There is currently no doco for this on https://www.graphql-java.com/ but I have a PR up for it here graphql-java/graphql-java-page#50 and SchemaTransformer takes some grokking (with its |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
As I know there is no embedded functionality for schema stitching.
It is possible to merge two schemas, but process will fail if types with same name appears in both of them.
I need to merge specific types from both schemas. Merge their field definitions.
It is Query and Mutation types. Both of them exists in each schema.
How can I merge types with same names but different fields definitions into one type with
combined fields?
I investigated source code, SchemaParser and TypeDefinitionRegistry but didn't find suitable way to
merge type fields. I have feeling that I am looking at the wrong place.
Could you suggest how to solve my problem, and point me the direction where to dig.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions