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

preload_scope on relationship already loaded is skipped #19

Open
ngouy opened this issue Mar 19, 2019 · 0 comments
Open

preload_scope on relationship already loaded is skipped #19

ngouy opened this issue Mar 19, 2019 · 0 comments

Comments

@ngouy
Copy link

ngouy commented Mar 19, 2019

Not sure it's a bug
Working with rails 5.2, and graphql 9.3

Question have_many Answers.
Answers can be ordered, and I am using preload_scope: ->(_, _) { Answer.ordered } into the QuestionType's answers field to have them ordered when resolving a question.

But because I am already "using" (loading) them into my question resolver, when resolving it (the question), the preload_scope is skipped.
Unless I am using question.reload in order to clear my question's answers cache.

Is it the desired behaviour ?

@ngouy ngouy changed the title preload_scope on relationship already loaded preload_scope on relationship already loaded is skipped Mar 19, 2019
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

1 participant