diff --git a/packages/@orbit/jsonapi/src/resource-document.ts b/packages/@orbit/jsonapi/src/resource-document.ts index d2f92d86..a7c997aa 100644 --- a/packages/@orbit/jsonapi/src/resource-document.ts +++ b/packages/@orbit/jsonapi/src/resource-document.ts @@ -24,6 +24,7 @@ export type ResourceRelationship = export interface Resource { id?: string; + lid?: string; type: string; attributes?: Dict; relationships?: Dict; diff --git a/packages/@orbit/jsonapi/src/serializers/jsonapi-resource-identity-serializer.ts b/packages/@orbit/jsonapi/src/serializers/jsonapi-resource-identity-serializer.ts index e8c0b9ff..9e57e6ef 100644 --- a/packages/@orbit/jsonapi/src/serializers/jsonapi-resource-identity-serializer.ts +++ b/packages/@orbit/jsonapi/src/serializers/jsonapi-resource-identity-serializer.ts @@ -91,6 +91,8 @@ export class JSONAPIResourceIdentitySerializer extends JSONAPIBaseSerializer< if (resourceId !== undefined) { resource.id = resourceId; + } else { + resource.lid = id; } return resource;