apollo-federation-subgraph-compatibility
apollo-federation-subgraph-compatibility copied to clipboard
graphql-go Federation support
There is an interesting discussion about adding Federation support to graphql-go here: https://github.com/graphql-go/graphql/issues/492
graphql-go is intended to be more of a graphql-js clone, which means Federation support doesn't necessarily belong in the library itself, but it looks like there are API changes that could be made to graphql-go to make it easier to use with Federation. The above linked to issue dives into this a bit (https://github.com/graphql-go/graphql/issues/492#issuecomment-553707207), but we'll need to validate this and see if any other changes are needed (see also https://github.com/graphql-go/graphql/issues/541). If we can help get these changes in place, we can then think about potentially creating a Go based Federation helper library, like we've done with @apollo/subgraph (JS/Node) and federation-jvm (Java/JVM).
It is a good idea, I need Federation support
We're going to prep a PR to add Federation enabling changes in graphql-go.
POC is available at dariuszkuc/[email protected].
Example implementation of the testing schema used in this repo: https://github.com/dariuszkuc/graphql/tree/federation/examples/federation (ftv1 tracing is not supported, all other tests are 🟢)
graphql-go/graphql PRs:
- https://github.com/graphql-go/graphql/pull/651
- https://github.com/graphql-go/graphql/pull/652
- https://github.com/graphql-go/graphql/pull/653
Once above PRs are merged we can create and publish separate federation module.
While we wait for feedback (and 🤞 our graphql-go PR's to be merged), we're going to go ahead and add graphql-go tests to this repo, pointing to the above fork for now.
Re-opening this issue to use as our tracking issue for getting @dariuszkuc's awesome graphql-go + Federation work hopefully merged into the project.