graphene-django icon indicating copy to clipboard operation
graphene-django copied to clipboard

Bugfix: call `resolver` function in `DjangoConnectionField` as documented

Open PoByBolek opened this issue 1 year ago • 2 comments

This fixes a bug in that DjangoConnectionField doesn't call its resolver function despite it being documented in the Graphene docs: "Resolvers outside the class".

# currently, this will never be called :(
def resolve_ships(root, info):
    return [ShipModel()]

class Query(ObjectType):
    ships = DjangoConnectionField(Ship, resolver=resolve_ships)

I also fixed some warnings and running the tests now treats warnings as errors. But I really only care about c127aec75b33617b8eb10c84fb0733654ce70bf3 here 😄

PoByBolek avatar Jul 04 '24 11:07 PoByBolek

I just noticed that this is basically a duplicate of #1513 :sweat_smile:

PoByBolek avatar Jul 08 '24 09:07 PoByBolek

@sjdemartini @kiendang any thoughts on this?

PoByBolek avatar Aug 06 '24 19:08 PoByBolek