You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To have my sale created. Instead, I got an error message saying something went wrong. I checked the network response and I found the following error message from GraphQL. Variable "$input" got invalid value {"endDate": "2019-07-25", "name": "Winter Sale", "startDate": "2019-07-18", "type": "FIXED", "value": "15"}. In field "startDate": Expected type "DateTime", found "2019-07-18". In field "endDate": Expected type "DateTime", found "2019-07-25".
System information
Operating system: Windows 10 x64
Browser: Firefox 67
The text was updated successfully, but these errors were encountered:
It appears that the graphql wants the dates in the following format 2019-07-15T00:00:00+00:00. Adding that in my query fixes the bug. This raises something interesting. To programmers, it's normal that when we have a start and end, the start is inclusive and the end is exclusive. Normal people don't work that way, I believe. Are the end dates in saleor inclusive? If the saleor dates use midnight time like above, that would make them exclusive.
What I'm trying to achieve
Create sales.
Steps to reproduce the problem
What I expected to happen
To have my sale created. Instead, I got an error message saying something went wrong. I checked the network response and I found the following error message from GraphQL.
Variable "$input" got invalid value {"endDate": "2019-07-25", "name": "Winter Sale", "startDate": "2019-07-18", "type": "FIXED", "value": "15"}. In field "startDate": Expected type "DateTime", found "2019-07-18". In field "endDate": Expected type "DateTime", found "2019-07-25".
System information
Operating system: Windows 10 x64
Browser: Firefox 67
The text was updated successfully, but these errors were encountered: