How do I use resolve_relations for nested relationships using Multi-Options?

Hi, I’m having trouble getting some relation content to pull through correctly.

I’m using Nuxt and querying the homepage using the following code:

      // Check if we are in the editor mode
      let version = context.query._storyblok || context.isDev ? 'draft' : 'published';

      // Load the JSON from the API
      return$storyapi.get(`cdn/stories/home`, {
        version: version,
        resolve_relations: 'LatestProjects.projects,'
      }).then((res) => {
      }).catch((res) => {
        context.error({ statusCode: res.response.status, message: });

but is part of the LatestProjects.projects loop and it doesn't work.
Basically, I want to display a selection of projects using a Multi-Options field and in each of those projects (which are a content type of themselves) there's another Multi-Options field for tools (another content type).

I hope this is enough info to go on. I'm having trouble finding out how I go about this.

Thanks in advance

Hello Mike,

I think you want to resolve a relation inside of a relation. Am I seeing this correctly?

With best regards

That’s right.
I’ve got around it by doing another request inside the project component that gets the tools but I would prefer it to work this way to reduce requests.


That is correct. Using a second request is the actual way it works as there is no way to resolve a relation inside of a relation.

With best regards and have a great weekend!