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 {
    updatedSobjects(
      start: "2020-10-01T00:00:00+00:00"
      end: "2020-10-16T00:00:00+00:00"      
    ) {
      leads(last: 2) {
        latestDateCovered
        ids
        nodes {
          id
          name
          createdDate
        }
      }
    }
  }
}

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. node.name), OneGraph will make one additional API request for every 500 objects. If you request nested fields (e.g. node.account.name), 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.

PKCE extension for OAuth in OneGraphAuth

Sep 24th, 2020view comments

OneGraphAuth now uses the PKCE extension for OAuth by default.

Upgrade to onegraph-auth@3.0.0 to use the new flow.

Learn more about the security benefits of PKCE at oauth.com.

Support for GitHub's expiring tokens

Sep 24th, 2020view comments

OneGraph supports expiring tokens for GitHub apps.

You can learn how to enable expiring tokens for your GitHub app in the GitHub docs. You don't need to do anything on OneGraph.

To use your GitHub app with OneGraph, create a custom OAuth client from Auth Services > Custom OAuth on the OneGraph dashboard.

Dashboard Update: Change your app's name

Aug 28th, 2020view comments

It's now possible to change your app's name from the dashboard. Click on the pencil next to the app's name in the App Information card to edit it.

👍 1

Get previous version of object in Salesforce subscriptions

Jul 13th, 2020view comments

Our Salesforce subscriptions now include the previous version of the object that was updated.

Example query:

subscription SalesforceOpportunityUpdateSubscription {
  salesforce {
    opportunityUpdated {
      opportunity {
        id        
        stageName
      }
      previousOpportunity {        
        stageName
      }
    }
  }
}

Read more about OneGraph's GraphQL subscriptions in the docs.

Hop into our Spectrum channel if you have any questions.

Support for Heroku Preview Apps in CORs Origins

Jun 2nd, 2020view comments

If your site uses Heroku's review apps, you no longer need to add every new review url to your CORs Origins on OneGraph.

When you add a review app url in the CORs Origins form on the dashboard, OneGraph will automatically detect that it's a Heroku review app and allow access to all of your review apps.

Try it out at OneGraph.

Hop into our Spectrum channel if you have any questions.

Beta support for Google Search Console

May 5th, 2020view comments

Analyze your site's top search keywords with our just-released Google's Search Console integration.

The following query will show you all of your top search keywords for all the sites you manage that originate from the UK, all grouped by date and search term.

query GoogleSearchConsoleQuery {
  google {
    searchConsole {
      sites {
        nodes {
          siteUrl
          query(
            startDate: "2020-04-27"
            endDate: "2020-05-04"
            dimensions: [DATE, QUERY]
            dimensionFilters: [
              {
                dimension: COUNTRY
                operator: EQUALS
                expression: "GBR"
              }
            ]
          ) {
            responseAggregationType
            rows {
              clicks
              ctr
              impressions
              keys
              position
            }
          }
        }
      }
    }
  }
}

Be sure to follow our instructions in the docs to set up a custom OAuth client for Google Search Console.

Try it out at OneGraph.

Hop into our Spectrum channel if you have any questions.

Added play history to Spotify

May 4th, 2020view comments

Our Spotify integration now includes play history for the logged-in user.

query SpotifyPlayHistory {
  spotify {
    me {
      recentlyPlayed {
        nodes {
          playedAt
          track {
            name
          }
        }
      }
    }
  }
}

It requires a new user-read-recently-played scope. If you see an insufficient auth error after running the query, log out and back in to Spotify.

Try it out at OneGraph.

Hop into our Spectrum channel if you have any questions.

Better experience for invalid CORS/redirect destinations on sign-in

Apr 17th, 2020view comments

We've just pushed a bit of polish to help OneGraph developers add new domains (for example, in production)!

Previously if you asked a user to sign into a service on a url that wasn't allowed for your app, you would see something like this:

Our previous experience with that authentic programmer design sensibility

Before

We've cleaned up the design a bit, and linked to the app's dashboard where authorized owners will be able to add the new domain simply by clicking!

After!

See an example video of it on YouTube!

Docs for creating a custom OAuth client for Google services

Mar 5th, 2020view comments

Google has been tightening up their OAuth requirements over the last year, so we can no longer offer a default OAuth client for Google services.

We've added a new doc with instructions on how to set up a custom Google client with OneGraph.

If you'd like help setting up a custom client, hop into our Spectrum chat.

👍 1