-
Notifications
You must be signed in to change notification settings - Fork 766
Closed
Labels
Description
On a project of mine I noticed this unexpected behavior:
Using graphene_django with graphene.relay converts IntegrierFields of my models to graphene.Float properties in the API, e.g.:
class Incident(models.Model):
incident_id = models.IntegerField(unique=True)
class IncidentType(graphene_django.types.DjangoObjectType):
class Meta:
model = Incident
interfaces = (graphene.relay.Node,)
filter_fields = {
'incident_id': ['exact'],
}
class Query:
incident = graphene.relay.Node.Field(IncidentType)
incidents = DjangoFilterConnectionField(IncidentType)To be precise, using the incident attribute shows the incidentId to be of type Int. But using the incidents attribute suggests that incidentId is of type Float.
I'd like to point out, that there is no error occurring, but it strikes me as weird.
I observed this with:
- Django 2.2
- django-filter 2.1.0
- graphene 2.1.3
- graphene-django 2.2.0
- graphql-core 2.1
- graphql-relay 0.4.5