AlmondTill/G3N API

On this page

reactToNote

mutation · in the family Your own session

What it does

React to a note with one of the canned emojis — a lightweight mark everyone can see and count.

React to ONE note: one mark per (you, emoji) — a duplicate refuses CONFLICT (remove it first); emoji ∈ the canned token set (thumbs_up, check, question, eyes, tada, warning, plus, heart — STRICT). The note must exist on the named target in your workspace. Answers the note's FRESH reaction groups. Requires authentication.

What happens

One mark per person per emoji on a note; reacting again with the same emoji is refused — remove yours first to change your mind. The note itself never changes.

Who may call it

Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.

Arguments

NameTypeRequiredNotes
targetConstructIdID ID!yesNo further notes.
noteIdID ID!yesNo further notes.
emojiString String!yesNo further notes.

Returns

NoteReactionGroup [NoteReactionGroup!]! — One reaction group.

Example request

mutation ExampleReactToNote($targetConstructId: ID!, $noteId: ID!, $emoji: String!) {
  reactToNote(targetConstructId: $targetConstructId, noteId: $noteId, emoji: $emoji) {
    emoji
    count
    userIds
  }
}

Variables:

{
  "targetConstructId": "01900000-0000-7000-8000-79e077380000",
  "noteId": "01900000-0000-7000-8000-cf06f4680000",
  "emoji": "<emoji>"
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "reactToNote": [
      {
        "emoji": "<emoji>",
        "count": 1,
        "userIds": [
          "01900000-0000-7000-8000-f79e33c40000"
        ]
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in