title: GraphQl array object inside object
body: <p>I do a json call from a api to get a list of posts. My problem is that inside of every post object response, i have a other array of object for the category of the post. How can get the array object category using Graphql?</p>
  
  <p>i try this but return me error</p>
  
  <pre><code>const Cat = new ObjectType({
  name: 'CatItem',
  description: 'cat',
  fields: () =&gt; ({
  
  
      id: {
          type: new NonNull(ID),
          description: 'cat',
          resolve: (root) =&gt; root.id
      },
      slug: {
          type: StringType,
          description: 'cat',
          resolve: (root) =&gt; root.slug
      },
      name: {
          type: StringType,
          description: 'cat',
          resolve: (root) =&gt; root.name
      },
  
  
  }),
  });
  
  const PostType = new ObjectType({
  name: 'PostItem',
  description: 'post',
  fields: () =&gt; ({
      id: {
          type: new NonNull(ID),
          description: 'post',
          resolve: (root) =&gt; root.id
      },
      slug: {
          type: StringType,
          description: 'post',
          resolve: (root) =&gt; root.slug
      },
      title: {
          type: StringType,
          description: 'post',
          resolve: (root) =&gt; root.title
      },
      content: {
          type: StringType,
          description: 'post',
          resolve: (root) =&gt; root.content
      },
      categories: {
          type: new List(CatType),
          description: 'post',
          resolve: (root) =&gt; root.category
      },
      date: {
          type: StringType,
          description: 'post',
          resolve: (root) =&gt; root.date
      },
      authorName: {
          type: StringType,
          description: 'post',
          resolve: (root) =&gt; root.display_name
      },
      authorAvatar: {
          type: StringType,
          description: 'post',
          resolve: (root) =&gt; root.user_avatar
      },
  }),
  });
  </code></pre>
  
  <p>Thank you</p>