Skip to content

Commit c04dd01

Browse files
authored
Merge pull request #255 from grvillic/grvillic/SyncSchema
Sync GraphQL schema
2 parents 332e997 + 26b0b8d commit c04dd01

File tree

271 files changed

+8756
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+8756
-187
lines changed

Octokit.GraphQL.IntegrationTests/Queries/IssueTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public async Task Can_Manually_Page_Issue_Comments_By_Node_Id()
122122
.Select(issue => new
123123
{
124124
issue.Id,
125-
Comments = issue.Comments(100, null, null, null).Select(page => new
125+
Comments = issue.Comments(100, null, null, null, null).Select(page => new
126126
{
127127
page.PageInfo.HasNextPage,
128128
page.PageInfo.EndCursor,
@@ -171,7 +171,7 @@ public async Task Can_AutoPage_Issue_Comments()
171171
.Select(issue => new
172172
{
173173
issue.Id,
174-
Comments = issue.Comments(null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
174+
Comments = issue.Comments(null, null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
175175
});
176176

177177
var result = await Connection.Run(query);
@@ -188,7 +188,7 @@ public async Task Can_AutoPage_Issues_Comments()
188188
.Select(issue => new
189189
{
190190
issue.Id,
191-
Comments = issue.Comments(null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
191+
Comments = issue.Comments(null, null, null, null, null).AllPages().Select(comment => comment.Body).ToList(),
192192
});
193193

194194
var result = (await Connection.Run(query)).ToList();

Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public async Task Should_Run_Readme_Query()
5151
};
5252

5353
var result = await Connection.Run(query, vars);
54-
Assert.Equal(result.Login, "octokit");
55-
Assert.Equal(result.Name, "octokit.graphql.net");
54+
Assert.Equal("octokit", result.Login);
55+
Assert.Equal("octokit.graphql.net", result.Name);
5656
}
5757

5858
[IntegrationTest]
@@ -69,8 +69,8 @@ public async Task Should_Query_Repository_ByName()
6969
var repository = await Connection.Run(query);
7070

7171
Assert.NotNull(repository);
72-
Assert.Equal(repository.Name, "octokit.net");
73-
Assert.Equal(repository.DatabaseId, 7528679);
72+
Assert.Equal("octokit.net", repository.Name);
73+
Assert.Equal(7528679, repository.DatabaseId);
7474
}
7575

7676
[IntegrationTest]
@@ -86,11 +86,11 @@ public async Task Should_QueryRepositoryOwner_Repositories_OrderBy_Name_Ascendin
8686

8787
var repositoryNames = (await Connection.Run(query)).ToArray();
8888

89-
Assert.Contains("discussions", repositoryNames);
90-
Assert.Contains("go-octokit", repositoryNames);
91-
Assert.Contains("octokit.net", repositoryNames);
92-
Assert.Contains("octokit.objc", repositoryNames);
93-
Assert.Contains("octokit.rb", repositoryNames);
89+
Assert.Contains(".github", repositoryNames);
90+
Assert.Contains("action.js", repositoryNames);
91+
Assert.Contains("app-permissions", repositoryNames);
92+
Assert.Contains("app.js", repositoryNames);
93+
Assert.Contains("auth-action.js", repositoryNames);
9494
}
9595

9696
[IntegrationTest]
@@ -175,7 +175,7 @@ public async Task Query_Organization_Repositories_Select_Simple_Fragment()
175175

176176
var repositoryName = (await Connection.Run(query)).OrderByDescending(s => s).First();
177177

178-
Assert.Equal("webhooks.js", repositoryName);
178+
Assert.Equal("webhooks-methods.js", repositoryName);
179179
}
180180

181181
[IntegrationTest]
@@ -260,7 +260,7 @@ public async Task Query_Organization_Repositories_Select_Object_Fragment()
260260

261261
var testModelObject = (await Connection.Run(query)).OrderByDescending(s => s.StringField1).First();
262262

263-
Assert.Equal("webhooks.js", testModelObject.StringField1);
263+
Assert.Equal("webhooks-methods.js", testModelObject.StringField1);
264264
}
265265

266266
[IntegrationTest]

Octokit.GraphQL.IntegrationTests/Queries/ViewerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public async Task Viewer_By_GraphyQL_Matches_Api()
5252

5353
Assert.NotNull(graphqlUser);
5454

55-
Assert.Equal(apiUser.AvatarUrl, graphqlUser.AvatarUrl);
55+
Assert.Equal(apiUser.AvatarUrl.Split("?").First(), graphqlUser.AvatarUrl.Split("?").First());
5656
Assert.Equal(apiUser.Bio, graphqlUser.Bio);
5757
Assert.Equal(apiUser.Company, graphqlUser.Company);
5858

Octokit.GraphQL/Model/ActionExecutionCapabilitySetting.cs

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of AddDiscussionComment
8+
/// </summary>
9+
public class AddDiscussionCommentInput
10+
{
11+
/// <summary>
12+
/// The Node ID of the discussion to comment on.
13+
/// </summary>
14+
public ID DiscussionId { get; set; }
15+
16+
/// <summary>
17+
/// The Node ID of the discussion comment within this discussion to reply to.
18+
/// </summary>
19+
public ID? ReplyToId { get; set; }
20+
21+
/// <summary>
22+
/// The contents of the comment.
23+
/// </summary>
24+
public string Body { get; set; }
25+
26+
/// <summary>
27+
/// A unique identifier for the client performing the mutation.
28+
/// </summary>
29+
public string ClientMutationId { get; set; }
30+
}
31+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// Autogenerated return type of AddDiscussionComment
11+
/// </summary>
12+
public class AddDiscussionCommentPayload : QueryableValue<AddDiscussionCommentPayload>
13+
{
14+
internal AddDiscussionCommentPayload(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
/// <summary>
19+
/// A unique identifier for the client performing the mutation.
20+
/// </summary>
21+
public string ClientMutationId { get; }
22+
23+
/// <summary>
24+
/// The newly created discussion comment.
25+
/// </summary>
26+
public DiscussionComment Comment => this.CreateProperty(x => x.Comment, Octokit.GraphQL.Model.DiscussionComment.Create);
27+
28+
internal static AddDiscussionCommentPayload Create(Expression expression)
29+
{
30+
return new AddDiscussionCommentPayload(expression);
31+
}
32+
}
33+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ namespace Octokit.GraphQL.Model
44
using System.Collections.Generic;
55

66
/// <summary>
7-
/// Autogenerated input type of UpdateEnterpriseActionExecutionCapabilitySetting
7+
/// Autogenerated input type of AddEnterpriseSupportEntitlement
88
/// </summary>
9-
public class UpdateEnterpriseActionExecutionCapabilitySettingInput
9+
public class AddEnterpriseSupportEntitlementInput
1010
{
1111
/// <summary>
12-
/// The ID of the enterprise on which to set the members can create repositories setting.
12+
/// The ID of the Enterprise which the admin belongs to.
1313
/// </summary>
1414
public ID EnterpriseId { get; set; }
1515

1616
/// <summary>
17-
/// The value for the action execution capability setting on the enterprise.
17+
/// The login of a member who will receive the support entitlement.
1818
/// </summary>
19-
public ActionExecutionCapabilitySetting Capability { get; set; }
19+
public string Login { get; set; }
2020

2121
/// <summary>
2222
/// A unique identifier for the client performing the mutation.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// Autogenerated return type of AddEnterpriseSupportEntitlement
11+
/// </summary>
12+
public class AddEnterpriseSupportEntitlementPayload : QueryableValue<AddEnterpriseSupportEntitlementPayload>
13+
{
14+
internal AddEnterpriseSupportEntitlementPayload(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
/// <summary>
19+
/// A unique identifier for the client performing the mutation.
20+
/// </summary>
21+
public string ClientMutationId { get; }
22+
23+
/// <summary>
24+
/// A message confirming the result of adding the support entitlement.
25+
/// </summary>
26+
public string Message { get; }
27+
28+
internal static AddEnterpriseSupportEntitlementPayload Create(Expression expression)
29+
{
30+
return new AddEnterpriseSupportEntitlementPayload(expression);
31+
}
32+
}
33+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of AddUpvote
8+
/// </summary>
9+
public class AddUpvoteInput
10+
{
11+
/// <summary>
12+
/// The Node ID of the discussion or comment to upvote.
13+
/// </summary>
14+
public ID SubjectId { get; set; }
15+
16+
/// <summary>
17+
/// A unique identifier for the client performing the mutation.
18+
/// </summary>
19+
public string ClientMutationId { get; set; }
20+
}
21+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// Autogenerated return type of AddUpvote
11+
/// </summary>
12+
public class AddUpvotePayload : QueryableValue<AddUpvotePayload>
13+
{
14+
internal AddUpvotePayload(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
/// <summary>
19+
/// A unique identifier for the client performing the mutation.
20+
/// </summary>
21+
public string ClientMutationId { get; }
22+
23+
/// <summary>
24+
/// The votable subject.
25+
/// </summary>
26+
public IVotable Subject => this.CreateProperty(x => x.Subject, Octokit.GraphQL.Model.Internal.StubIVotable.Create);
27+
28+
internal static AddUpvotePayload Create(Expression expression)
29+
{
30+
return new AddUpvotePayload(expression);
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)