graphql-python / graphene-django

Build powerful, efficient, and flexible GraphQL APIs with seamless Django integration.
http://docs.graphene-python.org/projects/django/en/latest/
MIT License
4.3k stars 769 forks source link

Associate GlobalIDFilter with BigAutoField and SmallAutoField #1496

Open iamthad opened 8 months ago

iamthad commented 8 months ago

AutoField is set up to use GlobalIDFilter, but BigAutoField and SmallAutoField are not.

This PR adds them to GRAPHENE_FILTER_SET_OVERRIDES, associating them with the filter.

It also removes some conditional logic around SmallAutoField that was introduced in #1212 because SmallAutoField was introduced in Django 3.0 and this project now requires a minimum Django version of 3.2.

pizzapanther commented 8 months ago

I originally added the BigAutoField support. This was definitely missed so thanks! LGTM

iamthad commented 8 months ago

I realized today, that in the spirit of https://xkcd.com/1172/, this will be a breaking change for those who were relying on the old behavior. Their APIs will start requiring global IDs on ID filters instead of integers.

How should this be addressed? Maybe a note in the changelog about how to restore the old behavior would be sufficient?