Class EntityDataManager<TFields>

A data manager is responsible for orchestrating multiple sources of entity data including local caches, EntityCacheAdapter, and EntityDatabaseAdapter.

It is also responsible for invalidating all sources of data when mutated using EntityMutator.

Type Parameters

  • TFields extends Record<string, any>

Constructors

Methods

  • Load many objects where fieldName is one of fieldValues.

    Type Parameters

    • N extends string | number | symbol

    Parameters

    • queryContext: EntityQueryContext

      query context in which to perform the load

    • fieldName: N

      object field being queried

    • fieldValues: readonly NonNullable<TFields[N]>[]

      fieldName field values being queried

    Returns Promise<ReadonlyMap<NonNullable<TFields[N]>, readonly Readonly<TFields>[]>>

    map from fieldValue to objects that match the query for that fieldValue