updateAttendee

4 years ago · Updated

Arguments

GraphQL Mutation

mutation {
  updateAttendee(
    attendee: { firstName: "David Foster", lastName: "Wallace"}
    gatheringId: 232
    id: 71111
  ) {
    firstName
    lastName
    id
  }
}

CURL Request

curl -X POST https://api.certaintouchpoint.com/graphql \
-H 'Content-Type: application/graphql' \
-H 'Authorization: Bearer 123abcveryLongAuthorizationToken456def' \
-d '{ mutation { updateAttendee(attendee: { firstName: "David Foster", lastName: "Wallace"}, gatheringId: 232, id: 71111) { firstName lastName id } }'

GraphQL Response

{
  "data": {
    "updateAttendee": {
      "lastName": "Wallace",
      "id": "71111",
      "firstName": "David Foster"
    }
  }
}

AttendeeParams

Providing a Photo/Avatar

You may supply an attendee 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 { createAttendee(attendee: { 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 { createAttendee(attendee: { firstName: "David Foster", lastName: "Wallace", photo: "data:image/jpg;base64,alongbase64encodedstring"}, gatheringId: 232) { firstName lastName id } }'

Retrieving Relationships

Creating Relationships

To update assigned agenda sessions assignedAgendaSessionIds (Array of Ids) The unqiue ID of the attendee from it\'s source (i.e., the attendee id in your system). Not displayed.