4
0
forked from crowetic/commerce
Files
.vscode
app
components
fonts
lib
shopify
fragments
mutations
queries
cart.ts
collection.ts
menu.ts
page.ts
product.ts
index.ts
types.ts
constants.ts
type-guards.ts
utils.ts
.env.example
.gitignore
README.md
license.md
next.config.ts
package.json
pnpm-lock.yaml
postcss.config.mjs
tsconfig.json
commerce/lib/shopify/queries/page.ts
2023-04-23 13:55:25 -05:00

42 lines
633 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!) {
pageByHandle(handle: $handle) {
...page
}
}
${pageFragment}
`;
export const getPagesQuery = /* GraphQL */ `
query getPages {
pages(first: 100) {
edges {
node {
...page
}
}
}
}
${pageFragment}
`;