Skip to content

Commit 2f5185c

Browse files
committed
update .net core version and allow passing override settings
- for nice packaged schema scenarios
1 parent a9d0e06 commit 2f5185c

32 files changed

+36175
-147
lines changed

Samples/ClientSample/Client/GitHub/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@
995995
"deprecationReason": null
996996
},
997997
{
998-
"name": "viewer",
998+
"name": "viewer1",
999999
"description": "The currently authenticated user.",
10001000
"args": [],
10011001
"type": {

Samples/ClientSample/Sample.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<Import Project="$(MSBuildProjectDirectory)\..\..\Tocsoft.GraphQLCodeGen.MsBuild\test.props" />
4+
<Import Project="$(MSBuildProjectDirectory)\..\OutOfPathSettingsFileOverlay\overridesettings.props" />
45
<PropertyGroup>
56
<OutputType>Exe</OutputType>
6-
<TargetFramework>netcoreapp2.0</TargetFramework>
7+
<TargetFramework>netcoreapp3.1</TargetFramework>
78
<RunGraphQLCodeGen>true</RunGraphQLCodeGen>
89
<GraphQLCodeGenTimeOut>10000</GraphQLCodeGenTimeOut>
910
</PropertyGroup>

Samples/ClientSample/Client/GitHubTypescript/addStar.gql renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/addStar.gql

File renamed without changes.

Samples/ClientSample/Client/GitHubTypescript/currentUser.gql renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/currentUser.gql

File renamed without changes.

Samples/ClientSample/Client/GitHubTypescript/generated.ts renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/generated.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default class GitHubTsClient {
3939
return this.client.fetch(this.url, {
4040
method : 'POST',
4141
body : JSON.stringify({
42-
query : `mutation ($repositoyId : ID!){
43-
addStar(input :{clientMutationId : "123", starrableId :$repositoyId }){
44-
starrable {
42+
query : `{
43+
addStar(input: {clientMutationId: "123", starrableId: $repositoyId}){
44+
starrable{
4545
viewerHasStarred
4646
}
4747
}
@@ -71,10 +71,10 @@ export default class GitHubTsClient {
7171
return this.client.fetch(this.url, {
7272
method : 'POST',
7373
body : JSON.stringify({
74-
query : `query {
75-
viewer {
76-
login,
77-
bio,
74+
query : `query {
75+
viewer{
76+
login
77+
bio
7878
}
7979
}
8080
`,
@@ -101,20 +101,20 @@ export default class GitHubTsClient {
101101
return this.client.fetch(this.url, {
102102
method : 'POST',
103103
body : JSON.stringify({
104-
query : `query ($type : SearchType!, $query : String!) {
105-
viewer {
104+
query : `query ($type: SearchType!, $query: String!) {
105+
viewer{
106106
login
107107
}
108-
search(first : 10, type : $type, query : $query){
108+
search(first: 10, type: $type, query: $query){
109109
nodes{
110110
__typename
111-
... on Issue {
112-
author {
111+
... on Issue {
112+
author{
113113
login
114114
}
115115
}
116-
... on PullRequest{
117-
author {
116+
... on PullRequest {
117+
author{
118118
login
119119
}
120120
}
@@ -147,21 +147,21 @@ export default class GitHubTsClient {
147147
return this.client.fetch(this.url, {
148148
method : 'POST',
149149
body : JSON.stringify({
150-
query : `query ($login:String!, $repoCount: Int!){
150+
query : `query ($login: String!, $repoCount: Int!) {
151151
user(login: $login){
152-
login,
153-
bio,
154-
first :repositories(first : $repoCount){
152+
login
153+
bio
154+
first: repositories(first: $repoCount){
155155
nodes{
156-
id,
157-
name,
156+
id
157+
name
158158
updatedAt
159159
}
160-
},
161-
last :repositories(last : $repoCount){
160+
}
161+
last: repositories(last: $repoCount){
162162
nodes{
163-
id,
164-
name,
163+
id
164+
name
165165
updatedAt
166166
}
167167
}

Samples/ClientSample/Client/GitHubTypescript/gqlsettings.json renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/gqlsettings.json

File renamed without changes.

Samples/ClientSample/Client/GitHubTypescript/schema.json renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/schema.json

File renamed without changes.

Samples/ClientSample/Client/GitHubTypescript/search.gql renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/search.gql

File renamed without changes.

Samples/ClientSample/Client/GitHubTypescript/usersRepositores.gql renamed to Samples/ClientSampleTypescipt/Client/GitHubTypescript/usersRepositores.gql

File renamed without changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Linq;
3+
using System.Net.Http;
4+
using System.Threading.Tasks;
5+
6+
namespace Sample
7+
{
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)