• Docs
  • Pricing
  • Support
  • Blog
  • Login

›Subscriptions

Intro

  • What's OneGraph?
  • How does it work?
  • Creating your first app
  • Making your first query
  • OneGraphiQL
  • Authentication & Security Overview
  • Custom Google Auth

On the frontend

  • Using with Apollo
  • Log in to services
  • Example with create-react-app

External Authentication

  • What are JWTs?
  • AuthGuardian
  • Securing your Apollo server
  • Securing your Hasura API
  • Securing your Netlify site
  • Securing your express.js app
  • Advanced JWT customization with webhooks

Subscriptions

  • Subscriptions
  • Webhook-based subscriptions
  • Websocket-based subscriptions
  • Salesforce subscriptions
  • GitHub subscriptions
  • Gmail Subscriptions

Advanced

  • Persisted Queries
  • Mailchimp Signup with Persisted Queries

GitHub subscriptions

OneGraph offers event-based subscriptions for repo-centered events on GitHub.

The following example will subscribe to new issue comments:

subscription GitHubIssueComments($repoOwner: String!, $repoName: String!) {
  github {
    issueCommentEvent(input: {repoOwner: $repoOwner, repoName: $repoName}) {
      action
      comment {
        author {
          ... on GitHubUser {
            name
          }
        }
        body
      }
    }
  }
}

By default, you must be an admin on a GitHub repo to create subscriptions.

If you would like to allow non-admins to create subscriptions, go to Subscriptions > GitHub subscriptions in the OneGraph dashboard. From there, you can add the repositories that non-admins can create subscriptions for. You will have to be an admin on the repo to add a repository.

OneGraph will ensure that the GitHub user has read access to the repository before allowing them to subscribe to an event and before delivering any subscription payloads. If they lose access to the repo, then they will receive graphql error payloads when new events occur until they gain access or unsubscribe.

← Salesforce subscriptionsGmail Subscriptions →
Links
OneGraph Overview Example projectsOneGraphiQL Explorer
Support
Live chat on Spectrum> TwitterBlog
More
Terms of ServicePrivacy Policy
Copyright © 2021 OneGraph