Example
Parameters
DetailPageOptions<T, C, U, EntityField, VarNameCreate, VarNameUpdate>Options used to configure the result of the useDetailPage hook.
stringThe page id. This is optional, but if provided, it will be used to identify the page when extending the detail page query
TThe query document to fetch the entity.
EntityFieldThe field of the query document that contains the entity.
{ id: string; }The parameters used to identify the entity.
stringThe entity type name for custom field configuration lookup. Required to filter out readonly custom fields before mutations. If not provided, the function will try to infer it from the query document.
CThe document to create the entity.
UThe document to update the entity.
( entity: NonNullable<ResultOf<T>[EntityField]>, ) => WithLooseCustomFields<VariablesOf<U>[VarNameUpdate]>The function to set the values for the update document.
(input: VariablesOf<C>[VarNameCreate]) => VariablesOf<C>[VarNameCreate](input: VariablesOf<U>[VarNameUpdate]) => VariablesOf<U>[VarNameUpdate](entity: ResultOf<C>[keyof ResultOf<C>] | ResultOf<U>[keyof ResultOf<U>]) => voidThe function to call when the update is successful.
(error: unknown) => voidThe function to call when the update is successful.
Architecture reviews, custom plugin work, migrations, ongoing support. Get a hand from the team that builds Vendure.
Talk to the team