Skip to content

Uuid value itself get replaced by resolving relations #62

@frastel

Description

@frastel

Expected Behavior

When using "resolve relations" all uuid fields of the stories themselves are not modified.
The deprecated SDK did not resolve relations of fields with name "uuid".

Current Behavior

When a resolved relation does exist in the main content of an API Response, its uuid field will be replaced with the resolved data of its own. This breaks applications as the uuid string field is modified to an array.

{
  "name": "foo name",
  "created_at": "2024-12-24T01:12:45.229Z",
  "published_at": "2024-12-24T01:12:45.229Z",
  "updated_at": "2024-12-24T01:12:45.229Z",
  "id": 123456789,
  "uuid": {
    "name": "foo name",
    "id": 123456789,
    "uuid": "abcdef-1234-5678-uuid",
    "slug": "some-slug",
    "url": "some\/url"
  },
  "content": {

  }
}

Steps to Reproduce

  1. fetch multiple stories from the API where containing stories are themselves referenced in other stories
  2. using "resolve relations" to resolve according references
  3. check the uuid fields of the result. Some of them are modified to arrays.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions