-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add invoices to user order details #13
Conversation
8a48f23
to
ee25785
Compare
QUERIES.OrderDetails, | ||
data => data.orderByToken | ||
); | ||
getOrderDetails = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If those queries have different responses, shouldnt those be separate queries to avoid confusion?
Docstring when you should one query and not another would be helpfull.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about making just one method for returning order details and depending on the internal SDK state which specifies if a user is logged in or not logged in it would automatically return appropriately different results. Therefore SDK would get rid of the need for determination of available order data based on the login state by the end developer, who implements SDK methods. SDK would make it internally automatically. What do you think about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that would be consistent with the rest of the queries in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous review comments were not addressed.
Added conditional query for invoices in order details for logged in user.
PR intended to be tested with API branch:
saleor/saleor#5732