graphql-client
graphql-client copied to clipboard
Raise QueryError instead of KeyError in GraphQL::Client#dump_schema
Hi, When the introcspection endpoint returns a 404 GraphQL::Client#dump_schema raises a KeyError.
This pull request reuses the error-handling from GraphQL::Client#query in dump_schema to properly handle errors. If an error is detected dump_schema raises a QueryError now.
Could you please merge into into master? This PR replaces an earlier one which had a merge conflict.
Regards Jorg
Please accept/reject or comment on my PR. I would like to eliminate my cloned repo/gem soon. Thanks! If it's unlikely you'll accept my PR please say so.
@arthurschreiber ,
I think @Enceradeira has got a valid point there. Would you mind checking his PR?
Kind regards, Reureu