strawberry-graphql / strawberry

A GraphQL library for Python that leverages type annotations 🍓
https://strawberry.rocks
MIT License
3.87k stars 511 forks source link

refactoring: graphql_relay usage for more standard conformity #2937

Open devkral opened 1 year ago

devkral commented 1 year ago

Is there a reason why strawberry doesn't use graphql-relay?

For standard conformity I would use the mentioned library (graphql-relay) and

use at least the to_global_id/from_global_id definitions as they are a bit more elaborated

Upvote & Fund

Fund with Polar

patrick91 commented 12 months ago

@devkral did you find any major difference with our implementation?

devkral commented 12 months ago

Most major are better typings by using NamedTuple (GlobalID), an array_connection which seems to handle all pitfalls of a relay connection and a good? test coverage.

Also a concern of mine is that with graphql-relay there is another GlobalID definition which could cause crashes when both are loaded

devkral commented 12 months ago

but it seems that the build system of them is over optimized; they have hard requirements of poetry and setuptools; this is a major disadvantage of the package