mirror of
https://github.com/vercel/commerce.git
synced 2025-05-22 09:26:59 +00:00
31 lines
659 B
TypeScript
31 lines
659 B
TypeScript
export const getEntityIdByRouteQuery = /* GraphQL */ `
|
|
query getEntityIdByRoute($path: String!) {
|
|
site {
|
|
route(path: $path) {
|
|
node {
|
|
__typename
|
|
... on Product {
|
|
entityId
|
|
}
|
|
... on Category {
|
|
entityId
|
|
}
|
|
... on Brand {
|
|
entityId
|
|
}
|
|
# NOTE: this API is still not public
|
|
# ... on NormalPage {
|
|
# entityId
|
|
# }
|
|
# ... on ContactPage {
|
|
# entityId
|
|
# }
|
|
# ... on RawHtmlPage {
|
|
# entityId
|
|
# }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|