title: Error: Note.user field type must be Output Type but got: [object Object]
body: <p>I am very new on graphql, i am playing with a simple case and can not make it work, the case is a simple one to many, a user has many notes and one note belongs to user.
  My problem is with the "NoteType" I cannot return the "UserType", I can return the username of the User that create the Note but not the UserType</p>
  
  <p><strong><em>Code (Important remove some fields)</em></strong></p>
  
  <p><strong>NoteType</strong></p>
  
  <p>When I uncomment de <strong>user</strong> I have the error <strong><em>Error: Note.user field type must be Output Type but got: [object Object].</em></strong></p>
  
  <pre><code>import {
    GraphQLObjectType,
    GraphQLInt,
    GraphQLString,
    GraphQLBoolean,
  } from 'graphql';
  
  import UserType from '../User/UserType';
  import User from '../User/User';
  
  const NoteType = new GraphQLObjectType({
    name: 'Note',
    description: 'This represents a Note',
    fields: () =&gt; ({
      id: {
        type: GraphQLInt,
        resolve: (note) =&gt; note.id,
      },
      userId: {
        type: GraphQLInt,
        resolve: (note) =&gt; note.userId,
      },
      title: {
        type: GraphQLString,
        resolve: (note) =&gt; note.note,
      },
      username: {
        type: GraphQLString,
        resolve: (note) =&gt; (
          User
            .findOne({
              where: {
                id: note.userId,
              },
            }).then(user =&gt; user.username)
        ),
      },
      /* user: {  ***PROBLEM HERE!!***
        type: UserType,
        resolve: (note) =&gt; (
          User
            .findOne({
              where: {
                id: note.userId,
              },
            }).then(user =&gt; user)
        ),
      },*/
    }),
  });
  
  module.exports = NoteType;
  </code></pre>
  
  <p><strong>UserType</strong></p>
  
  <pre><code>import {
    GraphQLObjectType,
    GraphQLInt,
    GraphQLString,
    GraphQLList,
  } from 'graphql';
  
  import NoteType from '../Note/NoteType';
  import Note from '../Note/Note';
  
  import LocationType from '../Location/LocationType';
  import Location from '../Location/Location';
  
  const UserType = new GraphQLObjectType({
    name: 'User',
    description: 'This represents a User',
    fields: () =&gt; ({
      id: {
        type: GraphQLInt,
        resolve: (user) =&gt; user.id,
      },
      username: {
        type: GraphQLString,
        resolve: (user) =&gt; user.username,
      },
      email: {
        type: GraphQLString,
        resolve: (user) =&gt; user.email,
      },
      notes: {
        type: new GraphQLList(NoteType),
        resolve: (user) =&gt; (
          Note
            .findAll({
              where: {
                userId: user.id,
              },
            })
        ),
      },
    }),
  });
  
  module.exports = UserType;
  </code></pre>
  
  <p><strong>NoteQuery</strong></p>
  
  <pre><code>import {
    GraphQLInt,
    GraphQLString,
    GraphQLList,
  } from 'graphql';
  
  import NoteType from '../../models/Note/NoteType';
  import Note from '../../models/Note/Note';
  
  import UserType from '../../models/User/UserType';
  import User from '../../models/User/User';
  
  const noteQuery = {
    type: new GraphQLList(NoteType),
    args: {
      id: {
        name: 'id',
        type: GraphQLInt,
      },
      userId: {
        name: 'userId',
        type: GraphQLInt,
      },
      user: {
        name: 'user',
        type: GraphQLString,
      },
      note: {
        name: 'note',
        type: GraphQLString,
      },
      createdAt: {
        name: 'createdAt',
        type: GraphQLString,
      },
      updatedAt: {
        name: 'updatedAt',
        type: GraphQLString,
      },
    },
    resolve: (user, args) =&gt; Note.findAll({ where: args }),
  };
  
  module.exports = noteQuery;
  </code></pre>
  
  <p><strong>UserQuery</strong></p>
  
  <pre><code>import {
    GraphQLInt,
    GraphQLString,
    GraphQLList,
  } from 'graphql';
  
  import UserType from '../../models/User/UserType';
  import User from '../../models/User/User';
  
  const userQuery = {
    users: {
      type: new GraphQLList(UserType),
      args: {
        id: {
          name: 'id',
          type: GraphQLInt,
        },
        username: {
          name: 'username',
          type: GraphQLString,
        },
        email: {
          name: 'email',
          type: GraphQLString,
        },
        createdAt: {
          name: 'createdAt',
          type: GraphQLString,
        },
        updatedAt: {
          name: 'updatedAt',
          type: GraphQLString,
        },
      },
      resolve: (user, args) =&gt; User.findAll({ where: args }),
    },
    user: {
      type: UserType,
      args: {
        id: {
          name: 'id',
          type: GraphQLInt,
        },
        username: {
          name: 'username',
          type: GraphQLString,
        },
        email: {
          name: 'email',
          type: GraphQLString,
        },
        createdAt: {
          name: 'createdAt',
          type: GraphQLString,
        },
        updatedAt: {
          name: 'updatedAt',
          type: GraphQLString,
        },
      },
      resolve: (user, args) =&gt; User.findOne({ where: args }),
    },
  };
  
  module.exports = userQuery;
  </code></pre>
  
  <p>Any helps or tips thanks in advance!</p>