Skip to content

Packets

Retrieving lists of unread messages

Use the channel query syntax to return a list of Channel information objects.

query { 
    channelQuery(org: Uuid!, query: String!): ChannelInfoList!
}

Sending a message

sendPacket

mutation {

  sendPacket(
    org:"b8d93193-83fa-4e18-b942-addeb2c7350d", 
    msg:{
      kind: "group",
      sink: "99de4ae7-0597-4ffd-a862-c1358507eb43",
      payloadSchema: "json.text",
      payload: "{'text':'Hey there!'}",
      notifyMode: "all",
      body: "Hey there!"
    }
  ) {
    id
    result
    error
    records
  }

}

Editing a message

editPacket

mutation {

  editPacket(
    org:"b8d93193-83fa-4e18-b942-addeb2c7350d", 
    id: "O9XNQvTEOWXsBVbrYqWcOkeSDupjRWO14q",
    msg:{
      kind: "group",
      sink: "99de4ae7-0597-4ffd-a862-c1358507eb43",
      payloadSchema: "json.text",
      notifyMode: "all",
      body: "Hey there! edited"
    }
  ) {
    id
    result
    error
    records
  }

Sending a singleton message

mutation {

  registerSingletonPacket(
    org:"b8d93193-83fa-4e18-b942-addeb2c7350d", 
    msg:{
      payload: "{'location':'xxxxx'}",
      kind: "data",
      body: "shared location",
      sink: "5aa21cd4-7581-4650-8c55-b080c571e339",
      payloadSchema: "weave.location",
      notifyMode: "none"
    }
  ) {
    id
    result
    error
    records
  }

}

Removing a singleton messge

mutation {

  removeSingletonPacket(
    org:"b8d93193-83fa-4e18-b942-addeb2c7350d", 
    msg:{
      kind: "data",
      sink: "5aa21cd4-7581-4650-8c55-b080c571e339",
      payloadSchema: "weave.location",
      notifyMode: "none"
    }
  ) {
    id
    result
    error
    records
  }

}