Closed tasiotas closed 6 months ago
Hey @tasiotas ,
I wrote this test to try to replicate your issue: https://github.com/strawberry-graphql/strawberry-django/commit/5757a20b525b8216bd1fc5ceced048a9be378f8f
The test seems to be passing fine.
Is there anything different that you are doing? If so, can you help me to reproduce the issue?
Hi,
Thank you for adding tests and confirming that its all good on your end. During preparation of repro I found an issue in my code.
self.purchases
in field's resolver was returning List
of objects, instead of QuerySet
. New filters just quietly ignore it without any error, so I was confused why filters are not being triggered at all.
@strawberry.django.connection(ListConnectionWithTotalCount[SaleType], filters=PurchaseFilter)
def purchases(self) -> List["SaleType"]:
print("getting purchases")
return self.purchases
My bad, thanks!
version 0.35
I am migrating to new Filtering and Ordering, so far so good (Type's filter/order) but now I reached relay connections and cannot get Custom Resolver working.
When I guery
purchases
, custom resolver'ssearch
function never gets called. I can see filters showing up properly in the schema via graphiql.Am I doing something wrong when defining Filter on ListConnection?
thank you
Upvote & Fund