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

Products compare GraphQL schema #287

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
40 changes: 40 additions & 0 deletions design-documents/graph-ql/coverage/ProductCompare.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
type Query {
compareProductsList(hashed_id: String): CompareProductsList @doc(description: "Get compare products list")
}

type CompareProductsList {
items: [CompareItem] @doc (description: "Compare products list which contains items as products")
}

type CompareItem {
item_id: Int
product: ProductInterface
}

type Mutation {
addProductToCompareList(hashed_id: String, input: addProductToCompareListInput): addProductToCompareListOutput @doc(description: "Add product to compare list")
removeProductFromCompareList(hashed_id: String, input: removeProductFromCompareListInput): removeProductFromCompareListOutput @doc(description: "Remove product from compare list")
createCompareList: CreateCompareListOutput @doc(description: "Create compare list to add product to this list")
}

input addProductToCompareListInput {
ids: [Int!]
}

type addProductToCompareListOutput {
result: Boolean!
compareProductsList: CompareProductsList
}

input removeProductFromCompareListInput {
ids: [Int!]
}

type removeProductFromCompareListOutput {
result: Boolean!
compareProductsList: CompareProductsList
}

type CreateCompareListOutput {
hashed_id: String
}