Skip to content
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

feat: indexer v2 query migrations #3773

Merged

Conversation

0xkenj1
Copy link

@0xkenj1 0xkenj1 commented Feb 26, 2025

Update queries for Indexer V2 compatibility

Changes

  • Modified existing queries to align with Indexer V2 schema and endpoints
  • Updated query syntax to ensure compatibility with new indexing structure

Testing

  • Verified queries return expected results with Indexer V2 (manual)

Look Into

  • indexer.ts getBlockNumberQuery
  • AttestationService

@0xkenj1 0xkenj1 requested review from a team as code owners February 26, 2025 03:30
Copy link

vercel bot commented Feb 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 5:26am
builder-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 5:26am
explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 5:26am
explorer-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 5:26am
manager ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 5:26am
manager-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2025 5:26am

id
metadata
}
}
}
`;

//NOT SUPPORTED ON THE CURRENT INDEXER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ what's the best way to do this instead ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make use of the events_registry here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we can, good catch : )

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will add it to expose it on the hasura api

@@ -604,13 +613,14 @@ export const getBlockNumberQuery = gql`
}
`;

//TODO: migrate code in which this query is called
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

@@ -136,6 +143,7 @@ export const getProjectAnchorByIdAndChainId = gql`
*
* @returns The project
*/
//FIXME: Deprecated on indexer v2 ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd have to fetch all projects and do the filter on the frontend right ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On indexer v2 we don't consider allo-v1 projects. But i saw that the legacyProjects table is straight forward to implement, will do it.

@thelostone-mc thelostone-mc changed the base branch from main to indexer-v2 March 4, 2025 05:21
@@ -326,7 +329,7 @@ export const getApprovedApplication = gql`
roundMetadata
}
metadata
project: canonicalProject {
project {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ switch back to canonical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants