graphlient icon indicating copy to clipboard operation
graphlient copied to clipboard

Getting error - After upgrading rails from 5.2.8 to 6.1.7

Open sunil-lakshman opened this issue 2 years ago • 3 comments

Hi.. Team,

After upgrading rails from 5.2.8 to 6.1.7, graphlient gem throwing an error.

Error: graphql-client (0.18.0) lib/graphql/client/query_typename.rb:28:in `add_typename'

Note: Same code working fine In rails 5.

sunil-lakshman avatar Nov 29 '23 13:11 sunil-lakshman

I would start by adding appraisals (tests) so we can run tests with various versions of Rails.

dblock avatar Nov 29 '23 22:11 dblock

the same on rails 7

yurgon avatar Jan 18 '24 11:01 yurgon

IMO looks like a graphql-client issue, since that is where the exception is thrown:

Error: graphql-client (0.18.0) lib/graphql/client/query_typename.rb:28:in `add_typename'

TL;DR I'm guessing that the version of the graphql library you were using was upgraded to a version that didn't work with graphql-client <= v0.18.0.

Have you tried v0.19.0 or v0.20.0? graphql-client relies on graphql, and there was an issue where it didn't support the latest version of graphql and users had to manually pin the version of graphql used in their Gemfile. This has been fixed in 0.19.0 and 0.20.0 and I'm guessing resolves your issue.

Samsinite avatar Mar 05 '24 17:03 Samsinite