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

Standardize wishlist returns #326

Open
guitavano opened this issue Jan 19, 2024 · 1 comment
Open

Standardize wishlist returns #326

guitavano opened this issue Jan 19, 2024 · 1 comment

Comments

@guitavano
Copy link
Contributor

guitavano commented Jan 19, 2024

Issue Type

Please select the type of issue you are reporting:

  • Feature Request
  • Discussion

Description

Currently, the wishlist loaders return different types for each integration.

VTEX

const loader = async (
  props: Props,
  req: Request,
  ctx: AppContext,
): Promise<WishlistItem[]> => {

WAKE

const action = async (
  _props: unknown,
  req: Request,
  ctx: AppContext,
): Promise<WishlistReducedProductFragment[]> => {

Expected Behavior

We expect the same type of return, so we can be able to reuse this result in front end components.

Actual Behavior

This creates the problem of not being able to build canonical components on the front end.

@matheusgr
Copy link
Contributor

Remember to create new loaders and deprecated the current ones.

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

No branches or pull requests

2 participants