Skip to content

preload_scope on relationship already loaded is skipped #19

@ngouy

Description

@ngouy

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 ?

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