Update Vendure provider to latest API changes (#352)

Relates to #349
This commit is contained in:
Michael Bromley
2021-06-02 16:46:38 +02:00
committed by GitHub
parent a98c95d447
commit 0e804d09f9
81 changed files with 1265 additions and 698 deletions

View File

@@ -0,0 +1,10 @@
export const activeCustomerQuery = /* GraphQL */ `
query activeCustomer {
activeCustomer {
id
firstName
lastName
emailAddress
}
}
`

View File

@@ -0,0 +1,9 @@
export const getAllProductPathsQuery = /* GraphQL */ `
query getAllProductPaths($first: Int = 100) {
products(options: { take: $first }) {
items {
slug
}
}
}
`

View 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}
`

View File

@@ -0,0 +1,10 @@
import { cartFragment } from '../fragments/cart-fragment'
export const getCartQuery = /* GraphQL */ `
query activeOrder {
activeOrder {
...Cart
}
}
${cartFragment}
`

View File

@@ -0,0 +1,21 @@
export const getCollectionsQuery = /* GraphQL */ `
query getCollections {
collections {
items {
id
name
description
slug
productVariants {
totalItems
}
parent {
id
}
children {
id
}
}
}
}
`

View 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
}
}
}
}
`

View 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}
`