-
Notifications
You must be signed in to change notification settings - Fork 81
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
Expose RemixRestClient and GraphQLClient types for @shopify/shopify-app-remix #633
Comments
Hi @geongeorge, thank you for opening this issue. I've put it in the backlog so that my team can consider it. |
Hi @matteodepalo Because module resolution is not node in the remix app, I'm not able to import types for shopify resources as well from the api. I cannot get the Theme, Product, Etc type from this package as well. export async function getJobs(shopName: string, themes: Theme) {
...
} |
I managed to extract the types from the shopify.server.ts file like so. Using it in our custom starter: /* Getting types */
export type AdminMain = Awaited<ReturnType<typeof authenticate.admin>>;
export type AdminApiContext = AdminMain["admin"];
export type AdminApiSession = AdminMain["session"];
export type AdminGraphqlClient = AdminApiContext["graphql"];
export type AdminRestClient = AdminApiContext["rest"]; |
We're labeling this issue as stale because there hasn't been any activity on it for 60 days. While the issue will stay open and we hope to resolve it, this helps us prioritize community requests. You can add a comment to remove the label if it's still relevant, and we can re-evaluate it. |
This has been very frustrating. I was trying to adapt your starter QRCode example from JavaScript to TypeScript, and it means I need types that simply are not exposed from the package. https://shopify.dev/docs/apps/getting-started/build-qr-code-app |
Overview/summary
I want to pass my admin rest or graphql api client in a seperate server file in remix js. But the types are not exposed.
I want to do something like this in another file but I do not see any export from the library for
RestClient
orGraphqlClients
Note
If this is a generic type which is generated when running
shopifyApp({..})
It will be also great if this can be accessed through the returned object so I can reexport from theshopify.server.ts
fileThe text was updated successfully, but these errors were encountered: