Skip to content

Commit 3b717e3

Browse files
authored
Merge pull request #259 from NahisWayard/master
Update schema
2 parents f26bbda + 2c23fd5 commit 3b717e3

File tree

138 files changed

+4560
-132
lines changed

Some content is hidden

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

138 files changed

+4560
-132
lines changed

Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public async Task Query_Repository_Select_Inner_Simple_Fragment()
153153
var query = new Query()
154154
.Select(q => new
155155
{
156-
Name = q.Repository("octokit.net", "octokit").Select(fragment).SingleOrDefault()
156+
Name = q.Repository("octokit.net", "octokit", null).Select(fragment).SingleOrDefault()
157157
});
158158

159159

@@ -210,8 +210,8 @@ public async Task Query_Repository_Select_Object_Fragment_Twice()
210210
var query = new Query()
211211
.Select(q => new
212212
{
213-
repo1 = q.Repository("octokit.net", "octokit").Select(fragment).Single(),
214-
repo2 = q.Repository("octokit.graphql.net", "octokit").Select(fragment).Single(),
213+
repo1 = q.Repository("octokit.net", "octokit", null).Select(fragment).Single(),
214+
repo2 = q.Repository("octokit.graphql.net", "octokit", null).Select(fragment).Single(),
215215
});
216216

217217
var result = await Connection.Run(query);
@@ -233,7 +233,7 @@ public async Task Query_Repository_Select_Inner_Object_Fragment()
233233
var query = new Query()
234234
.Select(q => new
235235
{
236-
TestModel = q.Repository("octokit.net", "octokit").Select(fragment).SingleOrDefault()
236+
TestModel = q.Repository("octokit.net", "octokit", null).Select(fragment).SingleOrDefault()
237237
});
238238

239239

@@ -279,7 +279,7 @@ public async Task Query_Organization_Repositories_Select_Multiple_Object_Fragmen
279279
Member = organization.MembersWithRole(10, null, null, null).Nodes
280280
.Select(fragment).ToList().OrderBy(o => o.StringField1).First(),
281281

