Skip to content

Add warnings when adding properties without any type hint #1312

Open
@patrick91

Description

@patrick91

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions