graphprotocol / graphprotocol/graph-node

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

Offen
#4,710 9 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
1.1k
Ø Merge
4 T. 1 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit graphql/examples/schema.rs, das im Issue als der bestehende Pfad zur Schema-Generierung identifiziert wird, und verfolge, wie daraus ein Schema aus dem Entities-Schema abgeleitet wird. Definiere den Einstiegspunkt des offengelegten Dienstprogramms und überprüfe, dass es lokal das vollständige GQL API-Schema erzeugt, ohne einen Subgraph bereitzustellen oder Introspection zu verwenden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
graphql, rust
Bereich
api, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.