282-
MentionableUser = organization.Repository("octokit.net")
282+
MentionableUser = organization.Repository("octokit.net", null)
283283
.MentionableUsers(10, null, null, null, null).Nodes
284284
.Select(fragment).ToList().OrderBy(o => o.StringField1).First()
285285
});
@@ -370,7 +370,7 @@ public async Task Should_Query_RepositoryOwner_Repository_With_Fragment()
370370
var query = new Query().Select(q => new
371371
{
372372
repoOwner = q
373-
.Repository("octokit.net", "octokit")
373+
.Repository("octokit.net", "octokit", null)
374374
.Owner
375375
.Select(fragment)
376376
.SingleOrDefault()

Octokit.GraphQL.UnitTests/ExpressionRewiterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public void Repository_Select_Use_Fragment_Twice()
6262
var query = new Query()
6363
.Select(q => new
6464
{
65-
repo1 = q.Repository("foo", "bar").Select(fragment).SingleOrDefault(),
66-
repo2 = q.Repository("foo", "bar").Select(fragment).SingleOrDefault()
65+
repo1 = q.Repository("foo", "bar", null).Select(fragment).SingleOrDefault(),
66+
repo2 = q.Repository("foo", "bar", null).Select(fragment).SingleOrDefault()
6767
});
6868

6969
Expression<Func<JObject, object>> expected = data =>
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 AbortQueuedMigrations
8+
/// </summary>
9+
public class AbortQueuedMigrationsInput
10+
{
11+
/// <summary>
12+
/// The ID of the organization that is running the migrations.
13+
/// </summary>
14+
public ID OwnerId { 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 AbortQueuedMigrations
11+
/// </summary>
12+
public class AbortQueuedMigrationsPayload : QueryableValue<AbortQueuedMigrationsPayload>
13+
{
14+
internal AbortQueuedMigrationsPayload(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+
/// Did the operation succeed?
25+
/// </summary>
26+
public bool? Success { get; }
27+
28+
internal static AbortQueuedMigrationsPayload Create(Expression expression)
29+
{
30+
return new AbortQueuedMigrationsPayload(expression);
31+
}
32+
}
33+
}

Octokit.GraphQL/Model/ActorType.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
using Newtonsoft.Json;
4+
using Newtonsoft.Json.Converters;
5+
6+
namespace Octokit.GraphQL.Model
7+
{
8+
/// <summary>
9+
/// The actor's type.
10+
/// </summary>
11+
[JsonConverter(typeof(StringEnumConverter))]
12+
public enum ActorType
13+
{
14+
/// <summary>
15+
/// Indicates a user actor.
16+
/// </summary>
17+
[EnumMember(Value = "USER")]
18+
User,
19+
20+
/// <summary>
21+
/// Indicates a team actor.
22+
/// </summary>
23+
[EnumMember(Value = "TEAM")]
24+
Team,
25+
}
26+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of AddProjectDraftIssue
8+
/// </summary>
9+
public class AddProjectDraftIssueInput
10+
{
11+
/// <summary>
12+
/// The ID of the Project to add the draft issue to.
13+
/// </summary>
14+
public ID ProjectId { get; set; }
15+
16+
/// <summary>
17+
/// The title of the draft issue.
18+
/// </summary>
19+
public string Title { get; set; }
20+
21+
/// <summary>
22+
/// The body of the draft issue.
23+
/// </summary>
24+
public string Body { get; set; }
25+
26+
/// <summary>
27+
/// The IDs of the assignees of the draft issue.
28+
/// </summary>
29+
public IEnumerable<ID> AssigneeIds { get; set; }
30+
31+
/// <summary>
32+
/// A unique identifier for the client performing the mutation.
33+
/// </summary>
34+
public string ClientMutationId { get; set; }
35+
}
36+
}
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 AddProjectDraftIssue
11+
/// </summary>
12+
public class AddProjectDraftIssuePayload : QueryableValue<AddProjectDraftIssuePayload>
13+
{
14+
internal AddProjectDraftIssuePayload(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 draft issue added to the project.
25+
/// </summary>
26+
public ProjectNextItem ProjectNextItem => this.CreateProperty(x => x.ProjectNextItem, Octokit.GraphQL.Model.ProjectNextItem.Create);
27+
28+
internal static AddProjectDraftIssuePayload Create(Expression expression)
29+
{
30+
return new AddProjectDraftIssuePayload(expression);
31+
}
32+
}
33+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of AddProjectNextItem
8+
/// </summary>
9+
public class AddProjectNextItemInput
10+
{
11+
/// <summary>
12+
/// The ID of the Project to add the item to.
13+
/// </summary>
14+
public ID ProjectId { get; set; }
15+
16+
/// <summary>
17+
/// The content id of the item (Issue or PullRequest).
18+
/// </summary>
19+
public ID ContentId { get; set; }
20+
21+
/// <summary>
22+
/// A unique identifier for the client performing the mutation.
23+
/// </summary>
24+
public string ClientMutationId { get; set; }
25+
}
26+
}
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 AddProjectNextItem
11+
/// </summary>
12+
public class AddProjectNextItemPayload : QueryableValue<AddProjectNextItemPayload>
13+
{
14+
internal AddProjectNextItemPayload(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 item added to the project.
25+
/// </summary>
26+
public ProjectNextItem ProjectNextItem => this.CreateProperty(x => x.ProjectNextItem, Octokit.GraphQL.Model.ProjectNextItem.Create);
27+
28+
internal static AddProjectNextItemPayload Create(Expression expression)
29+
{
30+
return new AddProjectNextItemPayload(expression);
31+
}
32+
}
33+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Linq;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// Types which can be actors for `BranchActorAllowance` objects.
11+
/// </summary>
12+
public class BranchActorAllowanceActor : QueryableValue<BranchActorAllowanceActor>, IUnion
13+
{
14+
internal BranchActorAllowanceActor(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
public TResult Switch<TResult>(Expression<Func<Selector<TResult>, Selector<TResult>>> select) => default;
19+
20+
public class Selector<T>
21+
{
22+
/// <summary>
23+
/// A team of users in an organization.
24+
/// </summary>
25+
public Selector<T> Team(Func<Team, T> selector) => default;
26+
27+
/// <summary>
28+
/// A user is an individual's account on GitHub that owns repositories and can make new content.
29+
/// </summary>
30+
public Selector<T> User(Func<User, T> selector) => default;
31+
}
32+
33+
internal static BranchActorAllowanceActor Create(Expression expression)
34+
{
35+
return new BranchActorAllowanceActor(expression);
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)