mikepenz/storyblok-mp-SDK

`resolve_relations` not working

Closed this issue · 2 comments

About this issue

Library provides to use resolve_relations as Array. But it is not working.
When I call this url on Postman, I can see storyboards correctly with categories.
https://api.storyblok.com/v1/cdn/stories?token=xxxxx&resolve_relations=collection.category&starts_with=videos/&version=published

But when I set resolve_relations as Array, returned stories are not same as Postman.
Seems resolve_relations not working.

  • How can the issue be reproduced / sample code
val resolveRelations1: List<String> = listOf("collection.category")
val resolveRelations2: List<String> = listOf("collection","category")
storyblok.fetchStories(
            startsWith = "videos/",
            resolveRelations = resolveRelations1.toTypedArray()
        )

resolveRelations1 and resolveRelations2 both are not working.

Details

  •  Used library version
  •  Used platform
  •  Used support library version
  •  Used gradle build tools version
  •  Used tooling / Android Studio version
  •  Other used libraries, potential conflicting libraries

Checklist

Same issue for me.

Checking the generated request:

https://api.storyblok.com/v2/cdn/stories?cv=1632484939&page=1&per_page=25&resolve_relations=collection.category&token={XYZ}&version=published

The section about:
resolve_relations=collection.category
Is equal to the query param in your outlined request:
resolve_relations=collection.category

This is with the following code:

storyblok.fetchStories(resolveRelations = arrayOf("collection.category"))

Maybe you can share the API request with a temporary token via e-mail so I can have a look and dive deeper into this report.