Docs / API

Speakers

A speaker is a person who presents at an event (gathering in the schema, selected with gatheringId). The Speaker type holds the profile of the speaker.

To put a speaker in an agenda session, send the id of the speaker in the speakers field of the session. See Agenda sessions.

Queries and mutations

Field Use
speakers Lists the speakers of an event.
createSpeaker Creates a speaker. Returns the new speaker.
updateSpeaker Changes a speaker. Returns the changed speaker.
deleteSpeaker Deletes a speaker. Returns the deleted speaker.

The query takes gatheringId as an ID!. The mutations take gatheringId and id as an Int!.

List the speakers

speakers takes only gatheringId. It has no filters. The list includes hidden speakers. A hidden speaker has hidden set to true.

query ListSpeakers($gatheringId: ID!) {
  speakers(gatheringId: $gatheringId) {
    id
    firstName
    lastName
    jobTitle
    organization
    kind
    photo(style: "three_x")
  }
}
{
  "data": {
    "speakers": [
      {
        "id": "301",
        "firstName": "Avery",
        "lastName": "Stone",
        "jobTitle": "Chief engineer",
        "organization": "Example Corp",
        "kind": "Keynote",
        "photo": "https://example.com/speaker_images/301/three_x.png"
      }
    ]
  }
}

Photos

The photo field returns the address of the photo of the speaker. The photoUrl field is deprecated. Use photo.

photo takes the argument style. If you do not send style, the value is original. If the speaker has no photo, the field is null. An unknown style returns the error invalid style.

Style Size
original The uploaded photo, scaled down to fit in 600 by 600 pixels.
three_x 225 by 225 pixels at most, as a PNG file.
high_res_circle 150 by 150 pixels, cut to a circle, as a PNG file.

Create a speaker

createSpeaker takes gatheringId and a SpeakerCreateParams value in speaker. The fields firstName and lastName are required.

mutation CreateSpeaker($gatheringId: Int!) {
  createSpeaker(
    gatheringId: $gatheringId
    speaker: {
      firstName: "Avery"
      lastName: "Stone"
      jobTitle: "Chief engineer"
      organization: "Example Corp"
      kind: "Keynote"
      biography: "<p>Avery leads the engineering team.</p>"
      email: "avery@example.com"
      externalId: "SPK-17"
    }
  ) {
    id
    firstName
    lastName
    jobTitle
    externalId
  }
}
{
  "data": {
    "createSpeaker": {
      "id": "301",
      "firstName": "Avery",
      "lastName": "Stone",
      "jobTitle": "Chief engineer",
      "externalId": "SPK-17"
    }
  }
}

A create does not always make a new speaker. If the event has a speaker with the same firstName, lastName, and externalId, and that speaker has no externalSource, Touchpoint changes that speaker. A request without externalId matches only a speaker that has no externalId.

A speaker with no externalSource cannot have the same firstName, lastName, jobTitle, and organization as another speaker of the event. If it does, the create or the update fails.

To set a photo, send photoUrl with the address of a .jpg or .png file. You can also send photo. See Scalars.

Touchpoint copies the photo after the mutation returns. Until the copy is complete, photo shows no photo or the old photo.

Change a speaker

updateSpeaker takes gatheringId, the id of the speaker, and a SpeakerUpdateParams value in speaker. All fields are optional. An update changes only the fields that you send.

mutation UpdateSpeaker($gatheringId: Int!, $id: Int!) {
  updateSpeaker(
    gatheringId: $gatheringId
    id: $id
    speaker: { jobTitle: "Vice president of engineering" }
  ) {
    id
    firstName
    lastName
    jobTitle
  }
}
{
  "data": {
    "updateSpeaker": {
      "id": "301",
      "firstName": "Avery",
      "lastName": "Stone",
      "jobTitle": "Vice president of engineering"
    }
  }
}

Delete a speaker

deleteSpeaker takes gatheringId and the id of the speaker. It returns the speaker that it deleted.

mutation DeleteSpeaker($gatheringId: Int!, $id: Int!) {
  deleteSpeaker(gatheringId: $gatheringId, id: $id) {
    id
    firstName
    lastName
  }
}
{
  "data": {
    "deleteSpeaker": {
      "id": "301",
      "firstName": "Avery",
      "lastName": "Stone"
    }
  }
}