graphql-python / graphql-python/graphene-pydantic

Don't know how to convert the Pydantic field AnyUrl

Open
#102 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
249
Forks
47
PR merge metrics
No merged PRs in 30d

Description

I am trying to use pydantic's [AnyUrl](https://docs.pydantic.dev/latest/api/networks/#pydantic.networks.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) ()`

Is there a way to support this field?

graphene==3.3
graphene-pydantic==0.6.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.