mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
.github
.vscode
app
components
fonts
hooks
lib
shopify
fragments
mutations
queries
cart.ts
collection.ts
menu.ts
metaobject.ts
node.ts
page.ts
product.ts
index.ts
types.ts
constants.ts
styles.ts
type-guards.ts
utils.ts
public
.env.example
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
README.md
license.md
next.config.js
package.json
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
35 lines
581 B
TypeScript
35 lines
581 B
TypeScript
export const getImageQuery = /* GraphQL */ `
|
|
query getImage($id: ID!) {
|
|
node(id: $id) {
|
|
... on MediaImage {
|
|
image {
|
|
altText
|
|
width
|
|
height
|
|
url
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getMetaobjectsByIdsQuery = /* GraphQL */ `
|
|
query getMetaobjectsByIds($ids: [ID!]!) {
|
|
nodes(ids: $ids) {
|
|
... on Metaobject {
|
|
id
|
|
type
|
|
fields {
|
|
reference {
|
|
... on Metaobject {
|
|
id
|
|
}
|
|
}
|
|
key
|
|
value
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|