kirillplatonov / shopify_graphql

Less painful way to work with Shopify Graphql API in Ruby.
MIT License
63 stars 9 forks source link

undefined method `delegate' for class #<Class:ShopifyGraphql> #40

Open thomaswitt opened 4 months ago

thomaswitt commented 4 months ago

Wanted to try the gem and installed it, then calling it straight from irb, getting the following error:

thomas@Mac:~/Dev/misc/ $ ruby -v
ruby 3.3.1 (2024-04-23 revision c56cd86388) [arm64-darwin23]
thomas@Mac:~/Dev/misc/ $ irb
>> require 'shopify_graphql'
/Users/thomas/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/shopify_graphql-1.2.5/lib/shopify_graphql/client.rb:92:in `singleton class': undefined method `delegate' for class #<Class:ShopifyGraphql> (NoMethodError)

    delegate :execute, :handle_user_errors, to: :client
    ^^^^^^^^
Did you mean?  DelegateClass
    from /Users/thomas/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/shopify_graphql-1.2.5/lib/shopify_graphql/client.rb:91:in `<module:ShopifyGraphql>'
kirillplatonov commented 4 months ago

I will take a look at that. For now you can try it by adding gem into Rails app and calling it from rails console.