docs: add metadata parameter to resolveAllData function documentation#1545
docs: add metadata parameter to resolveAllData function documentation#1545henrycjchen wants to merge 2 commits intopuckeditor:mainfrom
Conversation
|
@henrycjchen is attempting to deploy a commit to the Puck Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
FedericoBonel
left a comment
There was a problem hiding this comment.
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 `{}`. |
There was a problem hiding this comment.
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.
FedericoBonel
left a comment
There was a problem hiding this comment.
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 `{}`. |
There was a problem hiding this comment.
| 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) | |
There was a problem hiding this comment.
| | `metadata` | `{}` | [Metadata](/docs/api-reference/data-model/metadata) | | |
| | [`metadata`](#metadata) | `metadata: {}` | Object | |
Description
This PR adds documentation for the metadata parameter to the resolveAllData function documentation.
Changes made
How to test