mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 11:41:23 +00:00
.github
.vscode
app
components
contexts
fonts
hooks
lib
shopify
fragments
mutations
queries
cart.ts
collection.ts
customer.ts
menu.ts
metaobject.ts
node.ts
order.ts
orders.ts
page.ts
product.ts
auth.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
middleware.ts
next.config.js
package.json
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
67 lines
1.2 KiB
TypeScript
67 lines
1.2 KiB
TypeScript
export const getMetaobjectsQuery = /* GraphQL */ `
|
|
query getMetaobjects($type: String!, $after: String) {
|
|
metaobjects(type: $type, first: 200, after: $after) {
|
|
edges {
|
|
node {
|
|
id
|
|
type
|
|
fields {
|
|
reference {
|
|
... on Metaobject {
|
|
id
|
|
}
|
|
}
|
|
key
|
|
value
|
|
}
|
|
}
|
|
}
|
|
pageInfo {
|
|
hasNextPage
|
|
endCursor
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getMetaobjectQuery = /* GraphQL */ `
|
|
query getMetaobject($id: ID, $handle: MetaobjectHandleInput) {
|
|
metaobject(id: $id, handle: $handle) {
|
|
id
|
|
type
|
|
fields {
|
|
reference {
|
|
... on Metaobject {
|
|
id
|
|
}
|
|
}
|
|
key
|
|
value
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const getOrderConfirmationQuery = /* GraphQL */ `
|
|
query getOrderConfirmation($handle: MetaobjectHandleInput) {
|
|
metaobject(handle: $handle) {
|
|
id
|
|
type
|
|
fields {
|
|
reference {
|
|
... on MediaImage {
|
|
image {
|
|
url
|
|
altText
|
|
height
|
|
width
|
|
}
|
|
}
|
|
}
|
|
key
|
|
value
|
|
}
|
|
}
|
|
}
|
|
`;
|