strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
MIT License
393 stars 115 forks source link

fix: Use _RESOLVER_TYPE as the type for the resolver on field, so the… #412

Closed guizesilva closed 8 months ago

guizesilva commented 8 months ago

… correct type is returned when using a resolver with arguments.

Description

Relate to this issue, use the type _RESOLVER_TYPE for field's resolver type, so it returns the correct type when using a resolver with arguments, and stop pyright from complaining about incorrect types.

Types of Changes

Issues Fixed or Closed by This PR

Checklist

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (056ab2f) 87.12% compared to head (182c3da) 87.12%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #412 +/- ## ======================================= Coverage 87.12% 87.12% ======================================= Files 36 36 Lines 3091 3091 ======================================= Hits 2693 2693 Misses 398 398 ``` | [Files](https://app.codecov.io/gh/strawberry-graphql/strawberry-graphql-django/pull/412?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=strawberry-graphql) | Coverage Δ | | |---|---|---| | [strawberry\_django/fields/field.py](https://app.codecov.io/gh/strawberry-graphql/strawberry-graphql-django/pull/412?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=strawberry-graphql#diff-c3RyYXdiZXJyeV9kamFuZ28vZmllbGRzL2ZpZWxkLnB5) | `96.98% <ø> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.