diff --git a/server/src/shopify/inventory.ts b/server/src/shopify/inventory.ts index e8af1d4..ea3d4ff 100644 --- a/server/src/shopify/inventory.ts +++ b/server/src/shopify/inventory.ts @@ -111,7 +111,7 @@ export async function getProductInventoryLocation ( productId: string ): Promise { const { data, errors } = await client.request(getProductLocationsQuery, { - id: productId + id: `gid://shopify/Product/${productId}` }) as { data: Record, errors: unknown } if (errors != null) { diff --git a/shared/src/model/inventory.model.ts b/shared/src/model/inventory.model.ts index 9932b7d..4d28511 100644 --- a/shared/src/model/inventory.model.ts +++ b/shared/src/model/inventory.model.ts @@ -19,6 +19,7 @@ export const VariantInventoryItemSchema = Type.Object({ export type VariantInventoryItem = Static export const UpdateInventoryRequestSchema = Type.Object({ + // This productId is in the form of a raw number(as a string) like 7507889357006, not wrapped in a shopify gid url productId: Type.Optional(Type.String()), variantId: Type.Optional(Type.String()), locationId: Type.Optional(Type.String()),