title: GraphQL Resolver Problems
body: <p>I've spent quite a bit of time reading through the GraphQL tutorials but unfortunately they don't seem to cover things in quite enough depth for me to get my head around. I'd really appreciate some help with this real world example.</p>
  
  <p>In the examples the queries are placed at the root of the resolver object; I can get this to work fine for single level queries. When I attempt to resolve a nested query however the nested resolver never gets called. What I'm massively confused by is every tutorial I find that isn't issued on the graphql website put in a Query object and nest their queries underneeth that, not root level.</p>
  
  <p>Consider the following Schema:</p>
  
  <pre><code>type Product {
    id: String!
    retailerId: String!
    title: String!
    description: String
    price: String!
    currency: String!
  }
  
  type OrderLine {
    product: Product!
    quantity: Int!
  }
  
  type Order {
    id: String!
    retailerId: String!
    orderDate: Date!
    orderLines: [OrderLine!]!
  }
  
  type Query {
    product(id: String!): Product
    order(id: String!): Order
  }
  
  schema {
      query: Query
  }
  </code></pre>
  
  <p>And the following query:</p>
  
  <pre><code>query {
      order(id: "1") {
          id
          orderLines {
              quantity
          }
      }
  }
  </code></pre>
  
  <p>I have tried multiple versions of implementing the resolvers (just test data for now) and none seem to return what I exect. This is my current resolver implementation:</p>
  
  <pre><code>const resolvers = {
    OrderLine: {
      quantity: () =&gt; 1,
    },
    Order: {
      orderLines: (parent: any, args: any) =&gt; { console.log("Calling order lines"); return []; },
    },
    Query: {
      product(parent, args, ctx, other) {
        return { id: args.id.toString(), test: true };
      },
      order: ({ id }) =&gt; { console.log("Calling order 1"); return { id: id.toString(), testOrder: true, orderLines: [] }; },
    },
    order: ({ id }) =&gt; { console.log("Calling order 2"); return { id: id.toString(), testOrder: true, orderLines: [] }; },
  };
  </code></pre>
  
  <p>In the console I can oberse the "Calling order 2" log message, there are no logs to "Calling order lines" and the order lines array is empty.</p>
  
  <p>So two part question:</p>
  
  <p>1) Why does it hit "Calling order 2" and not "Calling order 1" in the above example?</p>
  
  <p>2) Why won't the above work for the nested query Order.OrderLines?</p>
  
  <p>Thanks in advance!</p>