Skip to content
Snippets Groups Projects

adapt graphql request to Hasura engine

Merged poka requested to merge adapt-to-hasura into master
4 unresolved threads
Files
7
+ 18
12
query IdentityNameByIndex($index: Int!) {
query IdentityNameByIndex($index: Int!) {
identities(where: { index_eq: $index }) {
identity(where: { index: { _eq: $index } }) {
name
name
}
}
}
}
query NamesByIndexes($indexes: [Int!]!) {
query NamesByIndexes($indexes: [Int!]!) {
identities(where: {index_in: $indexes}) {
identity(where: { index: { _in: $indexes } }) {
index
index
name
name
}
}
}
}
query IdentityInfo($index: Int!) {
query IdentityInfo($index: Int!) {
identities(where: { index_eq: $index }) {
identity(where: { index: { _eq: $index } }) {
name
name
certIssued(orderBy: expireOn_DESC, where: { isActive_eq: true }) {
certIssued(
 
orderBy: { expireOn: DESC }
 
where: { isActive: { _eq: true } }
 
) {
receiver {
receiver {
name
name
}
}
}
}
certReceived(orderBy: expireOn_DESC, where: { isActive_eq: true }) {
certReceived(
 
orderBy: { expireOn: DESC }
 
where: { isActive: { _eq: true } }
 
) {
issuer {
issuer {
name
name
}
}
@@ -27,12 +33,12 @@ query IdentityInfo($index: Int!) {
@@ -27,12 +33,12 @@ query IdentityInfo($index: Int!) {
linkedAccount {
linkedAccount {
id
id
}
}
smithCertIssued(orderBy: createdOn_DESC) {
smithCertIssued(orderBy: { createdOn: DESC }) {
receiver {
receiver {
name
name
}
}
}
}
smithCertReceived(orderBy: createdOn_DESC) {
smithCertReceived(orderBy: { createdOn: DESC }) {
issuer {
issuer {
name
name
}
}
@@ -41,13 +47,13 @@ query IdentityInfo($index: Int!) {
@@ -41,13 +47,13 @@ query IdentityInfo($index: Int!) {
}
}
query IdentityNameByPubkey($pubkey: String!) {
query IdentityNameByPubkey($pubkey: String!) {
identities(where: { account: { id_eq: $pubkey } }) {
identity(where: { account: { id: { _eq: $pubkey } } }) {
name
name
}
}
}
}
query WasIdentityNameByPubkey($pubkey: String!) {
query WasIdentityNameByPubkey($pubkey: String!) {
accountById(id: $pubkey) {
accountByPk(id: $pubkey) {
wasIdentity {
wasIdentity {
identity {
identity {
name
name
@@ -57,21 +63,21 @@ query WasIdentityNameByPubkey($pubkey: String!) {
@@ -57,21 +63,21 @@ query WasIdentityNameByPubkey($pubkey: String!) {
}
}
query LatestBlock {
query LatestBlock {
blocks(limit: 1, orderBy: height_DESC) {
block(limit: 1, orderBy: { height: DESC }) {
height
height
hash
hash
}
}
}
}
query BlockByNumber($number: Int!) {
query BlockByNumber($number: Int!) {
blocks(where: { height_eq: $number }) {
block(where: { height: { _eq: $number } }) {
height
height
hash
hash
}
}
}
}
query GenesisHash {
query GenesisHash {
blocks(where: { height_eq: 0 }) {
block(where: { height: { _eq: 0 } }) {
hash
hash
}
}
}
}
Loading