Are you looking to connect external data sources managed via GraphQL to Salesforce? This is a great way to provide users access to external databases. With Salesforce Connect adapter for GraphQL, you can access and integrate data from external sources. In this article, I will give an introduction to using GraphQL and Salesforce to connect with databases.
Bounty Unveiled: Secrets of Connecting with Databases
- Salesforce Connect adapter for GraphQL allows you to access and integrate data from external sources like Amazon RDS or Amazon Redshift.
- The true secret is the new adapter for GraphQL uses External Objects and Named Credentials in Salesforce.
- Setting up Salesforce Connect to access external data exposed via GraphQL is easy. It involves creating an external data source and syncing the data source with GraphQL.
- The data from these external databases can be used by many Salesforce tools including flows, Reports, or Apex classes.
Laying the Foundation for Using GraphQL: Where the Tale Begins
GraphQL is a query language for APIs that allows you to retrieve only the data you need, making your API calls more efficient.
Prerequisites and Permissions
Before you can start using the Salesforce Connect adapter for GraphQL, you need to make sure you have the right permissions and prerequisites.
Prerequisites
To use the Salesforce Connect adapter for GraphQL, you need to have a Salesforce org with the Salesforce Connect feature enabled. You also need to have an external data source that exposes its capabilities via GraphQL. If you don’t have an external data source set up yet, you’ll need to do that first.
Permissions
To set up and use the Salesforce Connect adapter for GraphQL, you need to have the right permissions in your Salesforce org. Users in Salesforce would need permissions to allow them to use External Credentials and to make callouts in Salesforce. This requires creating a permission set specifically for this or using an existing permission set that already has these capabilities. These settings can be found under the System Permission and the Object Permission in the Permission Sets. Or you can use Profile settings with External Credentials allowed.
- In the System permissions you will want to select Apex REST Services and API Enable to allow for users to make callouts.
- You will also want to go to the Standard Object Permissions and select: User External Credentials and Edit the User External Credentials. Be aware, this access gives users read, create, edit and delete access.
Once you have the prerequisites and permissions in place, you’re ready to start setting up the Salesforce Connect adapter for GraphQL.
Cost
There is an extra cost to have the Salesforce Connect adapter included in most Salesforce editions.
Need help finding the Salesforce gems?
Let us help! Were seasoned Salesforce treasure hunters.