Skip to content
Last update: January 30, 2024

Contacts query

This connection allows you to retrieve the desired list of contacts.

Arguments

Argument Description
after {String} A cursor value to paginate through the results.
first {Int} The number of pages in a single query.
searchPhrase {String} A search phrase to filter the organizations based on their names or other relevant attributes.
sort {String} Specifies the sorting order of the returned organizations.

Possible returns

Possible return Description
ContactConnection A connection to a list of contacts.

Examples

query {
  contacts(
    after: "cursorValue"
    first: 10
    searchPhrase: "John"
    sort: "name"
  ) {
    edges {
      node {
        id
        name
        email
        phone
      }
    }
  }
}
{
  "data": {
    "contacts": {
      "edges": [
        {
          "node": {
            "id": "contact1",
            "name": "John Doe",
            "email": "[email protected]",
            "phone": "123-456-7890"
          }
        },
        {
          "node": {
            "id": "contact2",
            "name": "John Smith",
            "email": "[email protected]",
            "phone": "987-654-3210"
          }
        },
        {
          "node": {
            "id": "contact3",
            "name": "John Walker",
            "email": "[email protected]",
            "phone": "555-555-5555"
          }
        }
      ]
    }
  }
}