You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to disable link resolution when calling sync
constclient=createClient({
accessToken,
environment,
host,
responseLogger,
space
}).withAllLocales.withoutLinkResolution;constcollection=awaitclientApi.sync({initial: true,limit: 1000})
Context
I don't need the entry links resolved when syncing. I'm upgrading from v9 to v10, and this is a breaking change. This downloads a lot more data then is needed. If this is not fixed, I'll need to transform the data to remove the resolved links to convert them to unresolved links.
Environment
Language Version: v18.20.0
Package Manager Version: 10.5.0
Operating System: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm6
Package Version: "contentful": "10.12.4"
Which API are you using?: <Delivery / Preview -->
The text was updated successfully, but these errors were encountered:
Expected Behavior
sync
should support both link resolution on and off.Actual Behavior
withoutLinkResolution
is always false when callingsync
. This value appears to be hardcoded along withwithAllLocales
andwithoutUnresolvableLinks
.These configuration values cannot be overridden because the default options takes precedent over the syncOptions being passed to the function. https://github.com/contentful/contentful.js/blob/master/lib/create-contentful-api.ts#L422-L424
Possible Solution
Remove validateResolveLinksParam() so { resolveLinks: false } can be passed as an option
OR swap order of options that combineOptions and change the type of argument
syncOptions
to beSyncOptions | ChainOptions
Steps to Reproduce
Unable to disable link resolution when calling
sync
Context
I don't need the entry links resolved when syncing. I'm upgrading from v9 to v10, and this is a breaking change. This downloads a lot more data then is needed. If this is not fixed, I'll need to transform the data to remove the resolved links to convert them to unresolved links.
Environment
The text was updated successfully, but these errors were encountered: