This method determines if the given version is compatible (equal to or newer) with the configured apiVersion
for the shopifyApi
object.
Its main use is when you want to tweak behaviour depending on your current API version, though apps won't typically need this kind of check.
const shopify = shopifyApi({
apiVersion: ApiVersion.July22,
});
if (shopify.utils.versionCompatible(ApiVersion.January22)) {
// true in this example, as ApiVersion.July22 is newer than ApiVersion.January22
}
ApiVersion
| ❗ required
The API version to check against.
boolean
Whether the version is compatible.