drop into a rails console, where we have an installed shop with full tokens.
shop = Shop.first
shop.with_shopify_session do
ShopifyAPI::Product.count
end
==> NameError: uninitialized constant ShopifyAPI::Product
So a quick call on ShopifyAPI.constants shows a super small subset of the 87 I might get with other App installs. This tells me when I am dropping into Rails console, it is somehow not loading the Shopify API correctly? Huh? How is that a thing?
So this pattern has worked and continues to work in all my old projects, but in this new one, something changed and now the Resource style is pooched? I am a little confused. As an interesting contrast, the long-winded approach does work, proving the console is loading the API module somewhat, just not all the resources.
shop.with_shopify_session do |session|
client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
client.get(path: "webhooks")
end
=> #<ShopifyAPI::Clients::HttpResponse:0x0000000111537bd8
Shopify App Version: 21.6.0
drop into a rails console, where we have an installed shop with full tokens.
So a quick call on ShopifyAPI.constants shows a super small subset of the 87 I might get with other App installs. This tells me when I am dropping into Rails console, it is somehow not loading the Shopify API correctly? Huh? How is that a thing?
So this pattern has worked and continues to work in all my old projects, but in this new one, something changed and now the Resource style is pooched? I am a little confused. As an interesting contrast, the long-winded approach does work, proving the console is loading the API module somewhat, just not all the resources.