Skip to content

docs: add metadata parameter to resolveAllData function documentation#1545

Open
henrycjchen wants to merge 2 commits intopuckeditor:mainfrom
henrycjchen:main
Open

docs: add metadata parameter to resolveAllData function documentation#1545
henrycjchen wants to merge 2 commits intopuckeditor:mainfrom
henrycjchen:main

Conversation

@henrycjchen
Copy link

Description

This PR adds documentation for the metadata parameter to the resolveAllData function documentation.

Changes made

  • Updated the Args table in the resolveAllData documentation to include the metadata parameter
  • Added a description section explaining that metadata is an optional object passed to resolvers, defaulting to {}

How to test

  • Navigate to the resolveAllData API reference page and verify the metadata parameter is documented in the Args table
  • Confirm the description explains that it's an optional parameter with a default value of {}

@vercel
Copy link

vercel bot commented Jan 27, 2026

@henrycjchen is attempting to deploy a commit to the Puck Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
puck-docs Ready Ready Preview Jan 28, 2026 2:01am

Request Review

Copy link
Collaborator

@FedericoBonel FedericoBonel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @henrycjchen! Thanks for the contribution, left a comment requesting for some changes.


### metadata

An optional [Metadata](/docs/api-reference/data-model/metadata) object to pass to the resolvers. Defaults to `{}`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a dedicated page for this. Currently, we document metadata in the APIs where it’s used. For example, for the Puck component metadata prop, we do this.

Maybe we could do the same thing here? Remember that metadata doesn't just get sent to resolvers, but it also gets sent to the component render function under the puck prop.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, updated.

Copy link
Collaborator

@FedericoBonel FedericoBonel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments! Once we fix that I think we should be able to merge it.

Be sure to run yarn format since my suggestions will most likely break the formatting of the table.


### metadata

An optional [Metadata](/docs/api-reference/components/puck.mdx#metadata) object to pass to the resolvers. Defaults to `{}`.
Copy link
Collaborator

@FedericoBonel FedericoBonel Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An optional [Metadata](/docs/api-reference/components/puck.mdx#metadata) object to pass to the resolvers. Defaults to `{}`.
An object containing additional data provided to each component's [resolveData](/docs/api-reference/configuration/component-config#resolvedatadata-params) functions.
``

| ---------------- | -------------------- | ------------------------------------------------------- |
| `data` | `{}` | [Data](/docs/api-reference/data-model/data) |
| `config` | `{ components: {} }` | [Config](/docs/api-reference/configuration/config) |
| `metadata` | `{}` | [Metadata](/docs/api-reference/data-model/metadata) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `metadata` | `{}` | [Metadata](/docs/api-reference/data-model/metadata) |
| [`metadata`](#metadata) | `metadata: {}` | Object |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants