Getting error - After upgrading rails from 5.2.8 to 6.1.7
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.
I would start by adding appraisals (tests) so we can run tests with various versions of Rails.
the same on rails 7
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.