Related Links Query

A related link is a link or an uploaded file that belongs to a parent item of an event (gathering in the schema, selected with gatheringId ), such as an agenda session or an exhibitor. Examples are presentations and handouts. The RelatedLink type holds the data of a link.

Query

relatedLinks

relatedLinks lists the related links of an event. The list has all related links of the event.

relatedLinks takes only gatheringId, as an ID!. It has no filters.

You can also read the links of one agenda session or one exhibitor. Use the relatedLinks field of AgendaSession or of Exhibitor.

The fields of a related link

FieldContent
nameThe title of the link.
urlThe address of the link. For an uploaded file, it is a signed address. The signed address expires after one hour.
filetrue when the link points to an uploaded file. false when the link has a direct address.
externalBrowsertrue when the app opens the link in an external browser.
positionThe position of the link in the list.
resourceTypeThe kind of the parent. The value is Event for an agenda session and Exhibitor for an exhibitor. Other parents, such as an attendee, also have related links.
resourceIdThe id of the parent item.

List the related links

query ListRelatedLinks($gatheringId: ID!) {
  relatedLinks(gatheringId: $gatheringId) {
    id
    name
    url
    file
    externalBrowser
    position
    resourceType
    resourceId
  }
}

{
  "data": {
    "relatedLinks": [
      {
        "id": "4001",
        "name": "Slides",
        "url": "https://example.com/slides.pdf",
        "file": false,
        "externalBrowser": true,
        "position": 1,
        "resourceType": "Event",
        "resourceId": "501"
      },
      {
        "id": "4002",
        "name": "Product sheet",
        "url": "https://example.com/product-sheet.pdf",
        "file": false,
        "externalBrowser": false,
        "position": 1,
        "resourceType": "Exhibitor",
        "resourceId": "701"
      }
    ]
  }
}

Attach links to an agenda session

Only agenda sessions take related links in a mutation. Send a list of RelatedLinkParams in the relatedLinks field of createAgendaSession or updateAgendaSession.

Each link needs a name. The url is the address that the link opens. The externalBrowser field is optional.

mutation AttachLinks($gatheringId: Int!, $id: Int!) {
  updateAgendaSession(
    gatheringId: $gatheringId
    id: $id
    agendaSession: {
      relatedLinks: [
        { name: "Slides", url: "https://example.com/slides.pdf", externalBrowser: true }
      ]
    }
  ) {
    id
    relatedLinks {
      name
      url
    }
  }
}

The list that you send replaces the old list of links of the session. If the session has an externalSource, Touchpoint keeps the links that someone added in Touchpoint. See Agenda sessions.

An exhibitor has no input for related links.

This article is a copy of Related links in the Touchpoint API documentation.

Source: https://touchpoint-support.certain.com/hc/en-us/articles/45282707260439-Related-Links-Query

Published:

Keywords: Related Links Query, relatedLinks, gatheringId, RelatedLink, AgendaSession, Exhibitor