graphql-client
graphql-client copied to clipboard
Allow load_schema to accept an IO
dump_schema
accepts IO
objects (Pathname
, StringIO
, etc.) but load_schema
does not.
This results in some surprising behaviour:
schema_cache = Pathname('schema-cache.json')
# This works
GraphQL::Client.dump_schema(..., schema_cache)
# This doesn't, until now
GraphQL::Client.load_schema(schema_cache)
This PR fixes the discrepancy.