Support for the updated sobjects API in Salesforce

Oct 16th, 2020view comments

Use the new updatedSobjects field to keep track of the latest updates to your Salesforce data. Salesforce allows you to make requests for a range within the last 30 days.

The example below gets the last two leads that were updated or created this month:

query UpdatedLeadsQuery {
  salesforce {
      start: "2020-10-01T00:00:00+00:00"
      end: "2020-10-16T00:00:00+00:00"      
    ) {
      leads(last: 2) {
        nodes {

Keep the Salesforce rate-limits in mind when you use this new field. The query will only use up one of your API calls if you only request the ids field. If you only request top-level fields for the objects through the nodes field (e.g., OneGraph will make one additional API request for every 500 objects. If you request nested fields (e.g., OneGraph will use up at least one API request per node.

Up to 600,000 nodes could be returned in a single query, so it's best to use the first or last arg to limit the number of API requests.

OneGraph also supports GraphQL subscriptions for Salesforce. Learn more about subscriptions in the docs.

Cody Garbrandt commented 6 months ago