title: Node - GraphQL - Ad.user field type must be Output Type but got: undefined
body: <p>I seem to be having circular dependency problems with using UserType inside AdType.</p>
  
  <p>This is my UserType file: <a href="https://github.com/milostomsik1/getbike.online/blob/master/backend/App/User/user.graphql.model.js" rel="nofollow noreferrer">UserType</a></p>
  
  <p>This is my AdType file: <a href="https://github.com/milostomsik1/getbike.online/blob/master/backend/App/Ad/ad.graphql.model.js" rel="nofollow noreferrer">AdType</a></p>
  
  <p>If I try to use the code below I get the error "Ad.user field type must be Output Type but got: undefined" even tho I imported the UserType properly.</p>
  
  <pre><code>import { UserType } from '../User/user.graphql.model'
  import { UserSchema } from '../User/user.mongoose.model'
  
  const user =  {
    type: UserType,
    resolve(parentValue, args) {
      return UserSchema.findById(parentValue.user);
    }
  };
  
  //------------------------------
  // Ad Type
  //------------------------------
  export const AdType = new GraphQLObjectType({
    name: 'Ad',
    fields: () =&gt; ({
      id,
      user,
      title,
      views,
      availability,
  ... more code
  </code></pre>
  
  <p>If I try to console log UserType inside AdType after importing it, it says undefined, but when I use it as:</p>
  
  <pre><code>//------------------------------
  // Ad Type
  //------------------------------
  export const AdType = new GraphQLObjectType({
    name: 'Ad',
    fields: () =&gt; ({
      id,
      user: {
        type: UserType,
        resolve(parentValue, args) {
          return UserSchema.findById(parentValue.user);
        }
      },
      title,
  ... more code
  </code></pre>
  
  <p>it works as intended, it just doesn't allow me to pull out the code to separate constant.
  All other Types I import and use in the same manner work as expected, importing Ads into Users works as well, but importing User into Ads seems to break. It's basically the same code in both, just different info.</p>