Speakers Query

Arguments

CURL Request

curl -X POST https://api.certaintouchpoint.com/graphql -H 'Content-Type: application/graphql' -H 'Authorization: Bearer 123abcveryLongAuthorizationToken456def' -d '{speakers(gatheringId: 232) {firstName lastName}}'

This query will return the lastName, id, and externalId for each speaker.

Query Example

{
  speakers(gatheringId: 4422) {
    firstName
    lastName
    id
    externalId
    createdAt
    updatedAt
  }
}

CURL Request

curl -X POST https://api.certaintouchpoint.com/graphql -H 'Content-Type: application/graphql' -H 'Authorization: Bearer 123abcveryLongAuthorizationToken456def' -d '{ speakers(gatheringId: 232) { firstName lastName id externalId bookmarkedAgendaSessions { name startsAt endsAt id externalId } surveyResponses {id answers { id question { id name questionData questionType} answer }}}}'

SpeakerParams

Attributes

Providing a Photo/Avatar

To provide the photo as a file

curl -X POST https://api.certaintouchpoint.com/graphql -H 'Content-Type: application/graphql' -H 'Authorization: Bearer 123abcveryLongAuthorizationToken456def' -F query='mutation { createSpeaker(speaker: { firstName: "David Foster", lastName: "Wallace", photo: "photo_argument"}, gatheringId: 232) { firstName lastName id } }' -F photo_argument=@photo.jpg

The value of the photo attribute is the name of the argument used to refer to the photo file.

To provide the photo file as a Base64 encoded string

curl -X POST https://api.certaintouchpoint.com/graphql -H 'Content-Type: application/graphql' -H 'Authorization: Bearer 123abcveryLongAuthorizationToken456def' -d '{ mutation { createSpeaker(speaker: { firstName: "David Foster", lastName: "Wallace", photo: "data:image/jpg;base64,alongbase64encodedstring"}, gatheringId: 232) { firstName lastName id } }'

To provide the photo file as a Base64 encoded string, prefix the photo string with the information:

data:<mime type>;base64,<encoded data>

For example:

curl -X POST https://api.certaintouchpoint.com/graphql -H 'Content-Type: application/graphql' -H 'Authorization: Bearer 123abcveryLongAuthorizationToken456def' -d '{ mutation { createSpeaker(speaker: { firstName: "David Foster", lastName: "Wallace", photo: "data:image/jpg;base64,encodeddata"}, gatheringId: 232) { firstName lastName id } }'

Notice that the value of the photo attribute is the name of the argument used to refer to the photo file.

Providing the photo file as a Base64 encoded string, prefix the photo string with the Information:

data:<mime type>;base64,<encoded data>

Was this article helpful?

Related articles

Comments