graphql-client
graphql-client copied to clipboard
Ruby version requirement incorrect
The only place I could find a ruby version requirement for this gem was in the gemspec:
https://github.com/github/graphql-client/blob/master/graphql-client.gemspec#L23
This implies the constraint is >= 2.1.0, which seems to be false. It looks like Travis is only testing 2.3+, which I think is a good actual lower bound. I'm stuck in one project on 2.2, which errors (at least) here:
https://github.com/github/graphql-client/blame/master/lib/graphql/client/schema/enum_type.rb#L52
Side note - this kinda stuff is pretty hard to discover quickly without a changelog, that would be pretty sweet to add going forward.
Thanks!
However unlikely that somebody else is in the same boat, these constraints seem to work with ruby 2.2.10 so far:
gem 'graphql', '< 1.9.9'
gem 'graphql-client', '~> 0.12.2
Nope. I just passed my pain threshold for getting this working. HTTP POST FTW.
Welp, 2.3 and 2.4 support has just been dropped between 0.15 and 0.16 and there's no hint in release notes.
Also, I'm running into an issue where I get the following error while running ruby 2.3.7:
'NoMethodError: undefined method `match?' for /\A[A-Z]/:Regexp'
Apparently 'match?' is only available in ruby 2.4 and above, so it seems like at a minimum this gem requires ruby 2.4, unless there is some way to get around this error?
Yes, that's the error I was referring to.
+100 for this.
In Ruby 2.2.2 I get this error:
gems/graphql-client-0.15.0/lib/graphql/client/schema/enum_type.rb:52:in `block in initialize': undefined method `-@' for "array":String (NoMethodError)
I'm not advocating for changes to be made, only for the Ruby requirement to be fixed that way I don't have to hunt through the source and figure out what is and is not supported.
I think in this case all versions 0.14.0 and higher should be yanked and updated with the correct Ruby requirement set.
+1 it would be nice to know what versions of ruby this gem supports.
I'm trying to use it on an app on 2.2.5 and am also getting the error that @flynn1982 referenced.