apollographql / apollographql/federation
Apollo Gateway: Support services that doesn't implement federation specification
- Dominant language
- TypeScript
- Stars
- 725
- Forks
- 276
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
Hey!
I want to use `@apollo/gateway` but in order to do that the other GraphQL microservices should implement the [federation schema specification](https://www.apollographql.com/docs/federation/federation-spec/).
My problem is that not all of the GraphQL microservices in my responsible (belong to another teams).
That means that I can't make them implement the federation schema specification.
So at first I thought that the `ApolloServer` instance will hold both gateway and schema, but I got this error: 'Cannot define both `gateway` and any of: `modules`, `schema`, `typeDefs`, or `resolvers`',
So I start searched for solutions and I found this article: https://xebia.com/blog/graphql-federation-for-everyone
which presents the `graphql-transform-federation` package.
But in order to do so I need to set up new microservice just for creating federated schemas.
I wonder if the `@apollo/gateway` could handle microservices that doesn't implement the federation schema specification (kind of what the `graphql-transform-federation` package does), or maybe there is another solution / workaround for this issue.
Thanks in advance!
Contributor guide
Research direction
Start with the @apollo/gateway and ApolloServer entry points described in the issue, then compare the federation requirement with the graphql-transform-federation approach. Determine whether non-federated GraphQL microservices can be supported directly or whether a workaround is required, and document the resulting supported path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100