ashkan18 / graphlient

Ruby GraphQL Client
MIT License
251 stars 44 forks source link

Latest version incompatible with faraday 1.0.0 #73

Closed nielsjansendk closed 4 years ago

nielsjansendk commented 4 years ago

Using graphlient 3.7 with Faraday 1.0.0 results in the following error:

RuntimeError (Adapter should be set using theadaptermethod, notuse)

It is likely this problem: https://stackoverflow.com/questions/58162859/upgrading-faraday-gem-runtimeerror-adapter-should-be-set-using-the-adapter-m that happens with faraday versions higher than 0.15.4

As far as I can tell from the source code of graphlient, the faraday adapter is set using the "use" method (here: https://github.com/ashkan18/graphlient/blob/0b36f9fc30fc290de98e67d9313b5f3d2681288f/lib/graphlient/adapters/http/faraday_adapter.rb). If my undestanding of the problem is correct, this will need to change to be compatible with Faraday 1.0.0 .

dblock commented 4 years ago

Thanks for bringing this up. Try fixing it?

nielsjansendk commented 4 years ago

@dblock It doesn't seem like Faraday can be upgraded in development. I tried to clone and force faraday to be version 1.0.0, but the gem danger-changelog is not compatible. And that gem has not been updated since faraday 1.0.0. I'm not confident enough to try to figure out a solution to that one, if it was just a question of changing the word "use" with the word "adapter" I can do that, but this seems a bit more complicated.

ashkan18 commented 4 years ago

thanks @nielsjansendk i can try look at this. Thanks for reporting 💜

theendcomplete commented 4 years ago

@dblock It doesn't seem like Faraday can be upgraded in development. I tried to clone and force faraday to be version 1.0.0, but the gem danger-changelog is not compatible. And that gem has not been updated since faraday 1.0.0. I'm not confident enough to try to figure out a solution to that one, if it was just a question of changing the word "use" with the word "adapter" I can do that, but this seems a bit more complicated.

I've tried to just change word "use" with the word "adapter" and it works, but not in every case :(

micahbf commented 4 years ago

I see the fix for this was merged to master, any chance a version could be released with this fix?

ashkan18 commented 4 years ago

sure, good reminder! I can release a new version in a bit.

micahbf commented 4 years ago

Awesome, thank you!

ashkan18 commented 4 years ago

Just released the new version 0.4.0