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,15 @@
import { cartFragment } from '../fragments/cart-fragment'
export const addItemToOrderMutation = /* GraphQL */ `
mutation addItemToOrder($variantId: ID!, $quantity: Int!) {
addItemToOrder(productVariantId: $variantId, quantity: $quantity) {
__typename
...Cart
... on ErrorResult {
errorCode
message
}
}
}
${cartFragment}
`

View File

@@ -0,0 +1,15 @@
import { cartFragment } from '../fragments/cart-fragment'
export const adjustOrderLineMutation = /* GraphQL */ `
mutation adjustOrderLine($orderLineId: ID!, $quantity: Int!) {
adjustOrderLine(orderLineId: $orderLineId, quantity: $quantity) {
__typename
...Cart
... on ErrorResult {
errorCode
message
}
}
}
${cartFragment}
`

View File

@@ -0,0 +1,14 @@
export const loginMutation = /* GraphQL */ `
mutation login($username: String!, $password: String!) {
login(username: $username, password: $password) {
__typename
... on CurrentUser {
id
}
... on ErrorResult {
errorCode
message
}
}
}
`

View File

@@ -0,0 +1,7 @@
export const logoutMutation = /* GraphQL */ `
mutation logout {
logout {
success
}
}
`

View File

@@ -0,0 +1,15 @@
import { cartFragment } from '../fragments/cart-fragment'
export const removeOrderLineMutation = /* GraphQL */ `
mutation removeOrderLine($orderLineId: ID!) {
removeOrderLine(orderLineId: $orderLineId) {
__typename
...Cart
... on ErrorResult {
errorCode
message
}
}
}
${cartFragment}
`

View File

@@ -0,0 +1,14 @@
export const signupMutation = /* GraphQL */ `
mutation signup($input: RegisterCustomerInput!) {
registerCustomerAccount(input: $input) {
__typename
... on Success {
success
}
... on ErrorResult {
errorCode
message
}
}
}
`