graphql-client
graphql-client copied to clipboard
Correct error message when providing wrong type of query
GraphQL::Client is raising a TypeError when definition isn't a OperationDefinition.
However, error message was using a definition.class.name as info what was provided - which was always equal to GraphQL::Language::Nodes::Document.
This commit fixes that and outputs real type of query provided in the error message.