-
Notifications
You must be signed in to change notification settings - Fork 316
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
Product Feed: Add attribute mapping #838
Conversation
🦋 Changeset detectedLatest commit: 064b649 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
d868f2d
to
01e165d
Compare
.changeset/nine-dryers-wink.md
Outdated
"saleor-app-products-feed": minor | ||
--- | ||
|
||
Added new feature: Attributes required by the Google Merchant can now be mapped to product attributes. |
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 think we can have a better message. No need to write "new feature" - this is followed by "minor"
Instead, please describe which exactly attributes are added.
.query(async ({ ctx: { logger, apiClient } }) => { | ||
const fetcher = new AttributeFetcher(apiClient); | ||
|
||
const result = await fetcher.fetchAllAttributes().catch((e) => { |
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.
log error here and it should go to sentry
FetchAttributesWithMappingDocument, | ||
} from "../../../generated/graphql"; | ||
|
||
export class AttributeFetcher { |
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.
nice implementation, maybe we can make it generic and put to shared
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.
@lkostrowski well, thats copy of your implementation of the Caregory fetcher 😃
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 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.
😆
@lkostrowski applied CRs. Spotted one missing attribute and added it. |
* Add attribute mapping * Improve release note * Log the error * Add pattern attribute
Scope of the PR
Google feed has specialized fields for the attributes (Size, Color, etc). This change adds configuration for choosing the right attributes:
Which is later used for the feed generation:
I've ditched the idea of keeping mapping in the metadata due to:
Related issues
Related: #814
Checklist
.github/dependabot.yaml
is up-to date.