Skip to content
module@warp-drive/utilities/json-api

Type Alias JsonApiResourcePatch ​

ts
type JsonApiResourcePatch = 
  | {
  attributes?: Record<string, Value>;
  id: string;
  relationships?: Record<string, ChangedRelationshipData>;
  type: string;
}
  | {
  attributes?: Record<string, Value>;
  id: null;
  lid: string;
  relationships?: Record<string, ChangedRelationshipData>;
  type: string;
};

Defined in: -private/json-api/serialize.ts:17

The resource object serializePatch produces: the resource's type and id (or lid for a new record) with only its changed attributes and relationships.

Released under the MIT License.