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

Add warnings when adding properties without any type hint #1312

Open
patrick91 opened this issue Oct 6, 2021 · 0 comments
Open

Add warnings when adding properties without any type hint #1312

patrick91 opened this issue Oct 6, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@patrick91
Copy link
Member

patrick91 commented Oct 6, 2021

The code below works fine but it might not be what the user expects, maybe abc was supposed to be a string on the type.

@strawberry.type
class SomethingSomething:
    id: strawberry.ID
    abc = str

we should raise a warning when we see something like this (if possible).

The warning should mention to add the type and also that the user can use strawberry.Private if they want to have a property that's not exposed on the schema

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.
Fund with Polar
@marcoacierno marcoacierno added the enhancement New feature or request label Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants