• Docs
  • Pricing
  • Support
  • Blog
  • Login

›Intro

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

How does OneGraph work?

OneGraph exposes a single GraphQL endpoint for you to dynamically query, at https://serve.onegraph.com/graphql. To make a request, you'll include two things:

  • An app_id query parameter to identify your app
  • A body in JSON with a GraphQL query and (optionally) some variables

The simplest curl command might look like the query below

curl 'https://serve.onegraph.com/graphql?app_id=0b33e830-7cde-4b90-ad7e-2a39c57c0e11' \
  --data '{"query":"{ me { oneGraph { fullName email }}}"}'

That's simply saying, "I'm making a GraphQL request on behalf of app-id 0b33, and I want the following data:"

{
  me {
    oneGraph {
      fullName
      email
    }
  }
}

Incidentally, this is the query we're using right now on the site to tell if you're logged in. If you run the above curl example, you should see:

{"data":{"me":{"oneGraph":null}}}

This is great, it just means that the query returned successfully, and that the curl command wasn't logged in as anyone (we'll get into authentication a bit later). You just made your first unauthenticated query. To make an authenticated query, you'll first need to make your own app!

← What's OneGraph?Creating your first app →
Links
OneGraph Overview Example projectsOneGraphiQL Explorer
Support
Live chat on Spectrum> TwitterBlog
More
Terms of ServicePrivacy Policy
Copyright © 2021 OneGraph