public EntityTypeQueryResourceBuilder WithNestedField(string fieldName)
        {
            var builder = new EntityTypeQueryResourceBuilder(fieldName);

            _nested.Add(builder);
            return(builder);
        }
        public async Task <JObject> Query(string contentType, Action <EntityTypeQueryResourceBuilder> builder)
        {
            var contentTypeBuilder = new EntityTypeQueryResourceBuilder(contentType);

            builder(contentTypeBuilder);

            var requestJson = new JObject(
                new JProperty("query", @"query { " + contentTypeBuilder.Build() + " }")
                );

            var response = await _client
                           .PostJsonAsync("api/graphql", requestJson.ToString());

            if (!response.IsSuccessStatusCode)
            {
                throw new Exception(await response.Content.ReadAsStringAsync());
            }

            return(JObject.Parse(await response.Content.ReadAsStringAsync()));
        }