mercurius-js / mercurius

Implement GraphQL servers and gateways with Fastify
https://mercurius.dev/
MIT License
2.34k stars 234 forks source link

Duplicated _entities in federation #897

Closed ramiel closed 1 year ago

ramiel commented 1 year ago

As in issue #643 should it be similar for _entities?

mcollina commented 1 year ago

I'm sorry but I don't understand what you are talking about. Can you clarify and make an example?

ramiel commented 1 year ago

Sorry for the poor description. I want to ask another question actually, that includes an answer to this issue as well. In the documentation is written:

A GraphQL server can act as a Gateway that composes the schemas of the underlying services into one federated schema and executes queries across the services. Every underlying service must be a GraphQL server that [supports the federation](https://www.apollographql.com/docs/federation/supported-subgraphs/).

From the link it looks like mercurius does not support some critical feature. Is it possible to use mercurius as underlying service, in a federation?

mcollina commented 1 year ago

According to announcement of Federation v2, it is patent pending.

While it would be ok for users to make a judgment call for themselves, I do not feel I should include them in the main package. As soon as we have Federation support separated in https://github.com/mercurius-js/federation-support/pull/1, anybody could fork that project to add those in.

ramiel commented 1 year ago

Ok, good to know. Since mercurius can act as gateway I thought it could be used as service as well. My fault. To be honest I can make the service work with mercurius as well, but it's a bit of an hack. I'll leave things unchanged or move to something else like graphql-yoga.

Thank you