Skip to main content
The Ownright Developer Platform is built using GraphQL, a modern query language for APIs that gives you precise control over the data you request. While GraphQL may be less familiar than traditional REST APIs, it unlocks a more flexible and efficient way to interact with our platform.

🧠 What is GraphQL?

GraphQL is a query language and runtime for APIs originally developed by Facebook. Unlike REST, which requires multiple endpoints for different data needs, GraphQL exposes a single endpoint that allows clients to:
  • Ask for exactly the data they need, and nothing more
  • Retrieve nested, related data in a single request
  • Use a strongly-typed schema to understand what’s possible to query or mutate
All requests to our APIs are made as POST requests to a GraphQL endpoint. Queries and mutations are written in the GraphQL syntax, and responses are returned in predictable JSON format.

🚀 Why we chose GraphQL

We chose GraphQL because our integrators range from fast-moving startups to established platforms — all with different integration needs. GraphQL gives your team:
  • Flexibility: Fetch exactly the data you need—no more, no less.
  • Efficiency: Minimize payload size and reduce over-fetching to improve performance.
  • Discoverability: Explore the schema with introspection, enabling faster onboarding.
  • Scalability: Confidently build on top of an API that evolves without breaking your integration.
Put simply: GraphQL helps you build faster, cleaner integrations that grow with your product.

🛠 GraphQL in action

Here’s an example of a simple GraphQL query:
GraphQL query example
query GetReferral {
  referral(id: "gid://ownright/Referral/1") {
    id
    kind
    status
    ...
    # other fields
    ...
    createdAt
    updatedAt
  }
}
And here’s an example mutation:
GraphQL mutation example
mutation CreatePurchaseReferral {
  purchaseReferralCreate(
    input: {
      address: {
        street: "123 Main St"
        city: "Toronto"
        # ... other input
      }
      # ... other input
    }
  ) {
    referral {
      id
      status
    }
  }
}
Each API has its own endpoint — refer to the Connecting page in your API’s reference section for the specific URL.

📚 Learn more about GraphQL

If you’re new to GraphQL or want to brush up your skills, here are some great resources:

💡 Developer tip

Many GraphQL clients (like Insomnia, Postman, or GraphiQL) offer built-in schema explorers. This lets you view available queries, mutations, and types without leaving your dev environment.