Open Cimmanuel opened 4 years ago
Can you give an the model and/or a query example ?
Looks like in the try, you’re not returning the result, so it’s just moving along and returning the all call at the end. Just return the result.
What do you mean "return the result"? Kindly demonstrate with a snippet
Perso I use a Filterset
for filtering:
class Query(object):
provider_app = DjangoFilterPaginateListField(
AppointmentType,
filterset_class=filtersets.AppointmentFilterSet,
pagination=LimitOffsetGraphqlPagination(default_limit=100)
)
@ZuluPro this still gives the same issue
And what is your filterset ?
class AppType(DjangoObjectType):
class Meta:
model = Appointment
filter_fields = {
'id': ('exact',),
'date': ('exact',),
'status': ('exact',)
}
@ZuluPro I think you are missing the point. Filtering via configured filterset works fine. The problem is with filtering via the supplied argument. Please check the resolver method again.
I'm facing the same issue, its due to custom resolver being ignored when using DjangoFilterPaginateListField
as described in https://github.com/eamigo86/graphene-django-extras/issues/56
DjangoFilterPaginateListField simply returns
manager.all()
and ignores all parameters passed to the field. For instance, l have the following:Instead of getting results related to the id supplied, I simply get
Model.objects.all()
. How do I solve this?