GraphQL query: only include field if not null
<p>Does GraphQL have the possibility for the client to tell the server that it wants a field only if that field is not <code>null</code>? </p>

<p>Given the query </p>

<pre><code>query HeroAndFriends {
  hero {
    name
    friends {
      name
    }
  }
}
</code></pre>

<p>the response should then look like</p>

<pre><code>{
  "data": {
    "hero": {
      "friends": [
        {
          "name": "Luke Skywalker"
        },
        {
          "name": "Han Solo"
        },
        {
          "name": "Leia Organa"
        }
      ]
    }
  }
}
</code></pre>

<p>instead of </p>

<pre><code>{
  "data": {
    "hero": {
      "name": null,
      "friends": [
        {
          "name": "Luke Skywalker"
        },
        {
          "name": "Han Solo"
        },
        {
          "name": "Leia Organa"
        }
      ]
    }
  }
}
</code></pre>

<p>Is this possible without violating the GraphQL specification?</p>