Firechain's GraphQL API is a powerful way to interact with the Firechain network. It provides a simple, intuitive interface for both querying and mutating the network's state. The API is designed to be flexible and extensible, so it can be used to build a wide variety of applications. In fact, the Firechain web app is built entirely on top of the GraphQL API.
GraphQL API is under development
This page is missing a lot of details about the current implementation. We'll be adding more details as we get closer to full GraphQL support.
The Firechain GraphQL Playground is a web-based tool that allows you to interact with the Firechain GraphQL API. It provides a simple interface for writing and executing GraphQL queries and mutations. You can also use the Playground to explore the API's schema and documentation.
Check out the playground at https://playground.firechain.io. The Playground is currently unavailable. We're working on a new version that will be available soon.
The Firechain GraphQL API is built on top of the GraphQL specification. GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.
Below is a high-level overview of how the Firechain GraphQL API is structured.
Query type is the root of all GraphQL queries. It represents the API's read-only entry point and provides access to all of the API's data. For example, you can use the
Query type to fetch the current block height or to query the state of a specific entity.
Mutation type is the root of all GraphQL mutations. It represents the API's write-only entry point and provides access to all of the API's write operations. For example, you can use the
Mutation type to create a new entity or send a message.
Subscription type is similar to
Query, but it provides real-time updates by maintaining an open websockets connection. You can use the
Subscription type to do things like subscribe to new blocks or to monitor the state of a specific entity.