Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't deprecate Schema Stitching, as it's use case is DIFFERENT from Federation. #1286

Closed
jjangga0214 opened this issue Feb 22, 2020 · 3 comments

Comments

@jjangga0214
Copy link

jjangga0214 commented Feb 22, 2020

Screenshot from 2020-02-22 22-12-54

The docs say Schema Stitching is deprecated in favor of Apollo Federation.

Of course, Federation can replace Schema Stitching in general.

However, there are some cases only Schema Stitching makes sense.

For example, sometimes we can't directly develop and change our microservices' GraphQL schema even if we want to use them with Apollo Federation. Some code-first frameworks like nexus or type-graphql do not support GraphQL directive. Some GraphQL engines like Hasura or Postgraphile are same as well. In other cases, we might want to incorporate 3rd party services'(e.g Stripe) GraphQL, which is of course not federation-spec-compliant. In these cases, one of the good solutions is using Schema Stitching and Schema Transform. There's even a package named graphql-transform-federation for this purpose.

schema-stitching-with-federation

What's more, even when only a monolithic service is enough, Schema Stitching can be used to override some queries, mutations or subscriptions of existing monolithic service, if we can't directly fix the service schema (e.g. code-first frameworks or engines like Hasura).

Sometimes, even clients want to transform schema provided by a server. Client developers might want to do this for their convenience. In this case as well, Schema Stitching is useful.

In conclusion, Apollo Federation does not cover every use case of Schema Stitching. Thus, as they are different, I think Schema Stitching should not be deprecated.

@yaacovCR
Copy link
Collaborator

yaacovCR commented Mar 3, 2020

Schema stitching is alive and well in graphql-tools-fork.

Type merging from remote schemas is now supported. In combination with transformations that allow you to rename and restructure remote types and fields even for graphs not under your control, schema stitching is alive and well, just not under Apollo auspices. Probably the best thing for the community would be for them to let control of this repository head out to the community so that schema stitching and Federation can really each have a shot at addressing community needs.

@TimSusa
Copy link

TimSusa commented Mar 21, 2020

Why just not taking over graphql-tools-fork fixes to graphql-tools? Really hard for me to understand, just to say its deprecated. Seems to me, like a sad story.

@yaacovCR
Copy link
Collaborator

See #1307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants