Project & Player Queries

GetProject

GetProject Queries information about your project.
Project and Player*
query {
GetProject {
id
name
description
image
createdAt
updatedAt
}
}
Expected output:
{
"data": {
"GetProject": {
"id": xxxx,
"name": "ProjectName",
"description": "Description Project",
"image": "<project-image>"
}
}
}

AuthProject

AuthProject queries the unique access token of your project by using the secret.
Project*
query {
AuthProject(id: xxxx, secret:"appsecret"){
accessToken
expiresIn
}
}
Expected output:
{
"data": {
"AuthProject": {
"accessToken": "accesstoken",
"expiresIn": 86400
}
}
}

AuthPlayer

AuthPlayer use this query to get the AccessToken from a specific user.
Project*
query {
AuthPlayer(id: "User"){
accessToken
expiresIn
}
}
Expected output:
{
"data": {
"AuthPlayer": {
"accessToken": "accesstoken",
"expiresIn": 86399
}
}
}

GetPlayers

GetPlayers queries for your created players on your project.
Project*
query {
GetPlayers {
id
wallet {
ethAddress
}
linkingInfo {
code
qr
}
createdAt
updatedAt
}
}
Expected output:
{
"id": "BOB",
"wallet": null,
"linkingInfo": {
"code": "xxxxxx",
"qr": "https://chart.googleapis.com/chart?chs=512x512&cht=qr&chl=xxxxx"
},
"createdAt": "2021-06-08T10:31:28+00:00",
"updatedAt": "2021-06-08T10:31:28+00:00"
}

GetPlayer

GetPlayer queries for a specific player that is part of your project.
Project & Player*
{
GetPlayer(id: "yourUserName") {
id
wallet {
ethAddress
}
linkingInfo {
code
qr
}
createdAt
updatedAt
}
}
Expected output:
{
"data": {
"GetPlayer": {
"id": "User",
"wallet": {
"ethAddress": "walletaddress"
},
"linkingInfo": null,
"createdAt": "2021-06-11T11:42:32+00:00",
"updatedAt": "2021-06-11T12:29:20+00:00"
}
}
}

GetBalances

GetBalances queries for all balances on a project.
Project & Player*
query {
GetBalances {
items {
asset {
name
id
}
index
value
}
}
}
Expected output:
{
"data": {
"GetBalances": {
"items": [
{
"asset": {
"name": "Flower",
"id": "7080000000000594"
},
"index": "0000000000000001",
"value": 1
}

GetGasPrice

GetGasPrice queries for the latest gas prices.
Project & Player*
query {
GetGasPrice {
fast
fastest
safeLow
average
}
}
Expected output:
{
"data": {
"GetGasPrice": {
"fast": 15,
"fastest": 30,
"safeLow": 3,
"average": 8
}
}
}

GetPlatform

GetPlatform queries information about the platform.
Project & Player*
query {
GetPlatform {
id
name
network
contracts {
enj
cryptoItems
platformRegistry
supplyModels {
fixed
settable
infinite
collapsing
annualValue
annualPercentage
}
}
}
}
Expected output:
{
"data": {
"GetPlatform": {
"id": 7,
"name": "Enjin Platform",
"network": "Goerli",
"contracts": {
"enj": "0xf6fe970533fe5c63d196139b14522eb2956f8621",
"cryptoItems": "0x44B8326616C2a7Ac37A2d2719E067d5aA8DaD0ba",
"platformRegistry": "0x0000000000000000000000000000000000000000",
"supplyModels": {
"fixed": "0x0000000000000000000000000000000000000000",
"settable": "0x4f98f38c6667fee10589c33d4280d821693e701e",
"infinite": "0x46fc98b824072ed89b98c642e0d0232f0dd52806",
"collapsing": "0xdc9fe2cdad407b60001e26455a0a4edbe1317f2a",
"annualValue": "0x4f183ceee5f7567b70b3be737921d8d12e876397",
"annualPercentage": "0x4aea9c3cc71e32c877ea4914f49e477cfe0cc2d8"
}
}
}
}
}

GetTransaction

getTransaction finds further information regarding a transaction performed by you through GraphiQL, you can add further parameter results based on your needs.
Project & Player*
query {
GetTransaction(id:98420) {
id
transactionId
title
type
value
state
projectWallet
asset{id, name}
}
}
Expected output:
{
"data": {
"GetTransaction": {
"id": 98420,
"transactionId": "0x5e0790f6f253e11dae566a23760da161931ab6305b863289e3bbe2725536abfb",
"title": "NFT Test",
"type": "CREATE",
"value": "1",
"state": "EXECUTED",
"projectWallet": true,
"asset": {
"id": "70800000000029b7",
"name": "NFT Test"
}
}
}
}

GetWallet

GetWallet queries information for a specific wallet address.
Project & Player*
query {
GetWallet(ethAddress: "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406") {
ethAddress
enjAllowance
enjBalance
ethBalance
balances {
asset{name}
id
index
value
project {
name
}
}
assetsCreated {
id
items {
name
id
}
}
}
}
Expected Output:
{
"data": {
"GetWallet": {
"ethAddress": "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406",
"enjAllowance": 1.157920892373162e+59,
"enjBalance": 23264.24307202013,
"ethBalance": 1.2266632788,
"balances": [
{
"asset": {
"name": "Gate Key"
},
"id": "7000000000000b1d",
"index": "0000000000000000",
"value": 7,
"project": null
},
{
"asset": {
"name": "King's Crown"
},
"id": "7000000000000b1e",
"index": "0000000000000000",
"value": 3,
"project": null
}

GetWallets

GetWallets queries multiple wallets at once linked to your project.
Project*
query {
GetWallets(
ethAddresses: [
"0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406"
"0x65ffe5a603b9dac9bca330bf387979701374c96c"
]
) {
ethAddress
enjAllowance
enjBalance
ethBalance
balances {
asset {
name
}
id
index
value
project {
name
}
}
assetsCreated {
id
items {
name
id
}
}
}
}
Expected Output
{
"data": {
"GetWallets": [
{
"ethAddress": "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406",
"enjAllowance": 1.157920892373162e+59,
"enjBalance": 23264.24307202013,
"ethBalance": 1.2266632788,
"balances": [
{
"asset": {
"name": "Gate Key"
},
"id": "7000000000000b1d",
"index": "0000000000000000",
"value": 7,
"project": n
ull
}

GetAsset

GetAsset queries specific information from assets linked to your project.
Project & Player*
query {
GetAsset(id: "708000000000088e") {
id
name
createdAt
updatedAt
wallet {
ethAddress
}
}
}
Expected output:
{
"data": {
"GetAsset": {
"id": "708000000000088e",
"name": "Tassio Test 2",
"createdAt": "2021-06-16T21:18:59+00:00",
"updatedAt": "2021-06-16T21:39:39+00:00",
"wallet": {
"ethAddress": "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406"
}
}
}
}