Mutation / Query + Subscription Split link?
Hey, would it be possible to use these tools to host a simple gateway that splits mutations and queries + subscriptions and forward them to different servers?
Mutation -> forward to mutation.gql.example.com
Query or Subscription -> forward to query.gql.example.com
Only caveat is, that due to some limitations on our graphql server both endpoints offer the same API (mutations + queries). So simple federation is not possible in my usecase.
Hey, yes absolutely. Everything is possible. Here's an example of how this could be implemented: https://docs.wundergraph.com/docs/wundergraph-server-ts-reference/on-origin-request-hook
We could write an onOriginRequest hook that checks for "mutation" in the body, and rewrites the host.
If you'd like to build this on your own, all you have to do is wire everything up and create a custom transport that does the same thing as the onOriginRequest hook.