Speakers Query

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

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

You may supply a speaker photo in several ways. Using the photoUrl attribute, you may supply a URL. Using the photo attribute you may supply either a Base64 encoded string or an image file using the multipart/form-data content type.

An image file is preferred to the Base64 string as it will be smaller.

To provide the photo as a file, you should use the multipart/form-data content type. For example:

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

Notice that 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, 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,alongbase64encodedstring"}, gatheringId: 232) { firstName lastName id } }'