镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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. self-assigned this
    on Apr 26, 2020
  2. changed the title [-]Implement asyncio version of dataloader[/-] [+]Update dataloader docs to use aiodataloader[/+] on Apr 26, 2020
  3. 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.

  4. removed their assignment
    on Nov 11, 2020
  5. 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

  6. 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions