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
feat: Add collection and category endpoints to store #7155
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
export type StoreGetCollectionsParamsType = z.infer< | ||
typeof StoreGetCollectionsParams | ||
> | ||
export const StoreGetCollectionsParams = createFindParams({ |
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.
Once @riqwan merges his PR I'll clean these up to be shared across admin and storefront
remoteQueryObjectFromString, | ||
} from "@medusajs/utils" | ||
|
||
export const refetchCollection = async ( |
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.
Similarly, once @riqwan merges the genric function I'll replace this one with it
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.
these are free to use now in develop
is_internal: true, | ||
is_active: true, | ||
rank: 0, | ||
medusaIntegrationTestRunner({ |
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.
There are still some tests that are failing, but I think we have some bugs in how product categories are handled. I'll investigate that separately, I want to focus on getting the storefront running first.
4156a92
to
5b15c7f
Compare
5b15c7f
to
81b954f
Compare
81b954f
to
6f003f8
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.
lgtm!
remoteQueryObjectFromString, | ||
} from "@medusajs/utils" | ||
|
||
export const refetchCollection = async ( |
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.
these are free to use now in develop
req.params.id, | ||
req.scope, | ||
req.remoteQueryConfig.fields, | ||
req.filterableFields |
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.
you can use idOrFilters for this when you rebase with refetchEntities
return categories[0] | ||
} | ||
|
||
export const applyCategoryFilters = (req, res, next) => { |
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.
I've added this middleware you can now use - https://github.com/medusajs/medusa/pull/7178/files#diff-174c1cb2d4fa4db31b18bbb3956cf29a21cfccf26fcaecdc2f9dacce55143484
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.
@riqwan I'll do a follow-up cleanup PR, I just want to get things merged before we do the v1 cleanup.
No description provided.