[Feature] Expose utility to generate "full" API schema from entities GQL schema

Ouverte
#4,710 9 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
graphql, rust
Domaine
api, tooling

Piste de recherche

Commencez par graphql/examples/schema.rs, que l’issue identifie comme le chemin existant de génération du schéma, et suivez la manière dont il dérive un schéma à partir du schéma Entities. Définissez le point d’entrée de l’utilitaire exposé et vérifiez qu’il produit localement le schéma complet de l’API GQL sans déployer de subgraph ni utiliser l’introspection.

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

Description

enhancement
Description

As it is, the only way to get the "true" GQL API schema is to deploy a subgraph and perform an introspection query. This is very painful for tooling and codegen purposes. It would be very nice to be able to generate the full schema locally from the "entities" schema.

I noticed this is relatively easy to isolate, as it is being done here: https://github.com/graphprotocol/graph-node/blob/252e9129588b0b022bcaf50bbe365287db18241b/graphql/examples/schema.rs

I'm actually in the process of creating a docker image that does exactly that. I basically cloned this repo, added a build target for that script and created a dockerfile that runs it, but it is not a very elegant solution. I'll still share it here once it's up in case someone else needs it.

I know this is more of a feature request for the CLI, but since the relevant code resides in this repo, and the CLI repo doesn't have a "Feature Request" template, I thought I'd open the issue here.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
Langage dominant
Rust
Étoiles
3.2k
Forks
1.1k
Merge moyen
4 j 1 h
PR mergées (30 j)
1

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/graph-node

Toutes les issues de graphprotocol/graph-node

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

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