Skip to content

No support of rel_uuids #61

@frastel

Description

@frastel

Expected Behavior

Usage of "resolve relations" always works when fetching multiple stories, also when more than 50 stories to be resolved are found.

The official documentation of the content management API says:

Resolved relations are included in the rels property of the response. A maximum of 50 stories can be resolved. > If this limit is exceeded, the story UUIDs are included in the rel_uuids property of the response and can be used > for further API requests (this is handled automatically when using one of Storyblok's official frontend SDKs).

The deprecated PHP SDK did this automatically and we expected that the new SDK does this too.

Current Behavior

When 50 or more stories are found to be resolved, the API response contains a "rel_uuids" and not a "rels" key.
The used "StoriesResponse" ValueObject however makes an assert on the "rels" field und throws an exception when the "rel_uuids" key does exist. There is no way to avoid this behaviour nicely.

Current workaround would be to implement an own StoriesApiInterface, copy&paste a lot of things and use an own StoriesResponse value object.

Steps to Reproduce

  1. Fetch > 50 stories which have at least one unique relation to be resolved. The API response contains an "rel_uuids" key than and misses the "rels" field.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions