You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
When using strawberry_django_plus.filters.filter instead of strawberry_django.filter, the annotated fields appear to be required, i.e. activated by default in GraphiQL, and using deprecation_reason causes the schema to validate:
❌ Required input field FooFilter.bar_status cannot be deprecated.
are you sure that strawberry_django forthis should work just like strawberry_django forces the type annotation to optional?
Can you please rephrase / fix your question? :)
I cannot really tell though: from my experience filters are optional/gql.UNSET by default, and while it appears to be a nice feature to require them, I do not think this should be the default behavior.
are you sure that strawberry_django forthis should work just like strawberry_django forces the type annotation to optional?
Can you please rephrase / fix your question? :)
OMG, I started typing something, than changed my mind in the middle and didn't reread what I wrote.
What I meant was to ask is: Are you sure strawberry_django works like that? Because the behaviour here should be the same AFAIK.
I cannot really tell though: from my experience filters are optional/gql.UNSET by default, and while it appears to be a nice feature to require them, I do not think this should be the default behavior.
I agree with you! It is just strange from the typing point of view. But well, if strawberry_django is already doing that (based on the question above), strawberry_django_plus shouldn't be working differently.
When using
strawberry_django_plus.filters.filter
instead ofstrawberry_django.filter
, the annotated fields appear to be required, i.e. activated by default in GraphiQL, and usingdeprecation_reason
causes the schema to validate:I've seen that
| None
can be used with the annotation to make it optional, but I think it should be optional by default.code ref:
strawberry-django-plus/strawberry_django_plus/filters.py
Lines 65 to 92 in 273d906
The text was updated successfully, but these errors were encountered: