GraphQL
The underlying technology that powers our platform
The Ownright Partner API 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 Partner API requests are made as POST requests to our 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 partners range from fast-moving startups to established proptech 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 to fetch a referral:
And hereโs an example mutation to create a referral:
All API calls use a single endpoint:
๐ Learn more about GraphQL
If youโre new to GraphQL or want to brush up your skills, here are some great resources:
graphql.org/learn โ The official GraphQL introduction
How to GraphQL โ A free fullstack GraphQL tutorial
Apollo GraphQL Docs โ For tooling, best practices, and client-side usage
Postman GraphQL Guide โ GraphQL in familiar tools
๐ก 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.