prismake / typegql

Create GraphQL schema with TypeScript classes.
https://prismake.github.io/typegql/
MIT License
423 stars 21 forks source link

Feature/root class instances #39

Closed pie6k closed 6 years ago

pie6k commented 6 years ago

Now things like

@SchemaRoot()
class FooSchema {
  private bar: number = 42;

  @Query()
  foo(): number {
    return this.bar;
  }
}

are possible.

This will allow Dependency Injection at schema root level

codecov[bot] commented 6 years ago

Codecov Report

Merging #39 into master will decrease coverage by 0.27%. The diff coverage is 93.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage    87.7%   87.43%   -0.28%     
==========================================
  Files          60       61       +1     
  Lines        1074     1106      +32     
  Branches      189      194       +5     
==========================================
+ Hits          942      967      +25     
- Misses        131      138       +7     
  Partials        1        1
Impacted Files Coverage Δ
src/domains/field/compiler/resolver.ts 91.95% <100%> (+0.28%) :arrow_up:
src/domains/schema/rootFields.ts 92.3% <100%> (-0.29%) :arrow_down:
src/domains/schema/error.ts 67.56% <100%> (-7.44%) :arrow_down:
src/services/utils/deprecation/index.ts 100% <100%> (ø) :arrow_up:
src/domains/schema/index.ts 86.95% <100%> (+1.95%) :arrow_up:
src/domains/schema/compiler.ts 94.11% <100%> (-0.48%) :arrow_down:
src/domains/field/compiler/services.ts 88.88% <50%> (ø) :arrow_up:
src/domains/schema/services.ts 90.9% <90.9%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ba1400b...3b04fa8. Read the comment docs.