Under Community Review

Expand linked ("nested") Topics in the Public Content API

Similar to this idea for Dynamic Experience Delivery queries for Tridion Sites, this request is for the ability to retrieve the nested/linked Topics in the GraphQL-based Public Content API (PCA) for Publications, especially with the semantic "ish-" queries.

The use case is to give application or portal developers using the Content Delivery APIs a way to get back a Publication and its contents in fewer queries. This would simplify development and also reduce the number or requests sent to the CD endpoint "over the wire." There doesn't seem to be a simple way to automatically get linked Topics as objects, rather than as IDs which need to be resent over additional queries for the Topic content. 

For example, we have a project where we wanted to get back a Publication, which may have 10-20 Topics on it, as well as its content in one query.

Maybe others can add their thoughts on what an ideal query (and any parameters) might look like, but so far:

  1. ishTocStructure seems like a promising candidate to improve, since it brings back a table of contents which represents a Map and its Submaps from Tridion Docs. However, as of DXD 12, this seems to only give us back IDs that we then use to query the specific Topics separately.
  2. Alternatively, ishTopics can get all the Topics and content for a given Publication, but the topics don't seem to come back in the same order as ishToc or ishTocStructure. Maybe there could be a parameter to get the Topics in the order of the map.  

Either way, I think we'd want these improvements mostly on the Tridion Docs Semantic Content Model queries (introduced with Tridion Docs 15 and DXD 12) since these are much more Docs-centric.

Parents
  • We do this within a topic directly to get back nested topics/drill into related topics, and so on. It follows on from the semantic content modelling. We could allow people to go further and pull back topics and so on from a publication. We could also do the same for the TOC and indeed, pull back the TOC from a publication too. Seems like a good thing to add since as you say, it would allow access to all content from a single request.

    Something along the lines of:

    {
      ishPublication( ... ) {
           toc(filterParams) {
    title
    url
    topic {
    title
    relatedLinks {
    url
    }
    xhtml
    }
           }

           topics( topicFilter ) {
               title         
    relatedTopics {
    ...
    }
    xhtml
          }      
     }

    With some extra optional filter(s) we can extend this. Since the entire Ish model is built with semantics in mind, this wouldn't be too much effort since the general mechanism is already in place.

Comment
  • We do this within a topic directly to get back nested topics/drill into related topics, and so on. It follows on from the semantic content modelling. We could allow people to go further and pull back topics and so on from a publication. We could also do the same for the TOC and indeed, pull back the TOC from a publication too. Seems like a good thing to add since as you say, it would allow access to all content from a single request.

    Something along the lines of:

    {
      ishPublication( ... ) {
           toc(filterParams) {
    title
    url
    topic {
    title
    relatedLinks {
    url
    }
    xhtml
    }
           }

           topics( topicFilter ) {
               title         
    relatedTopics {
    ...
    }
    xhtml
          }      
     }

    With some extra optional filter(s) we can extend this. Since the entire Ish model is built with semantics in mind, this wouldn't be too much effort since the general mechanism is already in place.

Children
No Data