method
RiduClient.duplicate
Duplicate a document with optional typed create-field overrides.
Arguments
| Argument | Type | Description |
|---|---|---|
collection | Slug | The collection value. |
id | string | The id value. |
overrides | Partial< | The overrides value. |
options | MutationLocaleOptions< | The options value. |
Returns
The declared result.
Promise<OutputFor<Config, Slug>>Full signature
RiduClient.duplicate<Slug extends CollectionSlug<Config>>(
collection: Slug,
id: string,
overrides?: Partial<Omit<CreateFor<Config, Slug>, "id">>,
options?: MutationLocaleOptions<LocaleFor<Config>>,
): Promise<OutputFor<Config, Slug>>Related types
CollectionSlugThe generated union of collection slugs.
CreateForResolve a collection create input type.
MutationLocaleOptionsLocale and transport options shared by mutations without an optimistic-concurrency contract.
OutputForResolve a collection document output type.