GraphQL is an open-source database query and manipulation language, developed by the GraphQL Foundation. At it’s core a GraphQL query let’s you specify exactly what data is required, and in the structure and format that you want back.
With our new package, GraphSQL you can add GraphQL support to Salesforce, allowing your integrations to be more efficient by being able to get data from several objects in a single request!
To give you an example, let’s take the following Salesforce SOQL query:
SELECT Id, Name FROM Account LIMIT 10In GraphQL this becomes:
{
Account(limit:10) {
Id
Name
}
}
This JSON-like structure is the format all GraphQL queries use, and one of the benefits of this is that you get back data from GraphQL in the exact same format.
{
Account(limit:1) {
Id
Name
Opportunity {
Id
Name
Amount
}
Contact {
Id
FirstName
Task {
Subject
DueDate
}
}
}
}
You can see we’ve simply nested each of the child objects as a separate JSON-like object, with all the fields. This would retrieve us all the data we need in one request!
To make things even easier, the package also adds a playground into Salesforce, which is a page where you can test out different GraphQL queries without writing any code.
Test out GraphQL queries in real-time on your live Salesforce data
This makes it really easy to test out your queries on the platform before then adding them into your third party integrations.
GraphSQL is free to use and publicly available on the AppExchange!
(If you want to use GraphSQL in a scratch org, the Package Id is 04t4J000001O4O1)
We’ve also got a Test Drive available so you can go and use the playground without having to install anything.
Try it out today for free!
We’re always improving our free products and trying to make them as useful as possible for the Salesforce ecosystem, so we’d love to hear your feedback on it. You can reach out to us below or through our feedback form.