Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions collections/brands/get branch.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
meta {
name: get branch
type: graphql
seq: 2
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
query GetBranch {
getBranch {
name
address
latitude
longitude
}
}

}
20 changes: 20 additions & 0 deletions collections/brands/get brand.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
meta {
name: get brand
type: graphql
seq: 1
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
query GetBrand {
getBrand {
name
}
}

}
45 changes: 45 additions & 0 deletions collections/carts/add variant to cart.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
meta {
name: add variant to cart
type: graphql
seq: 2
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
mutation AddVariantToCart($cartId: ID!, $variantId: ID!, $quantity: Int) {
cartAddVariant(id: $cartId, input: { variantId: $variantId, quantity: $quantity }) {
result {
id
status
cartLines {
id
quantity
notes
variant {
id
name
}
}
}
errors {
message
code
}
}
}

}

body:graphql:vars {
{
"cartId": "01959b14-4377-7992-b534-a0f423985773",
"variantId": "019581b4-ff21-75e5-82aa-f41762d61e77",
"quantity": 2
}

}
25 changes: 25 additions & 0 deletions collections/carts/checkout cart.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
meta {
name: checkout cart
type: graphql
seq: 4
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
mutation CartCheckoutDelivery($cartId: ID!, $deliveryInput: JsonString!) {
cartCheckoutDelivery(input: { cartId: $cartId, deliveryInput: $deliveryInput })
}

}

body:graphql:vars {
{
"cartId": "01959b14-4377-7992-b534-a0f423985773",
"deliveryInput": "{\"delivery_person\": {}, \"delivery_order\": {}, \"to_name\": \"to_name\", \"to_latitude\": -33.447001713606156, \"to_longitude\": -70.65619123826207, \"to_address\": \"to_address\", \"to_phone\": \"to_phone\", \"to_notes\": \"to_notes\"}"
}
}
35 changes: 35 additions & 0 deletions collections/carts/create cart.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
meta {
name: create cart
type: graphql
seq: 3
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
mutation CreateCart($currency: String) {
createCart(input: { currency: $currency }) {
result {
id
status
currency
}
errors {
message
code
}
}
}

}

body:graphql:vars {
{
"currency": "CLP"
}

}
46 changes: 46 additions & 0 deletions collections/carts/get cart.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
meta {
name: get cart
type: graphql
seq: 1
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
query GetCart($id: ID!) {
getCart(id: $id) {
id
status
currency
cartLines {
id
quantity
notes
variant {
id
name
sku
prices {
id
money {
amount
currency
}
}
}
}
}
}

}

body:graphql:vars {
{
"id": "01959a22-b124-749b-b57e-6e48c6ccf8bd"
}

}
48 changes: 48 additions & 0 deletions collections/products/get available products.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
meta {
name: get available products
type: graphql
seq: 2
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
query GetAvailableProducts($filter: ProductFilterInput, $sort: [ProductSortInput!]) {
getAvailableProducts(filter: $filter, sort: $sort) {
id
name
description
sku
state
prices {
id
money {
amount
currency
}
}
}
}

}

body:graphql:vars {
{
"filter": {
"name": {
"like": "Gyozas al Vapor"
}
},
"sort": [
{
"field": "NAME",
"order": "ASC"
}
]
}

}
51 changes: 51 additions & 0 deletions collections/products/get product.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
meta {
name: get product
type: graphql
seq: 1
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
query GetProduct($id: ID!) {
getProduct(id: $id) {
id
name
description
sku
state
variants {
id
name
sku
prices {
id
money {
amount
currency
}
}
}
options {
id
name
description
optionValues {
id
value
}
}
}
}

}

body:graphql:vars {
{
"id": "019581b4-ff11-7551-823e-22e17158f32b"
}
}
36 changes: 36 additions & 0 deletions collections/products/get products in collection.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
meta {
name: get products in collection
type: graphql
seq: 4
}

post {
url: {{gql_host}}:{{gql_port}}/gql
body: graphql
auth: none
}

body:graphql {
query GetProductsInCollection($collectionId: ID!) {
getAvailableProducts(filter: { collections: { id: { eq: $collectionId } } }) {
id
name
description
sku
state
collections {
id
name
description
}
}
}

}

body:graphql:vars {
{
"collectionId": "01959a22-b197-7d63-9a63-8990e0bd55c8"
}

}
Loading
Loading