v1.10.0
1.10.0 (2017-11-22)
Features
- 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`
},
});