mirror of
https://github.com/vercel/commerce.git
synced 2025-07-29 21:21:23 +00:00
.github
.vscode
app
components
e2e
lib
shopify
fragments
mutations
queries
cart.ts
collection.ts
menu.ts
page.ts
product.ts
index.ts
types.ts
constants.tsx
type-guards.ts
utils.ts
.env.example
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
README.md
license.md
next.config.js
package.json
playwright.config.ts
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
42 lines
633 B
TypeScript
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}
|
|
`;
|