Skip to content
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

CMS client utility for making batch requests #367

Open
stevenle opened this issue Jun 13, 2024 · 0 comments
Open

CMS client utility for making batch requests #367

stevenle opened this issue Jun 13, 2024 · 0 comments
Assignees
Labels
enhancement Feature request

Comments

@stevenle
Copy link
Member

Description

When rendering a page, client may need to specify multiple content docs for the CMS to fetch and render. The CMS client should be able to make the firestore fetch in a single batch request.

Example (not final):

const batch = cmsClient.batch({mode: 'draft | published'});
batch.getDoc('Pages/index');
batch.listDocs('BlogPosts', {query: ...});
batch.getTranslations('BlogPostsMetadata');
const res = await batch.execute();
@stevenle stevenle added the enhancement Feature request label Jun 13, 2024
@stevenle stevenle self-assigned this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request
Projects
None yet
Development

No branches or pull requests

1 participant