Skip to content
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

Associate GlobalIDFilter with BigAutoField and SmallAutoField #1496

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iamthad
Copy link

@iamthad iamthad commented Feb 1, 2024

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.

This was introduced in Django 3.0 and the project requires Django >= 3.2
@pizzapanther
Copy link
Contributor

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

Copy link
Collaborator

@sjdemartini sjdemartini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for updating this!

@iamthad
Copy link
Author

iamthad commented Feb 2, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants