feat: add integration for locale based publishing in CDA [TOL-3653]#2649
feat: add integration for locale based publishing in CDA [TOL-3653]#2649MayaGillilan wants to merge 3 commits intomasterfrom
Conversation
|
I have a general question about the decision to use chain modifiers instead of something like a option/query param, is this intentional? Is there a reason that it can't be accomplished with a option/query param? The reason I ask is that I had to look up how chain modifiers work in the CDA, and it isn't very well documented (unless I'm missing something). The only reference I was able to find to it was in this typescript tutorial. I'll raise this question to the rest of the team to see if anyone else has any insights/opinions but I was just curious. My initial reaction is that this feels like an option that could be passed to the 2 methods that expect it: const allEntries = await client.getEntries({
// for what it's worth, locale is an option at this level, so withLocaleBasedPublishing doesn't feel far off.
localeBasedPublishing: true,
// or maybe even add it to query?
query: {
localeBasedPublishing: true,
}
}) |
Yves Rijckaert (YvesRijckaert)
left a comment
There was a problem hiding this comment.
LGTM
Raised this with the rest of the DX team and using chain modifiers makes a lot of sense given the existing chain modifiers. A new section in the CDA developer docs on how to use chain modifiers would be nice, but is out of scope for this PR. I'll give this an approval, thanks for the improvement. |
Summary
Adds integration via optional modifier to pass
X-Contentful-Locale-Based-Publishingheader in entry and asset rquests.Description
Adds optional modifier
withLocaleBasedPublishingWhen added, passes
X-Contentful-Locale-Based-Publishingheader in entry and asset requestsAdds tests for the above
Motivation and Context
https://contentful.atlassian.net/browse/TOL-3653
PR Checklist
CONTRIBUTING.mdfile