-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetch Allo V2 programs from the indexer #2871
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d3b6989
to
71df371
Compare
f8eb59c
to
3e9bd0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @bhargavaparoksham - I'm able to see the profile I created on Builder on Manager, but not able to open the profile on Manager. Is that expected / out of scope for this PR? Otherwise, I would expect to be able to open the profile and be able to create rounds under it (once the "create round on v2" PR is ready).
![Screen Shot 2024-02-12 at 10 59 00 AM](https://private-user-images.githubusercontent.com/26017180/304146583-0547a6d6-44bd-4801-924f-c01dcb26fa7e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTAzMDAsIm5iZiI6MTczOTI1MDAwMCwicGF0aCI6Ii8yNjAxNzE4MC8zMDQxNDY1ODMtMDU0N2E2ZDYtNDRiZC00ODAxLTkyNGYtYzAxZGNiMjZmYTdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA1MDAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyZGE1YzVhZWFmZWM5Y2FhMzc4OWNiNTU1ZjZlMjk5OTg0NjhlNzFhMThjOTY0NmQ4MzNjMTlkZGZjYmIxZTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ndsw8NPgwuTJUcaaBdLGzVYevk4IYvfKRD1mDOuluvw)
![Screen Shot 2024-02-12 at 10 58 48 AM](https://private-user-images.githubusercontent.com/26017180/304146634-72c9ef0f-13d4-4128-bc99-f61ab62385e0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTAzMDAsIm5iZiI6MTczOTI1MDAwMCwicGF0aCI6Ii8yNjAxNzE4MC8zMDQxNDY2MzQtNzJjOWVmMGYtMTNkNC00MTI4LWJjOTktZjYxYWI2MjM4NWUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA1MDAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0NDA2MTYwMzA0OTg1NWQwMDgzOWE2ZDUwMzhhMzc1MTVkZDNjNDQwNzMwMWE3ZWFjY2ExNzA5NmYzZDA0ZTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RKxxmjgWnSVnWN270b2wokRorH_PnsT5XAuHn0ix02Q)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure i understand why both queries that are exactly the same, have different types and if statements, where one is being mapped to the exact same type, it feels like there's a lot of repetition that could cause human error if someone would forget to update a type or a query
would something like this work?
const getProgramsByUserAndTag = gql`
query ($address: String!, $chainId: Int!, $filterByTag: String ) {
projects(
filter: {
tags: { contains: $filterByTag }
roles: { some: { address: { equalTo: $address } } }
chainId: { equalTo: $chainId }
}
) {
id
chainId
metadata
metadataCid
tags
roles {
address
role
createdAtBlock
}
}
}
`;
let response: { projects: Program[] } = { projects: [] };
response = await request(
this.gsIndexerEndpoint,
getProgramsByUserAndTag,
{ ...requestVariables, filterByTag: alloVersion === "allo-v2" ? "allo-v2" : "program" },
);
return response.projects;
This PR is 78.18181818181819% new code. |
🥷 Code experts: codenamejason, 0xKurt codenamejason, bhargavaparoksham have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Fixes: #2816
Description
fetch Allo V2 programs from the indexer
Checklist
This PR:
@ts-ignore
, unjustified optional values).