Introducing Zoho CRM GraphQL APIs: Our Next Frontier!

Introducing Zoho CRM GraphQL APIs: Our Next Frontier!

Update 25th Sep 2024:
GraphQL APIs are now open across all DCs including IN DC for Enterprise, Zoho One Enterprise, CRM Plus and Ultimate edition orgs. Please note that GraphQL APIs are not available for Trial Edition of these editions.

Update 27th Aug 2024:
Opening up GraphQL APIs for more editions
We are delighted to inform you that GraphQL APIs are currently available across all DCs except IN DC for Enterprise, Zoho One Enterprise and CRM Plus edition orgs. Please note that GraphQL APIs are not available for Trial Edition of these editions. We estimate that GraphQL APIs will be open in IN DC within one month. If your org is in IN DC and you are eager to try out GraphQL APIs,  you can register for early access here: GraphQL Early Access Registration.

Update 26th Apr 2024:
Early access available for Enterprise, Zoho One Enterprise and CRM Plus editions.
To register for early access, please fill in this form: GraphQL Early Access Registration.
Hello Developers,

We are excited to announce the release of Zoho CRM GraphQL APIs as a part of Zoho CRM - Q1 2024 update!
Our GraphQL APIs are now available to all Zoho CRM Ultimate paid orgs across all DCs. You can refer to the help documentation on GraphQL APIs for details on everything GraphQL .

What are GraphQL APIs?

Let us use a sandwich shop analogy to explain the concept of GraphQL.
Imagine you're at a sandwich shop - Cafe Rest Stop. The menu is extensive, offering various sandwiches with different ingredients. You want a tuna sandwich, and you're not a fan of pickles. You ask the chef for a sandwich without pickles. However, you are informed that the pickles are already prepped and placed on the sandwiches, and they can not be removed. You're faced with a dilemma: either accept the tuna sandwich with pickles or choose a different sandwich altogether.
This scenario mirrors the traditional REST endpoint model. When you make a request to a REST API endpoint, you receive a predefined set of data in response, much like ordering a sandwich with fixed ingredients. If you need something slightly different, like excluding certain data fields or including additional ones, you're often out of luck unless the API specifically offers those customization options.

Now, let's imagine another sandwich shop - Cafe Graffiti.  Here, instead of ordering predefined sandwiches, you have the freedom to customize your sandwich exactly the way you want it. You start with a base sandwich, like tuna, and then you can specify your preferences for each ingredient. You can say "no pickles," "extra lettuce," or "add avocado," and the chef will tailor your sandwich accordingly.
This is analogous to GraphQL. With GraphQL, you have a single endpoint through which you can request exactly the data you need, no more and no less.  You specify the fields you want to retrieve, and you get back precisely that data in the format you requested. 
Excited to tap into the potential of Zoho CRM GraphQL APIs? Refer to the 'Getting Started' page in the help documentation, accessible through this link.

Here is how it works:

Our GraphQL APIs offer a comprehensive solution for accessing both data and metadata within your Zoho CRM org.  From retrieving metadata across various resources like modules, Users, KanbanView, Profiles and so on,  to supporting advanced querying capabilities that streamline the retrieval of records in different modules, our GraphQL APIs offer unparalleled flexibility. GraphQL empowers you to precisely request resources, it's field, and the relationships between different resources.
But that is not all. Zoho CRM GraphQL APIs allows  you to aggregate data from multiple dependent or independent entities in a single API call. Whether you're looking to minimize network round trips or ensure optimal bandwidth utilization, our GraphQL APIs have you covered.

Here's an example of a GraphQL query that fetches records of Accounts containing "Truhlar" in their name along with their associated contacts and owner details. It also retrieves metadata about the "Accounts" module, including information about relevant fields like "Account_Name," "Owner," and "Parent_Account.


{
    Records {
        Accounts(where: { Account_Name: { like: "%Truhlar%" } }) {
            _data {
                id {
                    value
                }
                Account_Name {
                    value
                }
                Parent_Account {
                    id {
                        value
                    }
                    Account_Name {
                        value
                    }
                }
                Contacts__r {
                    _data {
                        id {
                            value
                        }
                        Full_Name {
                            value
                        }
                        Email {
                            value
                        }
                        Owner {
                            id {
                                value
                            }
                            first_name {
                                value
                            }
                            email {
                                value
                            }
                            last_name {
                                value
                            }
                            zuid {
                                value
                            }
                        }
                    }
                }
                Owner {
                    id {
                        value
                    }
                    email {
                        value
                    }
                    zuid {
                        value
                    }
                    last_name {
                        value
                    }
                    first_name {
                        value
                    }
                }
            }
        }
    }
    Meta {
        Modules(filter: { api_name: "Accounts" }) {
            _data {
                id
                api_name
                module_name
                visibility
                fields(filter: { api_names: ["Account_Name", "Owner", "Parent_Account"] }) {
                    _data {
                        id
                        api_name
                        display_label
                        data_type
                    }
                }
            }
        }
    }
}


Similar to our Rest APIs, Zoho CRM GraphQL API calls are also associated with credits. Each API call may consume up to 10 credits, with additional credits required for specific resource types. In addition to that, we have query complexity based on the workload a query exerts on CRM servers and depth. Please refer to the Credits, Complexity, and Depth page on our help document for details.
We hope you are excited to try out Zoho CRM GraphQL APIs. As always, your suggestions and requests are most welcome. We will work on fulfilling them as promptly as we can.


Thank you,

Zoho CRM API Team