SDKs fetching content change

As part of Builder’s ongoing efforts to enhance your experience, we wanted to inform you about an upcoming change to our React and Gen2 SDKs that may potentially affect your integration, although the likelihood of any significant impact should be minimal.

What is changing?

From 11/1 on (packages @builder.io/react version 3.1.0+ and Gen2 @builder.io/sdk-* version 0.7.0+), any calls to fetch multiple entries from Builder (getAll with our React SDK and getContent in the Gen 2 SDKs where a limit is not specified or is greater than 1) will not fetch or load references or symbols by default. If you want to fetch the references in these calls, you will have to manually pass in an enrich: true to the getAll function.

When is the change going to happen?

We are planning to roll out a new minor version of all the SDKs on 11/1/2023. The change will roll out as part of @builder.io/react version 3.1.0 and Gen2 @builder.io/sdk-* version 0.7.0.

Why is it changing?

Increase performance and decrease build times for sites and apps using getAll functions. Today, the getAll automatically fetches references and symbols, even though the majority of users do not require this extra data, it may lead to performance degradation and unnecessarily prolonged build times.

What else should I know?

If you are currently making multiple calls to get multiple content entries and rely on references being loaded, we are recommending the following change, to explicitly pass enrich: true to the getAll or getContent call.

Hello @korey,

Two questions on the new SDK:

  • Does the new SDK support feature like getStaticPaths in NextJs, where you can skip static generation in build?
  • Does the new SDK support feature like getStaticProps?

Thanks