Skip to content

Relationships break in ruby-graphql >= 1.9 #12

Open
@ostrgard

Description

@ostrgard

Hi! Love this gem, thanks for creating it!

I've had issues implementing it in a project and isolated it to the fact that we used ruby-graphql >=1.9. Upgrading the root .gemspec and the tester_ar project to 1.9 allowed me to reproduce this.

The relationships are not being added to the queries as they were before. However, relocating the include Graphoid::Queries to the bottom of the model classes (or just below all relationship definitions) will add some of these, depending on the order they're being mapped over by Graphoid::Types. For instance, the User model goes first, and the Graphoid::Queries::LIST is empty, while Account goes last and is able to add User relations due to it being present in LIST by that point.

I've been looking through the ruby-graphql changelog for 1.9.0 and can't really identify some obvious reason for this to break. I checked ruby-graphql 1.8.17 which works as expected.

I'll continue investigating this...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions