1
0
mirror of https://github.com/vercel/commerce.git synced 2025-09-01 21:40:14 +00:00
Files
.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
types.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
commerce/lib/shopify/queries/page.ts
2024-05-24 13:19:14 +07:00

46 lines
753 B
TypeScript

import seoFragment from '../fragments/seo';
const pageFragment = /* GraphQL */ `
fragment page on Page {
... on Page {
id
title
handle
body
bodySummary
seo {
...seo
}
createdAt
updatedAt
}
}
${seoFragment}
`;
export const getPageQuery = /* GraphQL */ `
query getPage($handle: String!, $key: String!, $namespace: String) {
pageByHandle(handle: $handle) {
...page
metafield(key: $key, namespace: $namespace) {
value
id
}
}
}
${pageFragment}
`;
export const getPagesQuery = /* GraphQL */ `
query getPages {
pages(first: 100) {
edges {
node {
...page
}
}
}
}
${pageFragment}
`;