saleor-dashboard
saleor-dashboard copied to clipboard
Unable to save Store Information due to GraphQLError
What I'm trying to achieve
I'm trying to deploy (and run locally) a production-ready saleor-dashboard
.
Steps to reproduce the problem
- Setup tag
3.3.1
ofsaleor-dashboard
and tag3.3.2
ofsaleor
- Setup nginx serving results of
npm run build
- Navigate to
/site-settings
-> fill inStore Information
-> hitSave
- See error in browser console (no error popup or validation errors are visible).
What I expected to happen
Store address is saved successfully
Screenshots
Http request and response from inspector
Request:
{
"operationName":"ShopSettingsUpdate",
"variables": {
"addressInput":{
"city":"Testville",
"companyName":"Company B.V.",
"country":"NL",
"countryArea":"",
"phone":"",
"postalCode":"1000AA",
"streetAddress1":"Teststreet 33",
"streetAddress2":""
},
"shopSettingsInput":{
"description":"",
"reserveStockDurationAnonymousUser":null,
"reserveStockDurationAuthenticatedUser":null
},
"isCloudInstance":false
},
"query":"mutation ShopSettingsUpdate(
$shopSettingsInput: ShopSettingsInput!,
$addressInput: AddressInput,
$isCloudInstance: Boolean!) {
shopSettingsUpdate(input: $shopSettingsInput) {
errors {
...ShopError
__typename
}
shop {
...Shop
__typename
}
__typename
}
shopAddressUpdate(input: $addressInput) {
errors {
...ShopError
__typename
}
shop {
companyAddress {
...Address
__typename
}
__typename
}
__typename
}
}
fragment ShopError on ShopError {
code
field
message
__typename
}
fragment Shop on Shop {
companyAddress {
...Address
__typename
}
countries {
code
country
__typename
}
customerSetPasswordUrl
defaultMailSenderAddress
defaultMailSenderName
description
domain {
host
__typename
}
name
reserveStockDurationAnonymousUser
reserveStockDurationAuthenticatedUser
limitQuantityPerCheckout
__typename
}
fragment Address on Address {
city
cityArea
companyName
country {
__typename
code
country
}
countryArea
firstName
id
lastName
phone
postalCode
streetAddress1
streetAddress2
__typename
}"}
Response:
{"errors": [{"message": "Variable \"$isCloudInstance\" is never used in operation \"ShopSettingsUpdate\".", "locations": [{"line": 1, "column": 98}], "extensions": {"exception": {"code": "GraphQLError"}}}], "extensions": {"cost": {"requestedQueryCost": 0, "maximumAvailable": 50000}}}
Console output
// insert console output here
Variable "$isCloudInstance" is never used in operation "ShopSettingsUpdate".
System information
Saleor version:
- [ ] dev (current main)
- [x] 3.3.1
- [ ] 3.0
- [ ] 2.11
- [ ] 2.10
Operating system:
- [ ] Windows
- [x] Linux
- [ ] MacOS
- [ ] Other
Browser:
- [x] Firefox
- [ ] Safari
- [ ] Chrome
- [ ] Edge
- [ ] Other
Hitting the same issue with dashboard at 3.3.2 and saleor 3.3.8, as well as both saleor and dashboard at their main
branch.
+1 i am running dashboard v3.3.2, core v3.3.12
Thx for finding an issue, I can confirm that this issue exists. It is reported in Clickup, We will fix that soon!
The issue is fixed in 3.4.0
I'm still able to reproduce the issue with dashboard v3.4.1 and core v3.4.8
Hi, thanks for reporting, we will try to fix it as soon as we can.
Task linked: https://app.clickup.com/t/2549495/SALEOR-7517
This is still present in 3.5.2
This is still present in 3.5.0
I can also confirm this is still present with the following pair; saleor 3.5.6 saleor-dashboard 3.5.2
The fix to this was to remove the isCloudInstance. I imagine they are trying to implement that into it or I would make a PR for it.
The fix to this was to remove the isCloudInstance. I imagine they are trying to implement that into it or I would make a PR for it.
Where isCloudInstance should be removed from, to fix it @RyanTamulevicz ?
Remove Line 7 in src/siteSettings/mutations.ts Remove Line 2 in src/siteSettings/views/index.tsx
This should fix it @umutkacar @manojLondhe @eCzerniak @ex5 as I said, I would make a PR for this, but I believe it is something they are trying to implement.
Hello @RyanTamulevicz , @umutkacar and @manojLondhe
there is a ticket in our backlog but there is no PR for it in this moment so if you could create a fix for it, it would be great.
Regards.
@eCzerniak do you know a saleor & saleor-dashboard version pair which does not have this bug?
@eCzerniak @umutkacar creating PR in a moment
PR in #2228