Skip to content

Design product compare GraphQL schema #305

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

Merged
merged 3 commits into from
Oct 21, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions design-documents/graph-ql/coverage/product-compare.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type Mutation {
addProductsToCompareList(compare_list_id: String!, skus: [String!]!): AddProductToCompareListOutput!
removeProductsFromCompareList(compare_list_id: String!, skus: [String!]!): RemoveProductsFromCompareListOutput!
}

type Query {
productCompareListId(): String! # ALways new ID for guests. A new or an existing ID for customers
Copy link
Contributor

@akaplya akaplya Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use ID instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, makes sense.

productCompareList(compare_list_id: String!): ProductCompareList!
}

input ProductCompareList {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

compare_list_id: String!
products: [ProductInterface]!
}

type AddProductToCompareListOutput {
compare_list: ProductCompareList!
}

type RemoveProductsFromCompareListOutput {
compare_list: ProductCompareList!
}