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

fix: use graphql directly #102

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

fix: use graphql directly #102

wants to merge 6 commits into from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Sep 11, 2023

🧿 Current issues / What's wrong ?

Hub queries are send via snapshot.js SDK, using the snapshot.utils.subgraphRequest function. While this function is quite practical, it does have limit, and is not adapted when the hub database is part of the core function.

We can not customize the fetch request.
We should query the hub using apollo, like on envelop and sidekick

💊 Fixes / Solution

Fix #97
Fix SNAPSHOT-WEBHOOK-7

🚧 Changes

  • Migrate the hub querying to use apollo graphql directly, allowing more control on the fetch request.
  • Use a keep-alive connection while connecting to the hub

🛠️ Tests

  • run yarn dev it should run and process events

@ChaituVR
Copy link
Member

@wa0x6e Could you resolve conflicts 🙈 i missed it last time

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Sep 26, 2023

@wa0x6e Could you resolve conflicts 🙈 i missed it last time

done

@ChaituVR
Copy link
Member

We are not using json-to-graphql-query anymore? can we remove it from package.json

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Sep 26, 2023

We are not using json-to-graphql-query anymore? can we remove it from package.json

done

src/helpers/snapshot.ts Outdated Show resolved Hide resolved
@sentry-io
Copy link

sentry-io bot commented Oct 28, 2023

Sentry issue: SNAPSHOT-WEBHOOK-S

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