-
Notifications
You must be signed in to change notification settings - Fork 48
/
IConnection.cs
27 lines (25 loc) · 938 Bytes
/
IConnection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Octokit.GraphQL
{
/// <summary>
/// Defines a connection for making HTTP requests against the GitHub GraphQL API endpoint.
/// </summary>
public interface IConnection
{
/// <summary>
/// Gets the base URI for the connection.
/// </summary>
Uri Uri { get; }
/// <summary>
/// Runs the specified GraphQL query as an asynchronous operation.
/// </summary>
/// <param name="query">The GraphQL query to run.</param>
/// <param name="cancellationToken">The optional cancellation token to use.</param>
/// <returns>
/// A <see cref="Task{TResult}"/> representing the asynchronous operation that returns the result of the GraphQL query.
/// </returns>
Task<string> Run(string query, CancellationToken cancellationToken = default);
}
}