1
0
mirror of https://github.com/vercel/commerce.git synced 2025-08-18 14:51:22 +00:00
Files
.github
.vscode
.yarn
app
components
deprecated
fonts
lib
shopify
fragments
mutations
queries
blog.ts
cart.ts
collection.ts
menu.ts
page.ts
product.ts
index.ts
types.ts
constants.ts
type-guards.ts
utils.ts
messages
public
.editorconfig
.env.example
.eslintrc.js
.gitattributes
.gitignore
.node-version
.nvmrc
.prettierignore
.yarnrc.yml
README.md
license.md
middleware.ts
next.config.js
package.json
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
yarn.lock
commerce/lib/shopify/queries/page.ts
2023-08-14 02:27:52 +09:00

44 lines
835 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!, $country: CountryCode, $language: LanguageCode)
@inContext(country: $country, language: $language) {
pageByHandle(handle: $handle) {
...page
}
}
${pageFragment}
`;
export const getPagesQuery = /* GraphQL */ `
query getPages($country: CountryCode, $language: LanguageCode)
@inContext(country: $country, language: $language) {
pages(first: 100) {
edges {
node {
...page
}
}
}
}
${pageFragment}
`;