graphene-django
graphene-django copied to clipboard
Bugfix: call `resolver` function in `DjangoConnectionField` as documented
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 😄
I just noticed that this is basically a duplicate of #1513 :sweat_smile:
@sjdemartini @kiendang any thoughts on this?