commerce/lib/shopify/queries/metaobject.ts
Chloe a077bbe753
fix: improve MMY filters
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
2024-07-05 10:59:50 +07:00

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
}
}
}
`;