Skip to content

Update dataloader docs to use aiodataloader #1189

Closed

Description

@jkimbo

graphql-core dropped support for the Promise library (since asyncio is now the official way to do async code in Python). @syrusakbary has already created an asyncio version of dataloader: https://github.com/syrusakbary/aiodataloader . We should update the documentation.

Activity

  1. added
    3.0
    on Apr 26, 2020
  2. self-assigned this
    on Apr 26, 2020
  3. changed the title [-]Implement asyncio version of dataloader[/-] [+]Update dataloader docs to use aiodataloader[/+] on Apr 26, 2020
  4. nerdstrike commented on May 27, 2020

    @nerdstrike

    Just to note that aiodataloader seems to be unmaintained at this time. I put in a request to remove a deprecated python import months ago and it has gone neglected.

  5. removed their assignment
    on Nov 11, 2020
  6. asia653 commented on Oct 25, 2021

    @asia653
    user1_future = user_loader.load(1)
    user2_future = user_loader.load(2)
    
    user1 = await user1_future
    user2 = await user2_future
    
    user1_invitedby = user_loader.load(user1.invited_by_id)
    user2_invitedby = user_loader.load(user2.invited_by_id)
    
    print("User 1 was invited by", await user1_invitedby)
    print("User 2 was invited by", await user2_invitedby)
    
    

    Is this code in the docs correct? According to the codebase, dataloader returns a Promise that resolves into an array of values, so awaiting the future should return an array with a single value

  7. cpmsmith commented on Apr 18, 2022

    @cpmsmith

    Just to note that aiodataloader seems to be unmaintained at this time. I put in a request to remove a deprecated python import months ago and it has gone neglected.

    Note to onlookers: the PR mentioned here, syrusakbary/aiodataloader#11, has since been merged, and aiodataloader released a version on 2022-01-24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0📖 documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions