Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

refactor(experimental): graphql: program accounts makeover #2097

Conversation

buffalojoec
Copy link
Contributor

Continue in the spirit of the previous commit, this time adding a request
coalescer to the programAccounts query, allowing for similar optimizations to
account, despite there being no batch RPC method for getProgramAccounts.

@mergify mergify bot added the community label Feb 5, 2024
@mergify mergify bot requested a review from a team February 5, 2024 19:05
@buffalojoec buffalojoec marked this pull request as draft February 5, 2024 22:06
Comment on lines 58 to 66
await Promise.all(
Object.values(programAccountsFetchesByArgsHash).map(({ args, fetches: programAddressCallbacks }) => {
return Object.entries(programAddressCallbacks).map(([programAddress, { callbacks }]) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, doubly sorry for leading you astray earlier. These, in the finally block, can all just be .forEach with no returns or awaits. You just need to kick the requests off synchronously and hand them the resolve/reject methods.

Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

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

Accepting in principle, since the changes necessary in the prior PRs will just be replicated here!

@buffalojoec buffalojoec force-pushed the 01-23-refactor_experimental_graphql_expand_on_batch_loader_for_accounts branch from a7a244e to 6e871e4 Compare February 18, 2024 17:46
@buffalojoec buffalojoec force-pushed the 02-03-refactor_experimental_graphql_program_accounts_makeover branch from 516a405 to 2ec3e9a Compare February 18, 2024 17:46
@buffalojoec buffalojoec marked this pull request as ready for review February 18, 2024 17:46
@buffalojoec buffalojoec force-pushed the 01-23-refactor_experimental_graphql_expand_on_batch_loader_for_accounts branch from 6e871e4 to 5633432 Compare February 19, 2024 01:02
@buffalojoec buffalojoec force-pushed the 02-03-refactor_experimental_graphql_program_accounts_makeover branch from 2ec3e9a to 9df3f8b Compare February 19, 2024 01:02
Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

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

Same comments about some test coverage that might be missing (maxMultipleAccountsBatchSize and jsonParsed skipping)

https://app.graphite.dev/github/pr/solana-labs/solana-web3.js/2068/refactor-experimental-graphql-revise-accounts-schema-for-data-inputs#review-PRR_kwDOCLAddc5w6mlJ

@buffalojoec buffalojoec force-pushed the 01-23-refactor_experimental_graphql_expand_on_batch_loader_for_accounts branch 2 times, most recently from 024daa2 to 6dc0483 Compare February 22, 2024 19:01
@buffalojoec buffalojoec force-pushed the 02-03-refactor_experimental_graphql_program_accounts_makeover branch from 9df3f8b to b916bc0 Compare February 22, 2024 19:01
Copy link
Contributor Author

buffalojoec commented Feb 22, 2024

Merge activity

  • Feb 22, 3:57 PM EST: @buffalojoec started a stack merge that includes this pull request via Graphite.
  • Feb 22, 4:05 PM EST: Graphite rebased this pull request as part of a merge.
  • Feb 22, 4:06 PM EST: @buffalojoec merged this pull request with Graphite.

@buffalojoec buffalojoec force-pushed the 01-23-refactor_experimental_graphql_expand_on_batch_loader_for_accounts branch from 6dc0483 to 12fe4ff Compare February 22, 2024 21:02
Base automatically changed from 01-23-refactor_experimental_graphql_expand_on_batch_loader_for_accounts to master February 22, 2024 21:04
@buffalojoec buffalojoec force-pushed the 02-03-refactor_experimental_graphql_program_accounts_makeover branch from b916bc0 to 143d314 Compare February 22, 2024 21:04
@buffalojoec buffalojoec merged commit e15a66f into master Feb 22, 2024
4 of 6 checks passed
@buffalojoec buffalojoec deleted the 02-03-refactor_experimental_graphql_program_accounts_makeover branch February 22, 2024 21:06
Copy link
Contributor

github-actions bot commented Mar 2, 2024

🎉 This PR is included in version 1.90.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants