title: How to represent an array of objectID of mongoose in Graphql Schema
body: <p>I'm trying to convert a rest backend with node and mongoose to use GraphQL but i dont know how to represent something like an array of objectID of mongoose schema in graphql schema. My doubt, how do i make this think be a list of Chapter ObjectIds? Didn't find anything alike</p>
  
  <p>mongoose schema</p>
  
  <pre><code>const mongoose = require('../database/db')
  
  const BookSchema = new mongoose.Schema({
     name: {
         type: String,
         require: true,
     },
      author: {
         type: String
      },
      sinopsis: {
          type: String
      },
      chapters:[{ 
          type: mongoose.Schema.Types.ObjectId,
          ref: 'Chapter'
      }],
  
  }, {
      timestamps: true,  
  })
  
  const ChapterSchema = new mongoose.Schema({
      name: {
          type: String
      },
      number: {
          type:Number
      },
  
      content: {
          type: String
      },
  
  }, {
      timestamps: true,
  })
  
  const Chapter = mongoose.model('Chapter', ChapterSchema)
  
  const Book = mongoose.model('Book', BookSchema)
  
  module.exports.Book = Book
  module.exports.Chapter = Chapter
  </code></pre>
  
  <p>GraphQL Schema:</p>
  
  <pre><code>type Book {
      id: ID!
      name: String!
      author: String
      sinopsis: String
      chapters: [ID] (here is my doubt, how do i make this think be a list of Chapter ObjectIds)
  
  }
  type Chapter {
      id: ID!
      name: String!
      number: String!
      content: String!
  }
  
  type Query{
      books: [Book!]!
      book(id: ID!): Book
      bookChapters(id: ID!): [ID]
  
      chapter(id: ID!): Chapter!
  
  }
  
  type Mutation {
      createBook(name: String!, author: String!,
       sinopsis: String!, chapters: [ID!]): Book
  
      createChapter(name: String!, number:String!,
       content:String!): Chapter
  }
  
  </code></pre>
  
  <p>This is the error that i got.</p>
  
  <pre><code>{
    "error": {
      "errors": [
        {
          "message": "Field \"chapters\" must not have a selection since type \"[ID]\" has no subfields.",
          "locations": [
            {
              "line": 3,
              "column": 14
            }
          ]
        }
      ]
    }
  }
  </code></pre>
  
  <p>BookResolver.js</p>
  
  <pre><code>const db = require('../models/Book')
  
  
  module.exports = {
  
      Query:{
          books: () =&gt; db.Book.find(),    
          book: (_,{id}) =&gt; db.Book.findById(id),
          bookChapters: (_,{id}) =&gt; {
  
              const book = db.Book.findById(id)
              /* console.log(book + "aaa") */
              const chapterlist = db.Chapter.find(book)
              return chapterlist
  
          },
          chapter: (_,{id}) =&gt; db.Chapter.findById(id),
      },
  
      Mutation:{
          createBook: (_, {name, author, sinopsis}) =&gt; db.Book.create({name, author, sinopsis}),
          createChapter: (_, {name, number, content  }) =&gt; {   
              db.Chapter.create({name, number, content})
          },
      },
  
  }
  </code></pre>