schema-stitching icon indicating copy to clipboard operation
schema-stitching copied to clipboard

Schema organization in the context of using Schema Stitching directives

Open Drilmo opened this issue 1 year ago • 0 comments
trafficstars

hello, I use the "schema stitching" part with a gateway and to simplify maintenance and upgrades, I use "stitching directives" in the sub-services to make the links between them. However, I was wondering if it would be possible to better organize the graph as a whole (all the queries are scattered throughout the documentation, which makes reading a bit complex).

Isn't it possible to use schemas like:

type typeA {
    id: ID!
    name: String!
  }
type Query {
 subServiceA: subServiceAQuery
}
type subServiceAQuery {
 "hello world"
 get(id: ID!): typeA @merge(keyField: "id")
}

I'm asking because I can't figure out how to do it, knowing that @merge can only be used as a root query field. How can I do this?

Drilmo avatar Apr 11 '24 05:04 Drilmo