TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation User Notifications Get Notification

Get Notification

On this page

GraphQL endpoint: /user

A single notification of the current user's, by id — for resolving one already known by id rather than reading a list. Null when the id isn't the caller's, which reads the same as one that never existed.

kind says what happened and subjectId names what it happened to. subjectStatus is that subject's status as it stood when the notification was written, not as it stands now, so read the subject itself before acting on it. context carries any further id needed to reach the subject.

Query

query ($id: ID!) {
  notification (id: $id) {
    id
    text
    kind
    subjectId
    subjectStatus
    context
    status
  }
}

Variables

{
  "id": "00000000-0000-4000-8000-000000000002"
}

Response

{
  "data": {
    "notification": {
      "context": {
        "group_id": "00000000-0000-4000-8000-000000000001"
      },
      "id": "00000000-0000-4000-8000-000000000002",
      "kind": "GROUP_USER_MEMBER_JOIN_REQUEST",
      "status": "UNREAD",
      "subjectId": "00000000-0000-4000-8000-000000000003",
      "subjectStatus": "pending",
      "text": "Someone asked to join your group"
    }
  }
}