mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
rename folder
This commit is contained in:
12
providers/saleor/utils/queries/checkout-one.ts
Normal file
12
providers/saleor/utils/queries/checkout-one.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import * as fragment from '../fragments'
|
||||
|
||||
export const CheckoutOne = /* GraphQL */ `
|
||||
query CheckoutOne($checkoutId: UUID!) {
|
||||
checkout(token: $checkoutId) {
|
||||
... on Checkout {
|
||||
...CheckoutDetails
|
||||
}
|
||||
}
|
||||
}
|
||||
${fragment.CheckoutDetails}
|
||||
`
|
13
providers/saleor/utils/queries/collection-many.ts
Normal file
13
providers/saleor/utils/queries/collection-many.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const CollectionMany = /* GraphQL */ `
|
||||
query CollectionMany($first: Int!, $channel: String = "default-channel") {
|
||||
collections(first: $first, channel: $channel) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
13
providers/saleor/utils/queries/collection-one.ts
Normal file
13
providers/saleor/utils/queries/collection-one.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as fragment from '../fragments'
|
||||
|
||||
export const CollectionOne = /* GraphQL */ `
|
||||
query getProductsFromCollection($categoryId: ID!, $first: Int = 100, $channel: String = "default-channel") {
|
||||
collection(id: $categoryId, channel: $channel) {
|
||||
id
|
||||
products(first: $first) {
|
||||
...ProductConnection
|
||||
}
|
||||
}
|
||||
}
|
||||
${fragment.ProductConnection}
|
||||
`
|
11
providers/saleor/utils/queries/customer-current.ts
Normal file
11
providers/saleor/utils/queries/customer-current.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const CustomerCurrent = /* GraphQL */ `
|
||||
query CustomerCurrent {
|
||||
me {
|
||||
id
|
||||
email
|
||||
firstName
|
||||
lastName
|
||||
dateJoined
|
||||
}
|
||||
}
|
||||
`
|
7
providers/saleor/utils/queries/customer-one.ts
Normal file
7
providers/saleor/utils/queries/customer-one.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const CustomerOne = /* GraphQL */ `
|
||||
query CustomerOne($customerAccessToken: String!) {
|
||||
customer(customerAccessToken: $customerAccessToken) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`
|
@@ -0,0 +1,16 @@
|
||||
export const getAllProductVendors = /* GraphQL */ `
|
||||
query getAllProductVendors($first: Int = 250, $cursor: String) {
|
||||
products(first: $first, after: $cursor) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
vendor
|
||||
}
|
||||
cursor
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
@@ -0,0 +1,16 @@
|
||||
export const getAllProductsPathsQuery = /* GraphQL */ `
|
||||
query getAllProductPaths($first: Int = 100, $cursor: String, $channel: String = "default-channel") {
|
||||
products(first: $first, after: $cursor, channel: $channel) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
slug
|
||||
}
|
||||
cursor
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
14
providers/saleor/utils/queries/index.ts
Normal file
14
providers/saleor/utils/queries/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export { CollectionMany } from './collection-many'
|
||||
export { ProductOneBySlug } from './product-one-by-slug'
|
||||
export { ProductMany } from './product-many'
|
||||
export { CollectionOne } from './collection-one'
|
||||
export { CheckoutOne } from './checkout-one'
|
||||
export { PageMany } from './page-many'
|
||||
export { PageOne } from './page-one'
|
||||
export { CustomerCurrent } from './customer-current'
|
||||
|
||||
// getCustomerIdQuery
|
||||
export { CustomerOne } from './customer-one'
|
||||
|
||||
export { getAllProductsPathsQuery } from './get-all-products-paths-query'
|
||||
export { getAllProductVendors } from './get-all-product-vendors-query'
|
13
providers/saleor/utils/queries/page-many.ts
Normal file
13
providers/saleor/utils/queries/page-many.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const PageMany = /* GraphQL */ `
|
||||
query PageMany($first: Int = 100) {
|
||||
pages(first: $first) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
title
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
9
providers/saleor/utils/queries/page-one.ts
Normal file
9
providers/saleor/utils/queries/page-one.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export const PageOne = /* GraphQL */ `
|
||||
query PageOne($id: ID!) {
|
||||
page(id: $id) {
|
||||
id
|
||||
title
|
||||
slug
|
||||
}
|
||||
}
|
||||
`
|
15
providers/saleor/utils/queries/product-many.ts
Normal file
15
providers/saleor/utils/queries/product-many.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as fragment from '../fragments'
|
||||
|
||||
export const ProductMany = /* GraphQL */ `
|
||||
query ProductMany(
|
||||
$first: Int = 100
|
||||
$filter: ProductFilterInput
|
||||
$sortBy: ProductOrder
|
||||
$channel: String = "default-channel"
|
||||
) {
|
||||
products(first: $first, channel: $channel, filter: $filter, sortBy: $sortBy) {
|
||||
...ProductConnection
|
||||
}
|
||||
}
|
||||
${fragment.ProductConnection}
|
||||
`
|
43
providers/saleor/utils/queries/product-one-by-slug.ts
Normal file
43
providers/saleor/utils/queries/product-one-by-slug.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
export const ProductOneBySlug = /* GraphQL */ `
|
||||
query ProductOneBySlug($slug: String!, $channel: String = "default-channel") {
|
||||
product(slug: $slug, channel: $channel) {
|
||||
id
|
||||
slug
|
||||
name
|
||||
description
|
||||
pricing {
|
||||
priceRange {
|
||||
start {
|
||||
net {
|
||||
amount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
variants {
|
||||
id
|
||||
name
|
||||
attributes {
|
||||
attribute {
|
||||
name
|
||||
}
|
||||
values {
|
||||
name
|
||||
}
|
||||
}
|
||||
pricing {
|
||||
price {
|
||||
net {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
media {
|
||||
url
|
||||
alt
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
Reference in New Issue
Block a user