dotansimha/graphql-code-generator-community

Unable to load typescript-apollo-angular in codesandbox while attempting reproduce bug: serviceProvidedInRoot: false ignored

Open

#139 geöffnet am 15. Juli 2021

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (195 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (136 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Bug Description

Unable to utilise codesandbox to reproduce a different bug. Any error is presented:
Unable to find template plugin matching 'typescript-apollo-angular' The plugin has been selected and loaded from the package.json file.

The original bug I was attempting to reproduce, was that the config option: serviceProvidedInRoot: false is ignored by graphql-codegen

To Reproduce

Please see working demonstration of the bug here: https://codesandbox.io/s/agitated-fog-1j6kl?file=/codegen.yml

Expected Behaviour

  1. graphql-codegen should compile and run in the codesandbox instance
  2. Angular services generated by graphql-codegen should be generated with @Injectable() when serviceProvidedInRoot: false

Observed behaviour

  1. graphql-codegen does not finish compiling because of error message: ``
  2. Angular services are generated with @Injectable({ providedIn: 'root' }) even when serviceProvidedInRoot: false

Contributor Guide