mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: implement text/image-with-text/icon-with-text content block
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
33
lib/shopify/queries/node.ts
Normal file
33
lib/shopify/queries/node.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
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
|
||||
fields {
|
||||
reference {
|
||||
... on Metaobject {
|
||||
id
|
||||
}
|
||||
}
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
@@ -19,9 +19,14 @@ const pageFragment = /* GraphQL */ `
|
||||
`;
|
||||
|
||||
export const getPageQuery = /* GraphQL */ `
|
||||
query getPage($handle: String!) {
|
||||
query getPage($handle: String!, $metafieldIdentifiers: [HasMetafieldsIdentifier!]!) {
|
||||
pageByHandle(handle: $handle) {
|
||||
...page
|
||||
metafields(identifiers: $metafieldIdentifiers) {
|
||||
value
|
||||
key
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
${pageFragment}
|
||||
|
Reference in New Issue
Block a user