diff --git a/libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts b/libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts index a1f4aca..ee47b9f 100644 --- a/libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts +++ b/libs/json-api/json-api-nestjs-sdk/src/lib/service/json-api-sdk.service.ts @@ -171,7 +171,7 @@ export class JsonApiSdkService { data: { id: entity[this.jsonApiSdkConfig.idKey].toString(), type: getTypeForReq(entity.constructor.name), - ...(Object.keys(attributes).length > 0 ? { attributes } : {}), + attributes, ...(Object.keys(relationships).length > 0 ? { relationships } : {}), }, };