How do I fetch relational many-to-many junction using the SDK?

I have a many-to-many select box with a relationship like so:

But running the below code returns the full post object but with the “releated_gear” item completely missing, not null, just not included.

const posts = await directus.request(
    readItems("posts", {
      fields: ["*"],
    }),
  );

Hello @Floh make sure you provide the read access to the junction collection and also the fields. Check the permissions and policies in the settings

Hi @Floh! Besides what @ahmad_quvor already mentioned, also be aware you’re only fetching the top-level fields of posts by using *. If you want to fetch the nested related, make sure it’s included in the fields you’re reading. See https://directus.io/docs/guides/connect/query-parameters#fields for more information :slight_smile: