graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Support Apollo Federation

Open salwator opened this issue 5 years ago • 11 comments

Hi all,

We did implement GraphQL API for Saleor using graphene and want to extend it using federation.

Supporting federation seems pretty straightforward, you need to provide _service type with sdl field to get schema and and directives to mark key, external and required fields. There is an external package that partially implements it here but relying on additional package for core functionality is suboptimal.

Is anybody working on implementing this in graphene? Are there any known blockers? If not, we're fine with writing our own and contributing here.

Mentioning few guys to start discussion: @syrusakbary, @jkimbo, @ekampf, @dan98765

salwator avatar Oct 04 '19 10:10 salwator

I'm interested in this too and so I've been following this.

Here (#953) someone else already implemented something that apparently follows the federation specification. Maybe @erebus1 and @anlauren would be interested in chiming in as well.

fhennig avatar Oct 30 '19 10:10 fhennig

Yes there was a couple of discussions i have seen another one in stackoverflow, i wrote a hacky way to do so around graphene, but i don't know the inside of the library enough to do this in there. I was basically modifying the schema written by graphene to expose the right service description to the federation. The graphene-federation you mentioned started with this, now it could be good to get this inside graphene itself

anlauren avatar Nov 19 '19 15:11 anlauren

:eyes:

GiancarlosIO avatar Feb 11 '20 18:02 GiancarlosIO

@salwator as far as I'm aware no one is actively working on this. Would be great to see though so if you get anything working do feedback here.

jkimbo avatar Feb 12 '20 13:02 jkimbo

Really interested in this issue if i can be of any help

Ambro17 avatar Mar 30 '20 00:03 Ambro17

Would love to help as well

jottenlips avatar Jun 09 '20 13:06 jottenlips

I would like to help on this project I am using graphene-federation library and i find it very useful already I know that a lot of new features will come up and it would be nice if we could integrate them (@internal key...)

I have created a login_required decorator for graphene-federation. I dont know if it is well done but at least it works. see doc and code here: https://github.com/troptop/graphene_federation_required_login

troptop avatar Jul 23 '20 09:07 troptop

I'm wondering if any large project is using GraphQL with python backends, the more I look into it the more I feel there is no python community around GraphQL. Or maybe its just GraphQL as a whole that never really got adopted? Today it feels like a huge risk to use GraphQL for a large project, we've tested it on a small project and it's looking good (a monolithic app: postgres/sqlalchemy/graphene/starlette). But this issue and the lack of interest it got shows that it might not be suitable for larger projects (several "micro-service" teams working together). Maybe I'm just missing a part of this ecosystem?

Maybe what's missing is a large project to drive the development of the python graphql tools?

cglacet avatar Feb 17 '21 08:02 cglacet

Looks like this fork is better maintained for the graphene-federation stuff: https://github.com/loft-orbital/graphene-federation/tree/loft-master/graphene_federation

@BossGrand @jkimbo is there still interest in a PR for adding this to core? Any thoughts on how you'd want someone to approach this, for the PR to get consideration / review / acceptance?

chadfurman avatar Jul 12 '21 00:07 chadfurman

https://github.com/Koldar/graphene-federation looks more updated and worked towards graphene 3 support. I haven't tested it though.

I'd expect support for federation out of the box by Graphene.

Vichoko avatar Oct 25 '21 14:10 Vichoko

Hey folks, I know this is quite stale, but I would like to pick this issue up 🙂 The problem is that all downstream repos providing this are incompatible with graphene3, e.g. https://github.com/loft-orbital/graphene-federation/tree/loft-master/graphene_federation and as soon as the project is getting bigger it is virtually impossible to use graphene without federation. Before I pick this, I would just like to make sure that the functionality is supposed to reside in the graphene repo.

jendrikjoe avatar May 16 '22 14:05 jendrikjoe

Given that there is https://github.com/graphql-python/graphene-federation now, I think this issue can be closed right? 🙂

jendrikjoe avatar Nov 03 '22 07:11 jendrikjoe

Graphene federation with support for graphene v3 is officially released in the graphene-federation repo of this organization! Federation v2 support is coming soon.

erikwrede avatar Nov 03 '22 10:11 erikwrede