-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactored module, use graphql #5
Conversation
resources/js/stores/useCompare.js
Outdated
return; | ||
} | ||
|
||
let response = await magentoGraphQL("query($uid: ID!) { compareList(uid: $uid) { uid item_count attributes { code label } items { uid product { sku name url_key image { url label } } attributes { code value } } } }", { |
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.
So we don't acidentally mismatch the data i think we should extract the compareList data into it's own variable like we have done for the cart in the core
https://github.com/rapidez/core/blob/a8a399077136af19acb4edda4fdae2a8171f125e/resources/js/stores/useCart.js#L23
https://github.com/rapidez/core/blob/a8a399077136af19acb4edda4fdae2a8171f125e/src/Http/ViewComposers/ConfigComposer.php#L45
} | ||
|
||
export const clear = async function () { | ||
compare.value = {} |
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.
Does this mean we want to call https://developer.adobe.com/commerce/webapi/graphql/schema/products/mutations/delete-compare-list/
as well? or purely client side?
@@ -0,0 +1,3 @@ | |||
<?php | |||
|
|||
Route::view(config('rapidez.compare.route'), 'rapidez-compare::compare')->name('rapidez-compare::compare'); |
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.
Is prefixing the route name like views a common thing?
No description provided.