mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
10
framework/vendure/utils/queries/active-customer-query.ts
Normal file
10
framework/vendure/utils/queries/active-customer-query.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export const activeCustomerQuery = /* GraphQL */ `
|
||||
query activeCustomer {
|
||||
activeCustomer {
|
||||
id
|
||||
firstName
|
||||
lastName
|
||||
emailAddress
|
||||
}
|
||||
}
|
||||
`
|
@@ -0,0 +1,9 @@
|
||||
export const getAllProductPathsQuery = /* GraphQL */ `
|
||||
query getAllProductPaths($first: Int = 100) {
|
||||
products(options: { take: $first }) {
|
||||
items {
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
12
framework/vendure/utils/queries/get-all-products-query.ts
Normal file
12
framework/vendure/utils/queries/get-all-products-query.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { searchResultFragment } from '../fragments/search-result-fragment'
|
||||
|
||||
export const getAllProductsQuery = /* GraphQL */ `
|
||||
query getAllProducts($input: SearchInput!) {
|
||||
search(input: $input) {
|
||||
items {
|
||||
...SearchResult
|
||||
}
|
||||
}
|
||||
}
|
||||
${searchResultFragment}
|
||||
`
|
10
framework/vendure/utils/queries/get-cart-query.ts
Normal file
10
framework/vendure/utils/queries/get-cart-query.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { cartFragment } from '../fragments/cart-fragment'
|
||||
|
||||
export const getCartQuery = /* GraphQL */ `
|
||||
query activeOrder {
|
||||
activeOrder {
|
||||
...Cart
|
||||
}
|
||||
}
|
||||
${cartFragment}
|
||||
`
|
21
framework/vendure/utils/queries/get-collections-query.ts
Normal file
21
framework/vendure/utils/queries/get-collections-query.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export const getCollectionsQuery = /* GraphQL */ `
|
||||
query getCollections {
|
||||
collections {
|
||||
items {
|
||||
id
|
||||
name
|
||||
description
|
||||
slug
|
||||
productVariants {
|
||||
totalItems
|
||||
}
|
||||
parent {
|
||||
id
|
||||
}
|
||||
children {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
41
framework/vendure/utils/queries/get-product-query.ts
Normal file
41
framework/vendure/utils/queries/get-product-query.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
export const getProductQuery = /* GraphQL */ `
|
||||
query getProduct($slug: String!) {
|
||||
product(slug: $slug) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
description
|
||||
assets {
|
||||
id
|
||||
preview
|
||||
name
|
||||
}
|
||||
variants {
|
||||
id
|
||||
priceWithTax
|
||||
currencyCode
|
||||
options {
|
||||
id
|
||||
name
|
||||
code
|
||||
groupId
|
||||
group {
|
||||
id
|
||||
options {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
optionGroups {
|
||||
id
|
||||
code
|
||||
name
|
||||
options {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
13
framework/vendure/utils/queries/search-query.ts
Normal file
13
framework/vendure/utils/queries/search-query.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { searchResultFragment } from '../fragments/search-result-fragment'
|
||||
|
||||
export const searchQuery = /* GraphQL */ `
|
||||
query search($input: SearchInput!) {
|
||||
search(input: $input) {
|
||||
items {
|
||||
...SearchResult
|
||||
}
|
||||
totalItems
|
||||
}
|
||||
}
|
||||
${searchResultFragment}
|
||||
`
|
Reference in New Issue
Block a user