| | 1 | | public static class TheGraphQueries |
| | 2 | | { |
| 0 | 3 | | public static readonly string getLandQuery = @" |
| | 4 | | query Land($address: Bytes) { |
| | 5 | | ownerParcels: parcels(first: 1000, where: { estate: null, owner: $address }) { |
| | 6 | | ...parcelFields |
| | 7 | | } |
| | 8 | | ownerEstates: estates(first: 1000, where: { owner: $address }) { |
| | 9 | | ...estateFields |
| | 10 | | } |
| | 11 | | updateOperatorParcels: parcels(first: 1000, where: { updateOperator: $address }) { |
| | 12 | | ...parcelFields |
| | 13 | | } |
| | 14 | | updateOperatorEstates: estates(first: 1000, where: { updateOperator: $address }) { |
| | 15 | | ...estateFields |
| | 16 | | } |
| | 17 | | ownerAuthorizations: authorizations(first: 1000, where: { owner: $address, type: \""UpdateManager\"" }) { |
| | 18 | | operator |
| | 19 | | isApproved |
| | 20 | | tokenAddress |
| | 21 | | } |
| | 22 | | operatorAuthorizations: authorizations(first: 1000, where: { operator: $address, type: \""UpdateManager\"" }) { |
| | 23 | | owner { |
| | 24 | | address |
| | 25 | | parcels(where: { estate: null }) { |
| | 26 | | ...parcelFields |
| | 27 | | } |
| | 28 | | estates { |
| | 29 | | ...estateFields |
| | 30 | | } |
| | 31 | | } |
| | 32 | | isApproved |
| | 33 | | tokenAddress |
| | 34 | | } |
| | 35 | | } |
| | 36 | | fragment parcelFields on Parcel { |
| | 37 | | x |
| | 38 | | y |
| | 39 | | tokenId |
| | 40 | | owner { |
| | 41 | | address |
| | 42 | | } |
| | 43 | | updateOperator |
| | 44 | | data { |
| | 45 | | name |
| | 46 | | description |
| | 47 | | } |
| | 48 | | } |
| | 49 | | fragment estateFields on Estate { |
| | 50 | | id |
| | 51 | | owner { |
| | 52 | | address |
| | 53 | | } |
| | 54 | | updateOperator |
| | 55 | | size |
| | 56 | | parcels(first: 1000) { |
| | 57 | | x |
| | 58 | | y |
| | 59 | | tokenId |
| | 60 | | } |
| | 61 | | data { |
| | 62 | | name |
| | 63 | | description |
| | 64 | | } |
| | 65 | | } |
| | 66 | | "; |
| | 67 | |
|
| 0 | 68 | | public static readonly string getEthereumManaQuery = @" |
| | 69 | | query MANA($address: ID){ |
| | 70 | | accounts(where: {id:$address}){ |
| | 71 | | id, |
| | 72 | | mana |
| | 73 | | } |
| | 74 | | } |
| | 75 | | "; |
| | 76 | |
|
| 0 | 77 | | public static readonly string getPolygonManaQuery = @" |
| | 78 | | query MANA($address: ID){ |
| | 79 | | accounts(where: {id:$address}){ |
| | 80 | | id, |
| | 81 | | mana |
| | 82 | | } |
| | 83 | | } |
| | 84 | | "; |
| | 85 | |
|
| 0 | 86 | | public static readonly string getNftCollectionsQuery = @" |
| | 87 | | query WearablesCollections($address: ID){ |
| | 88 | | nfts(where: { owner: $address }) { |
| | 89 | | urn, |
| | 90 | | collection { |
| | 91 | | id |
| | 92 | | } |
| | 93 | | item { |
| | 94 | | blockchainId |
| | 95 | | } |
| | 96 | | tokenId |
| | 97 | | } |
| | 98 | | } |
| | 99 | | "; |
| | 100 | |
|
| 0 | 101 | | public static readonly string getNftCollectionByUserAndUrnQuery = @" |
| | 102 | | query WearablesCollectionsByUrn($address: ID, $urn: ID){ |
| | 103 | | nfts(where: { owner: $address, urn: $urn}) { |
| | 104 | | urn, |
| | 105 | | collection { |
| | 106 | | id |
| | 107 | | } |
| | 108 | | item { |
| | 109 | | blockchainId |
| | 110 | | } |
| | 111 | | tokenId |
| | 112 | | } |
| | 113 | | } |
| | 114 | | "; |
| | 115 | | } |