Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL to support federation #6307

Closed
jaspertandy opened this issue Jul 2, 2020 · 3 comments
Closed

GraphQL to support federation #6307

jaspertandy opened this issue Jul 2, 2020 · 3 comments
Labels
enhancement improvements to existing features graphql ⚙️ features related to the GraphQL API

Comments

@jaspertandy
Copy link

I was torn on whether to post this as a bug, but since the GraphQL implementation doesn't claim to support federation, it's not.

However, it would make Craft's GraphQL implementation so useful to support the federation spec. Is this on the roadmap at all? I have a project coming up that would hugely benefit from it if it's at all possible.

At the moment, when I try to set Craft as a downstream in a federated config, I receive the following error:

Error checking for changes to service definitions: Couldn't load service definitions for "craft" at http://craft/graphql: Cannot query field "_service" on type "Query".
const gateway = new ApolloGateway({
  serviceList: [
    { name: 'users', url: 'http://users:4000' },
    { name: 'collections', url: 'http://collections:4000' },
    { name: 'craft', url: 'http://craft/graphql' }
  ]
});

This pointed me to this issue on Apollo Server, which then links off to the federation spec.

Would this be something that's feasible to add?

@andris-sevcenko
Copy link
Contributor

It would need to be supported by the library that we're using, but I'm not sure if that's on a workable timetable, there. There was some work going on regarding that at some point, but it seems like it stalled. (nuwave/lighthouse#1051)

I'll keep this open, though, as it is a useful feature and maybe we can figure out a way of adding it.

@andris-sevcenko andris-sevcenko added graphql ⚙️ features related to the GraphQL API enhancement improvements to existing features and removed enhancement labels Jul 2, 2020
@charlie-hadden
Copy link

Just to note: it appears that there is at least experimental support for this upstream now: https://lighthouse-php.com/5/federation/getting-started.html

@marjorg
Copy link

marjorg commented Jun 21, 2021

@andris-sevcenko Would be cool to have a way to plug into this using Craft

@craftcms craftcms locked and limited conversation to collaborators Jun 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement improvements to existing features graphql ⚙️ features related to the GraphQL API
Projects
None yet
Development

No branches or pull requests

5 participants