diff --git a/lib/graphql/client.rb b/lib/graphql/client.rb index ee5eddf..f064ca2 100644 --- a/lib/graphql/client.rb +++ b/lib/graphql/client.rb @@ -100,6 +100,11 @@ def initialize(schema:, execute: nil, enforce_collocated_callers: false, raise_o @enforce_collocated_callers = enforce_collocated_callers if schema.is_a?(Class) @possible_types = schema.possible_types + key, _types = @possible_types.first + # GraphQL-Ruby 2.3.5+ has classes here instead of strings + if key.is_a?(Module) + @possible_types = @possible_types.transform_keys(&:graphql_name) + end end @types = Schema.generate(@schema, raise_on_unknown_enum_value: raise_on_unknown_enum_value) end