Skip to content
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

Merged
merged 3 commits into from
Jul 7, 2020
Merged

Add invoices to user order details #13

merged 3 commits into from
Jul 7, 2020

Conversation

orzechdev
Copy link
Contributor

@orzechdev orzechdev commented Jun 29, 2020

Added conditional query for invoices in order details for logged in user.

PR intended to be tested with API branch:
saleor/saleor#5732

@orzechdev orzechdev changed the title Add invoices to order details Add invoices to user order details Jun 30, 2020
QUERIES.OrderDetails,
data => data.orderByToken
);
getOrderDetails = (
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Member

@krzysztofwolski krzysztofwolski left a 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.

@orzechdev orzechdev requested a review from krzysztofwolski July 3, 2020 10:36
@orzechdev orzechdev merged commit 737c634 into master Jul 7, 2020
@orzechdev orzechdev deleted the feature/invoices branch July 7, 2020 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants