Brikl Logo

BETA

/
Gear Icon

Reference

Introduction

Queries

Mutations

Objects

Enums

Input objects

Interfaces

Scalars

About the GraphQL API

The Brikl GraphQL API offers flexibility and the ability to precisely define the data you want to fetch.


What is GraphQL?

GraphQL is a query language for APIs that works as an application layer. It is not a storage model or a database query language like SQL. Instead, GraphQL provides a complete description of the data in an API and allows clients to ask for exactly what they need.

The official GraphQL docs say:

GraphQL is a query language for your API, and a server-side runtime for executing queries using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.

About GraphQL

The graph query language (GraphQL) is:

  • A specification. The spec determines the rules for schemas on the API server. The schema is used to validate client calls to the API.
  • Strongly typed. Every GraphQL service defines an application-specific type system, and requests are executed within the context of that type system.
  • Introspective. It means a client can query the schema for details about the schema itself.
  • Hierarchical. The shape of a GraphQL call mirrors the shape of the JSON response it returns. That makes responses predictable to the client, improving productivity and the developer experience.

A common misconception about GraphQL is thinking of it as a storage model or database query language. But GraphQL is an application layer.

Developers can define a schema of graph structures containing nodes (objects) and edges (relationships between objects). The API traverses and returns data based on the schema definitions, independent of how the data is stored.

If this is confusing, don't worry. You'll get a practical understanding of all the topics above in the guides we're providing here.

Why is Brikl using GraphQL?

GraphQL APIs power the entire Brikl platform. We chose GraphQL because it offers a level of flexibility that makes building integrations easier. The ability to precisely define the data you need is a decisive advantage over traditional REST API endpoints.

By using GraphQL, you can replace multiple REST requests with a single call that fetches all the data you need—and only the data you need. GraphQL solves two of the most inconvenient problems of REST: under fetching and over fetching.

Moreover, GraphQL is easy to use, intuitive, and productive.

About the Brikl GraphQL API

The Brikl GraphQL API lets you integrate your Brikl store with important applications to your business, such as CRM, ERP, and other back-office applications. The basic idea is that you can fetch the data you need directly from your Brikl store and do whatever you want with it.

You can find a complete description of the API schema in the API documentation. Use the docs to understand:

  • The available operations: queries and mutations.
  • The schema-defined types: scalars, objects, enums, interfaces, and input objects.

☝️ To try the API by yourself and learn how to use it, you might want to use the GraphQL Playground. Check out our Using the GraphQL Playground article if you need help.

What's next?

Now that you know what GraphQL is and what it is not, consider reading Introduction to GraphQL to learn helpful terminology and concepts for using the Brikl GraphQL Admin API.

If you're already familiar with GraphQL terminology and concepts, visit Forming calls with GraphQL.