Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict between importing from LATEST_API_VERSION and 2023-04 #1279

Closed
its-anas opened this issue Jun 10, 2023 · 1 comment
Closed

Conflict between importing from LATEST_API_VERSION and 2023-04 #1279

its-anas opened this issue Jun 10, 2023 · 1 comment

Comments

@its-anas
Copy link

its-anas commented Jun 10, 2023

I believe restResources import should be dynamic just like the first import that uses LATEST_API_VERSION, otherwise it may cause a conflict one day.

import { BillingInterval, LATEST_API_VERSION } from "@shopify/shopify-api";
import { shopifyApp } from "@shopify/shopify-app-express";
import { SQLiteSessionStorage } from "@shopify/shopify-app-session-storage-sqlite";
import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";

@paulomarg
Copy link
Collaborator

That's a fair point, but if we make this a dynamic import we will lose intellisense on e.g. VSCode, which makes it a lot more difficult to use the resources.

If they ever fall out of sync, that won't break anything - it will just log a message reminding the developer that they should update their import statement, but it will continue to use 2023-04 for the resources so the code will continue to work the same way until the app is ready to be migrated.

Since this is working as intended, I'll close the issue. Please do report to us if this ever causes any problems while developing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants