Esempio n. 1
0
        public async Task <GraphQLHttpResponse <TResponse> > SendHttpMutationAsync <TVariable, TResponse>(GraphQLHttpRequest <TVariable> request, CancellationToken cancellationToken = default)
        {
            await Task.CompletedTask;

            throw new NotImplementedException();
        }
Esempio n. 2
0
        public async Task <GraphQLHttpResponse <TResponse> > SendHttpQueryAsync <TVariable, TResponse>(GraphQLHttpRequest <TVariable> request, CancellationToken cancellationToken = default)
        {
            using var httpRequestMessage  = this.GenerateHttpRequestMessage(request);
            using var httpResponseMessage = await this.httpClient.SendAsync(httpRequestMessage, cancellationToken);

            if (!httpResponseMessage.IsSuccessStatusCode)
            {
                throw new GraphQLHttpException(httpResponseMessage);
            }

            var bodyStream = await httpResponseMessage.Content.ReadAsStreamAsync();

            return(await JsonSerializer.DeserializeAsync <GraphQLHttpResponse <TResponse> >(bodyStream, this.JsonSerializerOptions, cancellationToken));
        }
Esempio n. 3
0
 public async Task <GraphQLHttpResponse <TResponse> > SendHttpQueryAsync <TResponse>(GraphQLHttpRequest request, CancellationToken cancellationToken = default) =>
 await this.SendHttpQueryAsync <dynamic, TResponse>(request, cancellationToken);
 public Task <GraphQLHttpResponse <R> > SendMutationAsync <V, R>(GraphQLHttpRequest <V> request, CancellationToken cancellationToken = default)
 {
     throw new NotImplementedException();
 }