title: Schema/Resolve for nested objects graphql/mongoose
body: <p>I am using graphql with mongoose and I am trying to access a nested object array in a json of this form: </p>
  
  <pre><code>"Plans": [
  {
    "id": ...
    "name": ...
    "frequency": ...
    "lastExecuted": ...
    "Steps": {
      "Step": [
      {
        "id": ...
        "shortDescription": ...
        "description": ...
        ...
      },
      {...],
  }
  </code></pre>
  
  <p>I created a mongoose model: </p>
  
  <pre><code>const PlanModel = Mongoose.model("Plan", {
    name: String,
    frequency: GraphQLString,
    lastExecuted: String,
    Steps: []
  })
  </code></pre>
  
  <p>Intuitively I would insert my Stepmodel in the array, but this is giving me an error.</p>
  
  <p>So I tried populating the array with the resolver:</p>
  
  <pre><code>    Plans: {
    type: GraphQLList(PlanType),
    args: getGraphQLQueryArgs(PlanType),
    resolve: (root, args, context, info) =&gt; {
      return PlanModel
      .find()
      .populate("Steps")
      .populate("Steps.Step")
      .exec();
    }
  },
  </code></pre>
  
  <p>This is my PlanType:</p>
  
  <pre><code>const PlanType = new GraphQLObjectType({
    name: 'Plan',
    fields: () =&gt; ({
      id: {
        type: GraphQLID
      },
      name: {
        type: GraphQLString
      },
      frequency: {
        type: GraphQLString
      },
      lastExecuted: {
        type: GraphQLString
      },
      maintenanceSteps: {
        type: GraphQLList(StepType)
      },
    })
  })
  </code></pre>
  
  <p>My GraphQL query returns an empty array in this case. I know this is a common problem, but I couldn't find any solution for my problem</p>