Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to solve n 1 problem in railt? #191

Open
videni opened this issue May 21, 2020 · 1 comment
Open

how to solve n 1 problem in railt? #191

videni opened this issue May 21, 2020 · 1 comment

Comments

@videni
Copy link

videni commented May 21, 2020

I'd like to use the Deffer feature of webonyx, how can i do this in rait?

<?php
'resolve' => function($blogStory) {
    MyUserBuffer::add($blogStory['authorId']);

    return new GraphQL\Deferred(function () use ($blogStory) {
        MyUserBuffer::loadBuffered();
        return MyUserBuffer::get($blogStory['authorId']);
    });
}

solving-n1-problem

@SerafimArts
Copy link
Member

As you like, access to information about the environment is in the Input instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants