Enjin Platform API Requests
Understanding Enjin Platform API Requests
In the context of the Enjin Platform, by using GraphQL, developers are able to create, mint, transfer and fetch information on FTs and NFTs created using the platform without needing to interact with any back-end information from the blockchain.
As an example, we are going to display one Query and one Mutation that is used by the Enjin Platform
Query - with this specific query, we are able to perform a READ operation on the Enjin Database in order to retrieve information pertaining to a specific project, all queries must contain an object, fields, and arguments.
Response - In the response field, we can see that the
GetProjectquery returned the Id of the project, the name, description, and the image attached to the project itself.
"name": "Esther Project 1",
"description": "QA Testing Project for Esther",
Mutation - Just like in queries, if the mutation field returns an object type, you can ask for nested fields. This can be useful for fetching the new state of an object after an update. Let's look at a simple example of a mutation.
message: "This is a Test"
Response - with this mutation, we are sending a request to the platform to sign a message through the blockchain, which still needs to get approved by the wallet in order to change the information requested by us.