commerce/lib/shopify/queries/metaobject.ts
2024-06-28 18:21:44 +03:00

48 lines
880 B
TypeScript

export const getMetaobjectsQuery = /* GraphQL */ `
query getMetaobjects($type: String!) {
metaobjects(type: $type, first: 200) {
edges {
node {
id
type
fields {
reference {
... on Metaobject {
id
}
}
key
value
}
}
}
}
}
`;
export const getMetaobjectQuery = /* GraphQL */ `
query getMetaobject($id: ID, $handle: MetaobjectHandleInput) {
metaobject(id: $id, handle: $handle) {
id
type
fields {
reference {
... on Metaobject {
id
}
... on MediaImage {
image {
url
altText
height
width
}
}
}
key
value
}
}
}
`;