[feat]: Adds GraphQL rate limit property to the rate limit client

add in graphql rate limit
This commit is contained in:
Dirty Gooback
2023-11-13 14:19:38 -08:00
committed by GitHub
parent 4f826bc65b
commit f679108db5
4 changed files with 45 additions and 7 deletions
@@ -9,7 +9,6 @@ namespace Octokit.Tests.Integration.Clients
public async Task CanRetrieveResourceRateLimits()
{
var github = Helper.GetAuthenticatedClient();
var result = await github.RateLimit.GetRateLimits();
// Test the core limits
@@ -26,6 +25,13 @@ namespace Octokit.Tests.Integration.Clients
Assert.True(result.Resources.Search.ResetAsUtcEpochSeconds > 0);
Assert.NotEqual(default, result.Resources.Search.Reset);
// Test the graphql limits
Assert.True(result.Resources.Graphql.Limit > 0);
Assert.True(result.Resources.Graphql.Remaining > -1);
Assert.True(result.Resources.Graphql.Remaining <= result.Resources.Graphql.Limit);
Assert.True(result.Resources.Graphql.ResetAsUtcEpochSeconds > 0);
Assert.NotEqual(default, result.Resources.Graphql.Reset);
// Test the depreciated rate limits
Assert.True(result.Rate.Limit > 0);
Assert.True(result.Rate.Remaining > -1);