Mechanism to await a mutation and be sure it was indexed

Ouverte
#237 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Stack technique
typescript
Domaine
api, blockchain, tooling

Piste de recherche

Commencez par localiser l’outillage grc-20-ts et ses points d’entrée pour publish, sync et l’indexer-API. Comparez les approches polling, publish-through-API et block-hash, puis définissez la condition d’achèvement du mécanisme de sorte qu’il ne retourne qu’une fois la mutation trouvable dans l’index.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Schema SDK

You can get the transaction hash and block number back from the chain at publish-time, but there’s no guarantee that the transaction has actually been indexed yet. We run into this problem in the web app, too. We solve it by just keeping published data in the local store even after it’s published until the user leaves the page. (edited)

There’s a few solution spaces

  • Have a mechanism to poll the API looking for your edit id and return when it finds it (this can just be part of syncing in the future)
  • Publish edits through an API which returns when it finds your edit in the indexer API
  • I think we should incorporate block hash into the API. So you can say “query as of this block hash” or where block > x, or something like that and have a metadata field so you can get back from the server what block it was executed against. I think that should get us through the story here

Probably should be tooling that exists in grc-20-ts?

Langage dominant
TypeScript
Étoiles
22
Forks
12
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de graphprotocol/hypergraph

Toutes les issues de graphprotocol/hypergraph

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.