title: Nested queries with graphql in c#
body: <p>Im trying to implement a graphql api in c#. I have the basics working but i am struggling to get the nested queries working. </p>
  
  <p>I have seen it implemented in the likes of NodeJS and others. I was just wondering if someone could help me implement the same in c#.</p>
  
  <p>basic types: </p>
  
  <pre><code> public AirportType()
      {
          Name = "Airport";
  
          Field(x =&gt; x.Id, type: typeof(IdGraphType)).Description("The ID of the Airport.");
          Field(x =&gt; x.Name).Description("The name of the Airport");
          Field(x =&gt; x.Location).Description("The Location of the Airport");
          Field(x =&gt; x.Plane,nullable:true, type: typeof(ListGraphType&lt;PlaneType&gt;)).Description("Aiports Planes");
  
      }
  
  
    public PlaneType()
      {
          Name = "Plane";
  
          Field(x =&gt; x.Id, type: typeof(IdGraphType)).Description("The ID of the Plane.");
          Field(x =&gt; x.Model).Description("The model of the Plane");
          Field(x =&gt; x.Callsign).Description("The callsign of the Plane");
          Field(x =&gt; x.AirportId,nullable:true).Description("The parent Aiport");
          Field(x =&gt; x.Pilot,nullable:true, type: typeof(ListGraphType&lt;PilotType&gt;)).Description("The Planes Pilots");
      }
  
  
  
   public PilotType()
      {
          Name = "Pilot";
  
          Field(x =&gt; x.Id, type: typeof(IdGraphType)).Description("The ID of the Pilot.");
          Field(x =&gt; x.Name).Description("The name of the Pilot");
          Field(x =&gt; x.Surname).Description("The surname of the Pilot");
          Field(x =&gt; x.PlaneId,nullable: true).Description("The parent Plane");
      }
  </code></pre>
  
  <p>and the basic queries:</p>
  
  <pre><code> Field&lt;AirportType&gt;(
              "airport",
              arguments: new QueryArguments(
                  new QueryArgument&lt;IdGraphType&gt; { Name = "id", Description = "The ID of the aiport." }),
              resolve: context =&gt;
              {
                  var id = context.GetArgument&lt;int?&gt;("id");
                  var airport = db.Airport.Include("Plane.Pilot").FirstOrDefault(i =&gt; i.Id == id);
  
                  return airport;
              });
          Field&lt;ListGraphType&lt;AirportType&gt;&gt;(
              "airports",
              resolve: context =&gt;
              {
                  var airports = db.Airport.Include("Plane.Pilot");
  
                  return airports;
              });
          Field&lt;ListGraphType&lt;PlaneType&gt;&gt;(
              "planes",
              resolve: context =&gt;
              {
                  var planes = db.Plane.Include("Pilot").Include("Airport");
  
                  return planes;
              });
  </code></pre>