All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and adheres to Semantic Versioning.
- [Patch] Auto-detect session type in auth callback, deprecate
isOnline
argument #628 - [Patch] Removed callback URL path check from webhook processing #629
- [Patch] Pass api version to webhook handlers #630
⚠️ [Breaking] Major overhaul ofShopify/shopify-api-node
, which is a complete breaking change across all surfaces of the library. See the migration guide for instructions on how to update your app.
- [Minor] Pass webhook id to handlers #606
- Added support for the
2022-10
API version #535
- Increased tolerance for expired JWT session tokens from 5s to 10s #462
- Add support for billing to the library #449
- Allow dynamically typing the body of REST and GraphQL request responses, so callers don't need to cast it #447
- Rather than create a temporary session in order to store a session id in a cookie for the OAuth transaction, we can store the
state
in the cookie instead, that can then be compared against thestate
provided by Shopify in the callback. #438
- Make
sanitizeHost
validation more flexible #446
⚠️ [Breaking] If a response from a GraphQL query contains anerrors
attribute,GraphqlClient
will now throw aGraphqlQueryError
. The caller can check theerror.response
attribute to see what was returned from the GraphQL API. #431⚠️ [Breaking] Add utils functions to sanitize shops and hosts, and remove thevalidateShop
utils function #434- Allow passing in options for the Redis client used by the session storage strategy #430
- Fix User-Agent header sent in PUT / POST requests #435
- Return a 401 instead of 403 when webhooks fail validation #425
- Add optional new methods
deleteSession
andfindSessionsByShop
toSessionStorage
, with the corresponding implementations for the various session storage adapters #418 - Include subset of query body in API deprecation logs #426
- Add new method to construct the host app URL #419
⚠️ [Breaking] Add REST resources for July 2022 API version, addLATEST_API_VERSION
constant, remove support and REST resources for July 2021 (2021-07
) API version #415- Add support for July 2022 API version #409
- Fix a bug where the PostgreSQL session storage always attempted to create the sessions table #413
- Return instances of
Session
from session storages, not POJOs.
- Store user id and expiration date of online tokens
- Properly parse a non-json HTTP response #257
- Don’t create a SQLite DB file if the SQLite storage is not used.
- Support for specifying the URI scheme of the host #385
- Add optional
saving
parameter toserialize
ofBase
class - default isfalse
and will include read-only attributes in returned object;true
used forsave
when committing via API to Shopify.
- Fixes #363
- Webhooks
register
now checks for any attempt to register a GDPR topic (not done via API but by Partner Dashboard), provides an error message in response - For topics that don't exist,
register
checks the response from the initial API call for anerrors
field and returns accordingly
- Webhooks
- Allow REST resources to configure a deny list of attributes to be excluded when saving #355
⚠️ [Breaking] Removing API version2021-04
#343⚠️ [Breaking] TheHttpResponseError
error and its flavours (all returned from HTTP requests) have been slightly altered:- They now take in a hash of values, and will always include the response code, body (as a string if the response is not JSON), and headers
- All response fields are now contained within a
response
object, to make it easier to access them
⚠️ [Breaking] Update supported Admin API versions #310- Allow full paths in REST requests #301
-
⚠️ [Breaking] Stop responding to the request in the GraphQL Proxy function, returning Shopify's response instead #312The examples below are in express; you will now need to handle the response yourself.
Before:
app.post('/graphql', async (req, res) => { await Shopify.Utils.graphqlProxy(req, res); });
After:
app.post('/graphql', async (req, res) => { const response = await Shopify.Utils.graphqlProxy(req, res); res.status(200).send(response.body); });
- Add support for January 2022 API version #285
- Add a 5 second
clockTolerance
to fixjwt not active
error #227 ⚠️ [Breaking] Change default for OAuth.beginAuth to online sessions #203- see oauth.md for updated docs
⚠️ [Breaking] Return and delete session invalidateAuthCallback
#217- see oauth.md for updated usage
⚠️ [Breaking] ExtractaddHandler
andgetHandler
methods for webhooks out ofregister
#205⚠️ [Breaking] Sessions no longer default tofalse
forisOnline
#169- Required
Session
arguments must be passed to the constructor #169 - Allow
undefined
inAuthScopes
#169
- Fixed the HTTP client error messages to expand objects #252
- Added
October21
toApiVersion
#247
- Don't include extra params when calculating local hmac #196
- Added Storefront API client under
Shopify.Clients.Storefront
- Add
isActive()
method toSession
class to check if session is active, replaceSession
withSessionInterface
when used as a type #153
- Added
April21
toApiVersion
#149
- Allow plain objects to be returned from the
loadCallback
onCustomSessionStorage
#126 - Documentation and example code for
CustomSessionStorage
#129
- Throw a different error for a missing cookie upon OAuth return #131
- Improved documentation for GraphQL and Rest Clients. #123
- Made Docs directory more browseable in GitHub. #136
- Make sure
CustomSessionStorage
converts theexpires
field from a string toDate
. #132 - Made
limit
optional for get-requests with query #135
- Minor text/doc changes
- Added
2021-01
API version to enum. #117 - Allow retrieving offline sessions using
loadCurrentSession
. #119
- Initial public release
- Added
AuthScopes
value object to allow apps to easily check whether scopes have been updated. #110
- GraphQL Proxy attempts to parse the request body as JSON before passing it to the client. #106
- Webhooks types are now exported outside the library #91
- Added support for private apps #99
USER_AGENT_PREFIX
added to Context, to add agent to all requests #101- Add link to tutorial on how to rotate credentials if neccesary #107
- Export
withSession
utility method #96 - GraphQL Client appropriately handles queries with variables #97
- Use cryptographically random bytes to generate nonce #98
- Stop using
SameSite=none
cookies for OAuth, usinglax
instead #100
- Fixed an issue when deleting the current session for embedded apps #88
- Add
withSession
utility method #83
- Preserve the OAuth cookie session for a few seconds so SPA can perform their initial load using it #70
- Session fetches now return
undefined
when a session is not available #64 - Add
deleteCurrentSession
utils method #60
- Beta release
- Test releasing scripts
- Start of Changelog