New: Headless Commerce with Remix! read more

GetEntityOrThrowOptions

GetEntityOrThrowOptions

Package: @vendure/core File: types.ts

Options used by the TransactionalConnection getEntityOrThrow method.

Signature

interface GetEntityOrThrowOptions<T = any> extends FindOneOptions<T> {
  channelId?: ID;
  retries?: number;
  retryDelay?: number;
  includeSoftDeleted?: boolean;
}

Extends

  • FindOneOptions<T>

Members

channelId

property
type:
ID
An optional channelId to limit results to entities assigned to the given Channel. Should only be used when getting entities that implement the ChannelAware interface.

retries

property
v1.1.0
type:
number
default:
0
If set to a positive integer, it will retry getting the entity in case it is initially not found.

retryDelay

property
v1.1.0
type:
number
default:
25
Specifies the delay in ms to wait between retries.

includeSoftDeleted

property
v1.3.0
type:
boolean
default:
false
If set to true, soft-deleted entities will be returned. Otherwise they will throw as if they did not exist.