title: GraphQL - variable not defined by operation
body: <p>My GraphQL schema is defined as:</p>
  
  <pre><code>type Query {
      getEntity(id: Int!): Entity
      getEntityUsers(entityId: Int!, statusId: Int): [User]
  }
  
  type Entity {
      id: Int!
      name: String!
      email: String!
      logo: String
      createdAt: DateTime!
      updatedAt: DateTime!
  
      users(statusId: Int): [User]
  }
  </code></pre>
  
  <p>As you can see I have two ways of getting users for an <code>Entity</code> object. The one that is currently working for my query is the <code>getEntityUsers</code> root resolver method. This query looks like this:</p>
  
  <pre><code>query getEntityUsers($entityId: Int!, $statusId: Int) {
          users: getEntityUsers(entityId: $entityId, statusId: $statusId) {
              ...
          }
      }
  </code></pre>
  
  <p>.. with the variables:</p>
  
  <pre><code>{
      entityId: 1,
      statusId: 2
  }
  </code></pre>
  
  <p>Is there anyway to make the other way work by allowing me to pass in the <code>statusId</code>? Right now the query looks like this:</p>
  
  <pre><code>query getEntity($id: Int!) {
          entity: getEntity(id: $id) {
              ...
              users (statusId: 2) {
                  ... 
              }
          }
      }
  </code></pre>
  
  <p>This obviously works with the variables:</p>
  
  <pre><code>{
      id: 1
  }
  </code></pre>
  
  <p>But, what if I wanted to use this second method and change the <code>statusId</code>? Is there anyway to pass in the <code>statusId</code> if it's not defined on the root resolver?</p>
  
  <p>I have tried the query:</p>
  
  <pre><code>query getEntity($id: Int!) {
          entity: getEntity(id: $id) {
              ...
              users (statusId: $statusId) {
                  ... 
              }
          }
      }
  </code></pre>
  
  <p>.. with the variables:</p>
  
  <pre><code>{
      id: 1,
      statusId: 2
  }
  </code></pre>
  
  <p>But I just get the error: <code>Variable "$statusId" is not defined by operation "getEntity".</code> Is there anyway to do this?</p>