Skip to content
Snippets Groups Projects
Commit b99907ee authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

fix(indexer) Fix duniter-squid graphql queries

parent 914c0981
Branches
Tags
1 merge request!16enh(wot) Add a button to certify
Pipeline #36508 waiting for manual action
......@@ -15,7 +15,7 @@ export class AccountConverter {
address: input.id,
meta: {
uid: input.identity?.name,
isMember: isNotNil(input.identity?.membership?.id),
isMember: input.identity?.membershipHistory?.some((h) => isNotNil(h.id)) || false,
},
};
}
......@@ -34,7 +34,7 @@ export class IdentityConverter {
address: input.account?.id,
meta: {
uid: input.name,
isMember: isNotNil(input.membership?.id),
isMember: input.membershipHistory?.some((h) => isNotNil(h.id)) || false,
},
};
}
......
fragment LightIdentity on Identity {
__typename
id
name
isMember
account {
__typename
id
}
membership {
membershipHistory {
__typename
id
}
......@@ -18,7 +17,8 @@ fragment LightAccount on Account {
identity {
id
name
membership {
isMember
membershipHistory {
id
}
}
......
......@@ -28,9 +28,6 @@ export class CertificationConverter {
account: IdentityConverter.toAccount(input.identity),
createdOn: input.createdOn,
expireOn: input.expireOn,
creationBlockNumbers: (input.creation || []).map((c) => c?.blockNumber),
renewalBlockNumbers: (input.renewal || []).map((c) => c?.blockNumber),
removalsBlockNumbers: (input.removal || []).map((c) => c?.blockNumber),
};
}
}
......
......@@ -5,17 +5,11 @@ fragment Cert on Cert {
id
expireOn
createdOn
creation {
id
blockNumber
}
renewal {
id
blockNumber
receiver {
...LightIdentity
}
removal {
id
blockNumber
issuer {
...LightIdentity
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -21,12 +21,15 @@ query WotSearchByAddress($address: String!, $limit: Int!, $offset: Int!, $orderB
}
}
query WotSearchLast($limit: Int!, $offset: Int!, $orderBy: [AccountOrderByInput!], $pending: Boolean!) {
query WotSearchLast($limit: Int!, $offset: Int!, $orderBy: [AccountOrderByInput!], $pending: Boolean!
) {
accounts(
limit: $limit
offset: $offset
orderBy: $orderBy
where: {identity: {id_isNull: false}, AND: {identity: {membership_isNull: $pending} }}
where: {identity: {id_isNull: false}
, AND: {identity: {membershipHistory_some: {id_isNull: $pending}} }
}
) {
...LightAccount
}
......
......@@ -58,5 +58,8 @@ export const environment = <Environment>{
//'wss://1000i100.fr/ws',
],
defaultIndexers: ['https://subsquid.gdev.coinduf.eu/graphql', 'https://gdev-squid.axiom-team.fr/graphql'],
defaultIndexers: [
'https://subsquid.gdev.coinduf.eu/graphql',
//'https://gdev-squid.axiom-team.fr/graphql'
],
};
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment