apollo-federation-subgraph-compatibility icon indicating copy to clipboard operation
apollo-federation-subgraph-compatibility copied to clipboard

graphql-go Federation support

Open hwillson opened this issue 3 years ago • 5 comments

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).

hwillson avatar Feb 21 '22 15:02 hwillson

It is a good idea, I need Federation support

codebdy avatar May 05 '22 00:05 codebdy

We're going to prep a PR to add Federation enabling changes in graphql-go.

hwillson avatar Aug 04 '22 14:08 hwillson

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.

dariuszkuc avatar Oct 20 '22 20:10 dariuszkuc

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.

hwillson avatar Oct 27 '22 19:10 hwillson

Re-opening this issue to use as our tracking issue for getting @dariuszkuc's awesome graphql-go + Federation work hopefully merged into the project.

hwillson avatar Nov 09 '22 16:11 hwillson