Powerful and flexible queries with GraphQL
https://api.cognexiaai.com/graphqlquery {
contacts(limit: 10) {
id
firstName
lastName
email
company
createdAt
}
}Response:
{
"data": {
"contacts": [
{
"id": "cnt_123",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"company": "Acme Corp",
"createdAt": "2026-01-15T10:00:00Z"
}
]
}
}query {
contacts(
where: {
company: { contains: "Tech" }
createdAt: { gte: "2026-01-01" }
}
orderBy: { createdAt: DESC }
skip: 0
take: 20
) {
id
firstName
lastName
email
company
tags
}
contactsCount(
where: {
company: { contains: "Tech" }
}
)
}Filters: contains, equals, in, gte, lte, gt, lt, startsWith, endsWith
mutation CreateContact($input: CreateContactInput!) {
createContact(input: $input) {
id
firstName
lastName
email
company
createdAt
}
}Variables:
{
"input": {
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"company": "Tech Inc",
"tags": ["lead", "enterprise"]
}
}mutation UpdateContact($id: ID!, $input: UpdateContactInput!) {
updateContact(id: $id, input: $input) {
id
firstName
lastName
company
tags
updatedAt
}
}mutation DeleteContact($id: ID!) {
deleteContact(id: $id) {
success
message
}
}query {
organization(id: "org_123") {
id
name
employees {
id
firstName
lastName
department {
id
name
manager {
id
firstName
lastName
}
}
}
contacts {
id
firstName
email
deals {
id
title
value
stage
}
}
}
}fragment ContactFields on Contact {
id
firstName
lastName
email
company
phone
tags
}
query {
recentContacts: contacts(
orderBy: { createdAt: DESC }
take: 5
) {
...ContactFields
}
enterpriseContacts: contacts(
where: { tags: { has: "enterprise" } }
) {
...ContactFields
}
}subscription OnContactCreated {
contactCreated {
id
firstName
lastName
email
company
createdAt
}
}
subscription OnDealUpdated($dealId: ID!) {
dealUpdated(id: $dealId) {
id
title
stage
value
updatedAt
}
}WebSocket URL: wss://api.cognexiaai.com/graphql
query IntrospectionQuery {
__schema {
types {
name
kind
description
fields {
name
type {
name
kind
}
}
}
}
}GraphQL Playground: Visit https://api.cognexiaai.com/graphql in your browser for interactive exploration