shopify_graphql icon indicating copy to clipboard operation
shopify_graphql copied to clipboard

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

Open thomaswitt opened this issue 1 year ago • 1 comments

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>'

thomaswitt avatar Jun 03 '24 07:06 thomaswitt

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.

kirillplatonov avatar Jun 03 '24 08:06 kirillplatonov

@kirillplatonov has this been fixed in a commit or is it just closed?

thomaswitt avatar Oct 14 '24 07:10 thomaswitt

@thomaswitt Fixed in #48. I'm gonna publish new version shortly.

kirillplatonov avatar Oct 15 '24 20:10 kirillplatonov