Skip to content

DataLoaders with Graphene 3 #1390

@MaehMaeh

Description

@MaehMaeh

This is a duplication of:
graphql-python/graphene-django#1272

I have implemented the DataLoaders in Graphene 2 using these instructions:
https://jerrynsh.com/solving-n-1-in-graphql-python-with-dataloader/

After upgrading to Graphene 3, the DataLoaders no longer works. Now I get the following error messages:

  • Case 1: Fetch a list of Articles for each Reporter (reporters -> articles)
    Received incompatible instance \"<Promise at 0x5ddcef8 fulfilled with Reporter(id=1)>\".
  • Case 2: Fetch a single Reporter for each Article (articles ? reporter)
    Cannot return null for non-nullable field ArticleConnection.edges.

Has anyone had any experience with DataLoaders under Graphene 3?

My environment:
django 3.2.7
graphene 3.0
graphql-core 3.1.6
graphql-relay 3.1.0
graphene-django 3.0.0b
Python 3.8
Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions