Код: Выделить всё
dotnet graphql init https:/70sh7x92sb.execute.amazonaws.com/main/v1/graphql/external --scheme Bearer --token dsafdasfsadfasdfsadfdkfljdsklajkl;dfjaksl;dfjsdfsdf
Код: Выделить всё
using (StreamReader reader = new(Path.Combine(_env.ContentRootPath,"Features/MCReview/GraphQLQueries/getIndexRates.graphql")))
{
var graphQLClient = new GraphQLHttpClient(_uri,
new SystemTextJsonSerializer());
graphQLClient.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(_jwt);
var query = new GraphQLRequest
{
Query = reader.ReadToEnd()
};
var response = await graphQLClient.SendQueryAsync(query);
return Ok(new ResponseDTO()
{
Succeeded = true,
StatusCode = 200,
Message = "The data has been successfuly sent.",
Data = response.Data,
Pagination = null
});
}
Код: Выделить всё
Download schema started.
Download schema completed in 6 ms
Unhandled exception. System.UriFormatException: Invalid URI: The Authority/Host could not be parsed.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at StrawberryShake.Tools.InitCommandHandler.DownloadSchemaAsync(InitCommandContext context, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs:line 102
at StrawberryShake.Tools.InitCommandHandler.ExecuteInternalAsync(InitCommandContext context, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs:line 82
at StrawberryShake.Tools.InitCommandHandler.ExecuteAsync(InitCommandArguments arguments, CancellationToken cancellationToken) in /home/runner/work/graphql-platform/graphql-platform/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs:line 68
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at StrawberryShake.Tools.Program.(String[] args)
Подробнее здесь: https://stackoverflow.com/questions/792 ... aphql-tool
Мобильная версия