Always-online persisted queries

Jul 23rd, 2021view comments

There is a new "Fallback on error" option when you create a persisted query. Use it to keep your queries online even when the underlying API is down or you hit a rate-limit.

To use it, you also need to add caching to the query.

You can create a persisted query from the Persisted Queries section of the OneGraph dashboard, or with a mutation:

mutation PersistQuery($query: String!, $appId: String!) {
  oneGraph {
      input: {
        query: $query
        appId: $appId
        cacheStrategy: { timeToLiveSeconds: 600 }
        fallbackOnError: true
    ) {
      persistedQuery {

Read more about persisted queries in the docs.

Send Subscription Delivery metrics to Honeycomb

Jun 27th, 2021view comments

In addition to sending metrics for every API call OneGraph makes on your behalf, the Monitoring tab on the dashboard now supports sending subscription delivery metrics to Honeycomb.

Each event includes the following keys:

destinationStringThe url of the webhook destination, or websocket
subscriptionIdStringThe id of the subscription
operationNameStringThe optional operationName of the subscription, e.g. GitHubRepoSubscription
statusCodeIntegerThe status code OneGraph received from your server, if it received a status code
webhookRequestMillisecondsIntegerThe time, in milliseconds, it took us to send the webhook POST request to the server
timedOutBooleantrue if the request timed out before we finished sending the webhook
truncatedResponseBodyStringThe first 512 bytes of the response from the server, if OneGraph did not receive a 2xx or a 410 status code

Send API metrics to Honeycomb

Jun 24th, 2021view comments

There is a new page on the OneGraph dashboard dedicated to monitoring.

Our first monitoring feature will send metrics from the OneGraph service directly to your Honeycomb project.

Once configured, OneGraph will send an event to Honeycomb for each API call made while executing one of your GraphQL queries. The event will contain the following keys:

hostStringThe host, e.g.
statusCodeIntegerThe HTTP status code, e.g. 200
methodStringThe HTTP method, e.g. GET

Monitoring page

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.

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

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 {
      previousOpportunity {        

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 {
            startDate: "2020-04-27"
            endDate: "2020-05-04"
            dimensions: [DATE, QUERY]
            dimensionFilters: [
                dimension: COUNTRY
                operator: EQUALS
                expression: "GBR"
          ) {
            rows {

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.