99designs / 99designs/gqlgen

Plugin System

Offen
#228 18 Kommentare 65 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
accepted enhancement plugin question
Vorherrschende Sprache
Go
Sterne
10.8k
Forks
1.3k
Ø Merge
2 T. 36 Min.
Gemergte PRs (30 T.)
26

Beschreibung

As a part of furthering our support of directives, we would like to provide a system in the `gqlgen` binary to allow user and 3rd party code to interact with codegen. Some of the use-cases we are considering include:

- Allowing a directive to generate a resolver for a field — e.g. `rest`/`grpc` calls.
- Allowing directive definitions and types to a schema.
- Altering a schema prior to codegen — e.g. enabling easy Relay connections.

The current plan is a plugin system which exposes a mechanism for allowing external plugins or code to register to be notified at various points during `gqlgen`'s execution, and modify the schema and codegen configuration.

These plugins are probably loaded and configured through the existing configuration file. The plugins will probably be provided with the schema AST, and configuration that can be modified as required.

We're looking to start building this soon, but would welcome any additional use-cases for consideration.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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