title: How to programmatically define a field of type yet-to-be fully defined in GraphQL-Java?
body: <p>I am &quot;playing&quot; with <code>graphql-java</code> and the related kickstarter servlet, modifying it to build the schema programmatically based on the types I discover automatically. The documentation is (almost) there but is outdated in spots and references deprecated methods. My particular issue is that the <code>GraphQLFieldDefinition.Builder</code> has four variants of the <code>type(...)</code> method - three accepting various (other) builders and one accepting the <code>GraphQLOutputType</code>, none of which I may have. Furthermore, those that accept builder actually invoke the <code>build()</code> method on those builders so I am anxious to pass any of my &quot;unfinished&quot; type builders either. I thought of defining all types upfront with no fields at all, then add fields to them after that but if <code>build()</code> gets called on these at that point in time, even if they don't get into an unwanted state today I can see how a future update may demand at most a single <code>build()</code> invocation.</p>
  <p>So the question is how does one declare a field to yet-undefined or not fully defined type? For example, an <code>Employee</code>'s <code>manager</code> field being itself of the <code>Employee</code> type such as:</p>
  <pre><code>type Employee {
     name: String!
     manager: Employee
     reports: [Employee!]
     buddy: Employee
     ...
  }
  </code></pre>