Skip to content

Don't know how to convert the Pydantic field AnyUrl #102

Open
@konnerthg

Description

I am trying to use pydantic's AnyUrl type:

class SomePydanticModel(pydantic.BaseModel):
    url: pydantic.AnyUrl = pydantic.Field()

class SomeGrapheneObject(graphene_pydantic.PydanticObjectType):
    class Meta:
        model = SomePydanticModel

But I receive the following error:

graphene_pydantic.converters.ConversionError: Don't know how to convert the Pydantic field FieldInfo(annotation=Url, required=True) (<class 'pydantic_core._pydantic_core.Url'>)

Is there a way to support this field?

graphene==3.3
graphene-pydantic==0.6.1

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions