aerogear / create-graphql

Command-line utility to build production-ready servers with GraphQL.
MIT License
440 stars 38 forks source link

Correctly retrieve type when declared directly #90

Closed JCMais closed 7 years ago

JCMais commented 7 years ago

You can declare the type of mongoose fields directly, without using an object, like { field: String } or { field: Schema.Types.ObjectId }.

Fixes #87

https://runkit.com/jcmais/5900b3565581b700125e1ab5

lucasbento commented 7 years ago

Nice!

lucasbento commented 7 years ago

@JCMais: would you mind adding a test for this?

codecov[bot] commented 7 years ago

Codecov Report

Merging #90 into master will increase coverage by 0.4%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #90     +/-   ##
=========================================
+ Coverage    58.6%   59.01%   +0.4%     
=========================================
  Files          13       13             
  Lines         302      305      +3     
=========================================
+ Hits          177      180      +3     
  Misses        125      125
Impacted Files Coverage Δ
packages/generator/src/utils.js 95% <100%> (+0.15%) :arrow_up:

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 e7538a6...f4aada2. Read the comment docs.