feat: implement text/image-with-text/icon-with-text content block

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-05-23 14:17:55 +07:00
parent 4684d54ac3
commit a1d65a54c1
15 changed files with 431 additions and 24 deletions

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

View File

@@ -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}