The GraphQL API provides a flexible, type-safe interface for querying and mutating data. Use GraphQL when you need to fetch multiple related resources in a single request or when you want to specify exactly which fields to retrieve.
Endpoint:
POST https://api.example.com/graphql
Request Format:
POST /graphql HTTP/1.1
Host: api.example.com
Authorization: Bearer your_access_token
Content-Type: application/json
{
"query": "query { recordings { id title } }"
}
![]()
Query data using GraphQL:
Simple Query:
query {
recordings {
id
title
duration
created_at
}
}
Query with Variables:
query GetRecording($id: ID!) {
recording(id: $id) {
id
title
transcript {
text
speakers {
name
}
}
}
}
Variables:
{
"id": "123"
}
Query with Filters:
query {
recordings(
first: 10
page: 1
filter: {
status: "completed"
folder_id: 456
}
) {
data {
id
title
}
paginatorInfo {
total
currentPage
hasMorePages
}
}
}
![]()
Modify data using GraphQL mutations:
Create Recording:
mutation CreateRecording($input: CreateRecordingInput!) {
createRecording(input: $input) {
id
title
status
}
}
Variables:
{
"input": {
"title": "Team Meeting",
"description": "Weekly team sync",
"folder_id": 123
}
}
Update Recording:
mutation UpdateRecording($id: ID!, $input: UpdateRecordingInput!) {
updateRecording(id: $id, input: $input) {
id
title
updated_at
}
}
Delete Recording:
mutation DeleteRecording($id: ID!) {
deleteRecording(id: $id) {
success
message
}
}
![]()
Explore the GraphQL schema:
Introspection Query:
query IntrospectionQuery {
__schema {
types {
name
description
fields {
name
type {
name
}
}
}
}
}
Use GraphQL playground or tools like GraphiQL to explore the schema interactively.
![]()
Fetch Recordings with Transcripts:
query {
recordings(first: 5) {
data {
id
title
transcript {
text
speakers {
id
name
}
}
summary {
text
actionItems {
text
assignee
}
}
}
}
}
Batch Query Multiple Resources:
query {
recordings: recordings(first: 10) {
data { id title }
}
meetings: meetings(first: 10) {
data { id title }
}
folders: folders {
data { id name }
}
}
Complex Nested Query:
query {
recording(id: "123") {
id
title
meeting {
id
title
attendees {
name
email
}
}
transcript {
segments {
start_time
end_time
text
speaker {
id
name
}
}
}
signals {
type
domain
text
confidence
}
}
}
![]()