When using some of the built-in resolver functions in strawberry-graphql-django with a current version of strawberry, a DeprecationWarning is emitted:
DeprecationWarning: Argument name-based matching of 'info' is deprecated and will be removed in v1.0. Ensure that reserved arguments are annotated their respective types (i.e. use value: 'DirectiveValue[str]' instead of 'value: str' and 'info: Info' instead of a plain 'info').
This affects at least the auth resolvers, possibly more:
It is possible to suppress the warning as it uses regular warnings module functionality, but considering this will stop working at some point in strawberry itself, this should be fixed.
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Describe the Bug
When using some of the built-in resolver functions in
strawberry-graphql-django
with a current version ofstrawberry
, aDeprecationWarning
is emitted:This affects at least the
auth
resolvers, possibly more:https://github.com/strawberry-graphql/strawberry-graphql-django/blob/97cdea29867d33b2bfd75b67a4310dd6cc147ddc/strawberry_django/auth/queries.py#L4
https://github.com/strawberry-graphql/strawberry-graphql-django/blob/97cdea29867d33b2bfd75b67a4310dd6cc147ddc/strawberry_django/auth/mutations.py#L17
https://github.com/strawberry-graphql/strawberry-graphql-django/blob/97cdea29867d33b2bfd75b67a4310dd6cc147ddc/strawberry_django/auth/mutations.py#L28
The relevant upstream code is here:
https://github.com/strawberry-graphql/strawberry/blob/dfde19a386ca2ff4124d6bb2955df4fd771cdfb9/strawberry/types/fields/resolver.py#L122-L127
System Information
Python 3.11
strawberry-graphql
0.159.0strawberry-graphql-django
0.9.2Additional Context
It is possible to suppress the warning as it uses regular
warnings
module functionality, but considering this will stop working at some point in strawberry itself, this should be fixed.Upvote & Fund