Skip to content

Breaks due to changes in graphql 2.3.5Β #27

@eizengan

Description

@eizengan

After updating dependencies in a project using this gem we have begun to see failures during query parsing:

Caused by NoMethodError: undefined method 'map' for nil
from...gems/graphql-client-0.22.0/lib/graphql/client/schema/interface_type.rb:24:in `define_class'

At a(n uninformed) glance, this appears to be somehow related to graphql 2.3.5 switching from string-based to class-based keys here:

Using graphql 2.3.4

[3] pry(#<Module:0x00000001363208c0>::Actor)> definition.client.possible_types
=> {"__Schema"=>[#<Class:0x000000012ff71680>],
   "__Type"=>[#<Class:0x000000012ff71360>],
   "__Field"=>[#<Class:0x000000012ff71040>],
   "__Directive"=>[#<Class:0x000000012ff70d20>],
   ...

Using graphql 2.3.5:

[2] pry(#<Module:0x00000001363208c0>::Actor)> definition.client.possible_types
=> {#<Class:0x0000000136325640>=>[#<Class:0x0000000136325640>],
 #<Class:0x0000000136325280>=>[#<Class:0x0000000136325280>],
 #<Class:0x0000000136324f60>=>[#<Class:0x0000000136324f60>],
 #<Class:0x0000000136324c40>=>[#<Class:0x0000000136324c40>],
 #<Class:0x0000000136324920>=>[#<Class:0x0000000136324920>],

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