Skip to content

[Question] AMPHP Async + Deferred Example? #1353

Description

@dominikmebs

Hello together,

probably a simple/silly question but how to connect AMPHP Async + deferred/dataloader?
I provided a example where the function "call" get used in the revolvers:

resolve' => function () {
    return call(function () {
        ....
    });
});

How can this be written with the "data loader pattern":

resolve' => function () {
    // add id to a data-loader
    return call(function () {
         // fetch in bulk from data-loader
    });
});

Currently the callback get executed immediately (not like GraphQL\Deferred which waited for all resolvers)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions