Skip to content

Commit

Permalink
Merge pull request #463 from seasons/bugfix/createdDraftOrder
Browse files Browse the repository at this point in the history
Update createdDraftedOrder
  • Loading branch information
Luc Succes authored Feb 3, 2021
2 parents 7ba8985 + 19123d1 commit f690227
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 24 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"node": ">=12.x.x"
},
"resolutions": {
"graphql": "^14.5.8"
"graphql": "14.7.0"
},
"scripts": {
"android": "cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug",
Expand All @@ -25,6 +25,7 @@
"build:fastlane": "fastlane ios beta"
},
"dependencies": {
"@apollo/client": "^3.3.7",
"@apollo/react-hooks": "^3.1.1",
"@expo/react-native-action-sheet": "^3.8.0",
"@material-ui/core": "^4.11.1",
Expand All @@ -46,6 +47,7 @@
"@types/luxon": "^1.24.3",
"apollo-boost": "^0.4.4",
"apollo-cache": "^1.3.2",
"apollo-cache-inmemory": "^1.6.6",
"apollo-cache-persist": "^0.1.1",
"apollo-client": "2.6.4",
"apollo-link": "^1.2.12",
Expand Down
31 changes: 12 additions & 19 deletions src/Scenes/Product/Mutations.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
import gql from "graphql-tag"

export const PRODUCT_VARIANT_CREATE_ORDER = gql`
mutation ProductVariantCreateOrder($input: CreateProductVariantDraftOrderInput!) {
createProductVariantOrder(input: $input) {
total
lineItems {
amount
description
}
shippingAddress {
address1
address2
city
state
zipCode
}
}
}
`

export const PRODUCT_VARIANT_CREATE_DRAFT_ORDER = gql`
mutation ProductVariantCreateDraftOrder($input: CreateDraftedOrderInput!) {
createDraftedOrder(input: $input) {
id
orderNumber
subTotal
total
type
status
items {
id
recordID
recordType
needShipping
taxRate
taxName
taxPercentage
taxPrice
}
createdAt
updatedAt
}
Expand Down
2 changes: 1 addition & 1 deletion src/fragmentTypes.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__schema":{"types":[{"kind":"INTERFACE","name":"Node","possibleTypes":[{"name":"Category"},{"name":"ProductMaterialCategory"},{"name":"ProductModel"},{"name":"TopSize"},{"name":"BottomSize"},{"name":"Color"},{"name":"Location"},{"name":"EmailReceipt"},{"name":"CustomerDetail"},{"name":"StylePreferences"},{"name":"BillingInfo"},{"name":"PaymentPlan"},{"name":"BagItem"},{"name":"Package"},{"name":"Label"},{"name":"PackageTransitEvent"},{"name":"ReservationFeedback"},{"name":"ProductVariantFeedback"},{"name":"ProductVariantFeedbackQuestion"},{"name":"ShippingOption"},{"name":"ShippingMethod"},{"name":"CustomerMembership"},{"name":"PauseRequest"},{"name":"CustomerAdmissionsData"},{"name":"UTMData"},{"name":"PushNotificationReceipt"},{"name":"UserPushNotification"},{"name":"UserPushNotificationInterest"},{"name":"WarehouseLocation"},{"name":"WarehouseLocationConstraint"},{"name":"PhysicalProductQualityReport"},{"name":"ProductSeason"},{"name":"Season"},{"name":"Tag"},{"name":"ProductFunction"},{"name":"ProductTier"},{"name":"ProductNotification"},{"name":"ProductRequest"},{"name":"FitPicReport"},{"name":"InterestedUser"},{"name":"ReservationReceipt"},{"name":"ReservationReceiptItem"},{"name":"RecentlyViewedProduct"},{"name":"ProductVariantWant"},{"name":"ActiveAdminUser"},{"name":"Order"},{"name":"OrderItem"},{"name":"SmsReceipt"},{"name":"SyncTiming"}]},{"kind":"UNION","name":"SearchResultData","possibleTypes":[{"name":"ProductSearchResultData"},{"name":"PhysicalProductSearchResultData"}]},{"kind":"UNION","name":"HomepageResult","possibleTypes":[{"name":"Product"},{"name":"Collection"},{"name":"Brand"},{"name":"Category"}]}]}}
{"__schema":{"types":[{"kind":"UNION","name":"SearchResultData","possibleTypes":[{"name":"ProductSearchResultData"},{"name":"PhysicalProductSearchResultData"}]},{"kind":"UNION","name":"HomepageResult","possibleTypes":[{"name":"Product"},{"name":"Collection"},{"name":"Brand"},{"name":"Category"}]}]}}
110 changes: 107 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@
tslib "^1.10.0"
zen-observable "^0.8.14"

"@apollo/client@^3.3.7":
version "3.3.7"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.3.7.tgz#f15bf961dc0c2bee37a47bf86b8881fdc6183810"
integrity sha512-Cb0OqqvlehlRHtHIXRIS/Pe5WYU4hHl1FznXTRSxBAN42WmBUM3zy/Unvw183RdWMyV6Kc2pFKOEuaG1K7JTAQ==
dependencies:
"@graphql-typed-document-node/core" "^3.0.0"
"@types/zen-observable" "^0.8.0"
"@wry/context" "^0.5.2"
"@wry/equality" "^0.3.0"
fast-json-stable-stringify "^2.0.0"
graphql-tag "^2.11.0"
hoist-non-react-statics "^3.3.2"
optimism "^0.14.0"
prop-types "^15.7.2"
symbol-observable "^2.0.0"
ts-invariant "^0.6.0"
tslib "^1.10.0"
zen-observable "^0.8.14"

"@apollo/react-common@^3.1.4":
version "3.1.4"
resolved "https://registry.yarnpkg.com/@apollo/react-common/-/react-common-3.1.4.tgz#ec13c985be23ea8e799c9ea18e696eccc97be345"
Expand Down Expand Up @@ -2076,6 +2095,11 @@
pouchdb-collections "^1.0.1"
tiny-queue "^0.2.1"

"@graphql-typed-document-node/core@^3.0.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.0.tgz#0eee6373e11418bfe0b5638f654df7a4ca6a3950"
integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg==

"@hapi/[email protected]":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
Expand Down Expand Up @@ -4326,6 +4350,11 @@
dependencies:
source-map "^0.6.1"

"@types/ungap__global-this@^0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@types/ungap__global-this/-/ungap__global-this-0.3.1.tgz#18ce9f657da556037a29d50604335614ce703f4c"
integrity sha512-+/DsiV4CxXl6ZWefwHZDXSe1Slitz21tom38qPCaG0DYCS1NnDPIQDTKcmQ/tvK/edJUKkmuIDBJbmKDiB0r/g==

"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
Expand Down Expand Up @@ -4381,6 +4410,11 @@
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d"
integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg==

"@ungap/global-this@^0.4.2":
version "0.4.4"
resolved "https://registry.yarnpkg.com/@ungap/global-this/-/global-this-0.4.4.tgz#8a1b2cfcd3e26e079a847daba879308c924dd695"
integrity sha512-mHkm6FvepJECMNthFuIgpAEFmPOk71UyXuIxYfjytvFTnSDBIz7jmViO+LfHI/AjrazWije0PnSP3+/NlwzqtA==

"@unimodules/core@~5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@unimodules/core/-/core-5.5.0.tgz#580aaa4887641c1af85e0ab9f8987a5d4424595c"
Expand Down Expand Up @@ -4582,6 +4616,20 @@
dependencies:
tslib "^1.9.3"

"@wry/equality@^0.3.0":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.3.1.tgz#81080cdc2e0d8265cd303faa0c64b38a77884e06"
integrity sha512-8/Ftr3jUZ4EXhACfSwPIfNsE8V6WKesdjp+Dxi78Bej6qlasAxiz0/F8j0miACRj9CL4vC5Y5FsfwwEYAuhWbg==
dependencies:
tslib "^1.14.1"

"@wry/trie@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.2.1.tgz#4191e1d4a85dd77dfede383d65563138ed82fc47"
integrity sha512-sYkuXZqArky2MLQCv4tLW6hX3N8AfTZ5ZMBc8jC6Yy35WYr82UYLLtjS7k/uRGHOA0yTSjuNadG6QQ6a5CS5hQ==
dependencies:
tslib "^1.14.1"

"@xtuc/ieee754@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
Expand Down Expand Up @@ -4921,6 +4969,17 @@ apollo-cache-inmemory@^1.6.5:
ts-invariant "^0.4.0"
tslib "^1.10.0"

apollo-cache-inmemory@^1.6.6:
version "1.6.6"
resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd"
integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A==
dependencies:
apollo-cache "^1.3.5"
apollo-utilities "^1.3.4"
optimism "^0.10.0"
ts-invariant "^0.4.0"
tslib "^1.10.0"

apollo-cache-persist@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/apollo-cache-persist/-/apollo-cache-persist-0.1.1.tgz#e6cfe1983b998982a679aaf05241d3ed395edb1e"
Expand All @@ -4942,6 +5001,14 @@ [email protected], apollo-cache@^1.3.2, apollo-cache@^1.3.4:
apollo-utilities "^1.3.3"
tslib "^1.10.0"

apollo-cache@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461"
integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA==
dependencies:
apollo-utilities "^1.3.4"
tslib "^1.10.0"

[email protected]:
version "2.6.4"
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.4.tgz#872c32927263a0d34655c5ef8a8949fbb20b6140"
Expand Down Expand Up @@ -5034,7 +5101,7 @@ [email protected]:
ts-invariant "^0.4.0"
tslib "^1.9.3"

[email protected], apollo-utilities@^1.3.0, apollo-utilities@^1.3.2, apollo-utilities@^1.3.3:
[email protected], apollo-utilities@^1.3.0, apollo-utilities@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.3.tgz#f1854715a7be80cd810bc3ac95df085815c0787c"
integrity sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw==
Expand All @@ -5044,6 +5111,16 @@ [email protected], apollo-utilities@^1.3.0, apollo-utilities@^1.3.2, apollo
ts-invariant "^0.4.0"
tslib "^1.10.0"

apollo-utilities@^1.3.2, apollo-utilities@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf"
integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig==
dependencies:
"@wry/equality" "^0.1.2"
fast-json-stable-stringify "^2.0.0"
ts-invariant "^0.4.0"
tslib "^1.10.0"

app-root-dir@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/app-root-dir/-/app-root-dir-1.0.2.tgz#38187ec2dea7577fff033ffcb12172692ff6e118"
Expand Down Expand Up @@ -9175,7 +9252,7 @@ graphql-tag@^2.4.2:
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.3.tgz#ea1baba5eb8fc6339e4c4cf049dabe522b0edf03"
integrity sha512-4FOv3ZKfA4WdOKJeHdz6B3F/vxBLSgmBcGeAFPf4n1F64ltJUvOOerNj0rsJxONQGdhUMynQIvd6LzB+1J5oKA==

graphql@^14.5.3:
graphql@14.7.0, graphql@^14.5.3:
version "14.7.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.7.0.tgz#7fa79a80a69be4a31c27dda824dc04dac2035a72"
integrity sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==
Expand Down Expand Up @@ -12777,6 +12854,14 @@ optimism@^0.12.1:
dependencies:
"@wry/context" "^0.5.2"

optimism@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.14.0.tgz#256fb079a3428585b40a3a8462f907e0abd2fc49"
integrity sha512-ygbNt8n4DOCVpkwiLF+IrKKeNHOjtr9aXLWGP9HNJGoblSGsnVbJLstcH6/nE9Xy5ZQtlkSioFQNnthmENW6FQ==
dependencies:
"@wry/context" "^0.5.2"
"@wry/trie" "^0.2.1"

optionator@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
Expand Down Expand Up @@ -15963,6 +16048,11 @@ [email protected], symbol-observable@^1.0.2, symbol-observable@^1.2.0:
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==

symbol-observable@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a"
integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==

symbol-tree@^3.2.2:
version "3.2.4"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
Expand Down Expand Up @@ -16300,12 +16390,26 @@ ts-invariant@^0.4.0, ts-invariant@^0.4.4:
dependencies:
tslib "^1.9.3"

ts-invariant@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.6.0.tgz#44066ecfeb7a806ff1c3b0b283408a337a885412"
integrity sha512-caoafsfgb8QxdrKzFfjKt627m4i8KTtfAiji0DYJfWI4A/S9ORNNpzYuD9br64kyKFgxn9UNaLLbSupam84mCA==
dependencies:
"@types/ungap__global-this" "^0.3.1"
"@ungap/global-this" "^0.4.2"
tslib "^1.9.3"

ts-pnp@^1.1.2, ts-pnp@^1.1.6:
version "1.2.0"
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==

tslib@^1.10.0, tslib@^1.9.0, tslib@^1.9.3:
tslib@^1.10.0, tslib@^1.14.1, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^1.9.0:
version "1.11.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
Expand Down

0 comments on commit f690227

Please sign in to comment.