Shopify / shopify-api-ruby

ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.
MIT License
1.06k stars 473 forks source link

eject session storage #1155

Closed nelsonwittwer closed 1 year ago

nelsonwittwer commented 1 year ago

Description

Removes session storage from API library. This feature was deprecated in https://github.com/Shopify/shopify-api-ruby/pull/1055. It was decided that session persistance is best handled by shopify_app gem.

As part of rejecting session storage, we needed to refactor GraphQLProxy#proxy_query to pass in a session instead of reading it from cookie / header.

How has this been tested?

In addition to the automated testing, this branch was pointed at with a generated app from the CLI. Was able to install the app on a store, and uninstall the app a store. Was able to make API calls.

Checklist:

jaredbeck commented 1 year ago

[ ShopifyAPI | WARN ] The use of SessionStorage in the API library has been deprecated. The ShopifyAPI will no longer have responsibility for session persistence. Upgrading to shopify_app 21.3 will allow you to remove session_storage from the API library Context configuration.

Please confirm that there are exactly two upgrade steps:

  1. upgrade shopify_app to 21.3
  2. remove session_storage from ShopifyAPI::Context.setup

Are any other changes necessary? Thanks.

mattsrobot commented 1 year ago

@jaredbeck did you find any solution? I'm lost.

jaredbeck commented 1 year ago

@jaredbeck did you find any solution? I'm lost.

I asked my Shopify Support contact, and received the following response:

From what our engineers have explained, removing session_storage from your API context block in the initializer, will [be sufficient].