-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Annotated
+ strawberry.lazy
+ deferred annotations results in UnresolvedFieldTypeError: Could not resolve the type of ...
errors
#3491
Labels
bug
Something isn't working
Comments
Annotated
+ strawberry.lazy
+ from __future__ import annotations
results in UnresolvedFieldTypeError: Could not resolve the type of ...
errorsAnnotated
+ strawberry.lazy
+ deferred annotations results in UnresolvedFieldTypeError: Could not resolve the type of ...
errors
Ah, the same applies to "manually" deferred annotations (i.e. an explicit string): import strawberry
from typing import Annotated
@strawberry.type
class Query:
a: """Annotated["datetime", strawberry.lazy("datetime")]"""
schema = strawberry.Schema(Query) |
I think we'll fix this next week with @bellini666 😊 |
bellini666
added a commit
that referenced
this issue
May 22, 2024
bellini666
added a commit
that referenced
this issue
May 22, 2024
bellini666
added a commit
that referenced
this issue
May 22, 2024
patrick91
pushed a commit
that referenced
this issue
May 22, 2024
* fix: Fix Annotated + strawberry.lazy + deferred annotations Fix #3491 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
When using
Annotated[..., strawberry.lazy(...)]
, one seems to get spurious errors in a file withfrom __future__ import annotations
:Running that like
python example.py
with strawberry 0.277.3 gives errors like:Standalone reproducer (run like
bash ./script.sh
):System Information
Additional Context
Thank you for strawberry! 🍓
This seems a bit similar to:
Annotated
when used alongside Info #2607Info
and future annotations? #2855Upvote & Fund
The text was updated successfully, but these errors were encountered: