You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
projection with * key request all fields from database (3b7ac62)
By default graphql-compose-mongoose requests that fields which are listed in the graphql query. So you may want to add some rawData field to your type for debug/administrative purposes with all fields in such way:
UserTC.addFields({rawData: {type: 'JSON',resolve: (source,args,context)=>(context.isAdmin() ? source.toJSON() : null),projection: {'*': true},// <-- request all fields from MongoDB, if requested `rawData`},});
Notice for Flowtype users:
If you got Flowtype errors like has no named export MongooseModel please put in <APP>/flow-typed/ directory following file mongoose_v4.x.x.js. Or wait until flow-typed/flow-typed#1231 will be merged, after that you need to install fresh declarations via terminal command flow-typed install.