Closed
Description
I have
class ContentNode(DjangoObjectType):
class Meta:
model = Content
only_fields = ('id', 'title')
filter_fields = ['id', 'title']
In a schema:
content_list = DjangoFilterConnectionField(ContentNode)
However, query
{
content_list(first: 1) {
edges {
node {
id
title
}
}
}
__debug {
sql {
raw_sql
}
}
}
will show that all table fields are being fetched, not just id & title.
THere's a workaround - a resolver with .only('id', 'title')
will give the desired result, but from what I understand 'only_fields` should be enough.
Any help is appreciated!
D.
My requirements:
Django==1.10.4
git+https://github.com/graphql-python/graphene-django.git#egg=graphene-django
django-filter==1.0.4