title: How to do a mutation with graphql and mongoose
body: <p>I have a backend with <code>mongoose</code>, <code>graphql</code> and <code>graphql-compose-mongoose</code>.</p>
  <p>I followed the <code>graphql-compose-mongoose</code> <a href="https://github.com/graphql-compose/graphql-compose-mongoose" rel="nofollow noreferrer">documentation</a> to create a User model and schema as follows:</p>
  <p>Model</p>
  <pre><code>import mongoose, { Schema } from 'mongoose';
  import { composeMongoose } from 'graphql-compose-mongoose';
  
  export const UserSchema = new Schema({
      phone: { type: String },
      name: { type: String },
      email:    { type: String, required: true },
      password: { type: String, required: true },
  
      photos: { type: Array },
      matchId: { type: Schema.Types.ObjectId },
  
      created: { type: Date, default: Date.now },
      active: { type: Boolean, default: false }
  });
  
  export const User = mongoose.model('User', UserSchema);
  export const UserTC = composeMongoose(User);
  </code></pre>
  <p>Graphql Schema</p>
  <pre><code>import { User, UserTC } from '../models/User';
  import { schemaComposer } from 'graphql-compose';
  
  schemaComposer.Query.addFields({
    userById: UserTC.mongooseResolvers.findById(),
    userByIds: UserTC.mongooseResolvers.findByIds(),
    userOne: UserTC.mongooseResolvers.findOne(),
    userMany: UserTC.mongooseResolvers.findMany(),
    userDataLoader: UserTC.mongooseResolvers.dataLoader(),
    userDataLoaderMany: UserTC.mongooseResolvers.dataLoaderMany(),
    userCount: UserTC.mongooseResolvers.count(),
    userConnection: UserTC.mongooseResolvers.connection(),
    userPagination: UserTC.mongooseResolvers.pagination()
  });
  
  schemaComposer.Mutation.addFields({
    userCreateOne: UserTC.mongooseResolvers.createOne(),
    userCreateMany: UserTC.mongooseResolvers.createMany(),
    userUpdateById: UserTC.mongooseResolvers.updateById(),
    userUpdateOne: UserTC.mongooseResolvers.updateOne(),
    userUpdateMany: UserTC.mongooseResolvers.updateMany(),
    userRemoveById: UserTC.mongooseResolvers.removeById(),
    userRemoveOne: UserTC.mongooseResolvers.removeOne(),
    userRemoveMany: UserTC.mongooseResolvers.removeMany()
  });
  
  const graphqlSchema = schemaComposer.buildSchema();
  
  export default graphqlSchema;
  </code></pre>
  <p>I wanna create a user with the <code>userCreateOne</code> mutation and I'm trying it out in the GraphQL playground. I can't seem to figure out how though. I've tried passing the field as arguments but it doesn't work.</p>