How to use queryContentsByIds with ClientLibrary

I read this post from the link ([IMPLEMENTED] Retrieving a post from graphql without know which schema it belongs to - #3 by Sebastian) and immediately went to check the documentation on how to use queryContentsByIds in a graphQL with ClientLibrary, but I couldn’t find it. My idea was to use a generic query like this

{
  queryContentsByIds(
    ids: ["xyz", "yzx", "zxy"]
  ) {
    ... on Content {
      id
      status
      __typename
    }
  }
}

Is there a generic content client to do it?
Do I need to follow the same content data class pattern? (.NET | Squidex)

I have a few exampes here:

You either need…

  1. A class structure that represents your response.
  2. Something dynamic like JToken and then parse it manually.
1 Like