strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
https://strawberry.rocks/docs/django
MIT License
421 stars 122 forks source link

Ordering does not work properly with federation gateway #625

Closed iamcrookedman closed 2 months ago

iamcrookedman commented 2 months ago

I'm not sure if this is a problem with this library but definitely the current ordering design doesn't work with @apollo/gateway.

The sort order depends on the order of the keys and when requesting the server directly it works as it should, but when requesting through the federation the order of the keys changes to alphabetical. Perhaps the ordering body should be an array to avoid dependence on the order of the keys. I understand that this is a big change in design but in this case we are dependent on how the dictionaries are implemented in one or another part of the system.

Upvote & Fund

Fund with Polar

najeeb-thalakkatt commented 2 months ago

Same issue here

bellini666 commented 2 months ago

Hi @iamcrookedman ,

Yeah, this is the same issue as this one: https://github.com/strawberry-graphql/strawberry-django/issues/615

I think the way to solve this will be to revamp the pagination stuff to use an array, just like you said

Going to close this as duplicated, to keep the related discussion in the same place :)