diff --git a/lib/graphql/client.rb b/lib/graphql/client.rb index 46b25d7..f6e3650 100644 --- a/lib/graphql/client.rb +++ b/lib/graphql/client.rb @@ -48,6 +48,8 @@ module GraphQL case schema when GraphQL::Schema schema + when GraphQL::Query::Result + load_schema(schema.to_h) when Hash GraphQL::Schema::Loader.load(schema) when String @@ -73,7 +75,7 @@ module GraphQL operation_name: "IntrospectionQuery", variables: {}, context: {} - ) + ).to_h if io io = File.open(io, "w") if io.is_a?(String)