Skip to content

Commit 53d17ca

Browse files
authored
Merge pull request #76 from Linq2GraphQL/fix-update-hc-and-net
Update HC to 15. Update to .NET9
2 parents 389e155 + 97cd743 commit 53d17ca

File tree

170 files changed

+2966
-2374
lines changed

Some content is hidden

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

170 files changed

+2966
-2374
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
with:
20-
fetch-depth: 0
21-
- name: Setup .NET
22-
uses: actions/setup-dotnet@v3
23-
with:
24-
dotnet-version: 8.0.x
25-
- name: Restore dependencies
26-
run: dotnet restore
27-
- name: Build
28-
run: dotnet build --no-restore
29-
- name: Test
30-
run: dotnet test --no-build --verbosity normal
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v3
23+
with:
24+
dotnet-version: 9.0.x
25+
- name: Restore dependencies
26+
run: dotnet restore
27+
- name: Build
28+
run: dotnet build --no-restore
29+
- name: Test
30+
run: dotnet test --no-build --verbosity normal

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET Core
1717
uses: actions/setup-dotnet@v3
1818
with:
19-
dotnet-version: 8.0.x
19+
dotnet-version: 9.0.x
2020

2121
- name: Publish
2222
working-directory: docs/Linq2GraphQL.Docs

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Create Release
22

3-
on: [workflow_dispatch]
3+
on: [ workflow_dispatch ]
44
jobs:
55
build:
66

@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup .NET
1818
uses: actions/setup-dotnet@v2
1919
with:
20-
dotnet-version: 8.0.x
20+
dotnet-version: 9.0.x
2121

2222
- uses: dotnet/nbgv@master
2323
id: nbgv

Directory.Packages.props

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
</PropertyGroup>
55
<ItemGroup>
6-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
6+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" />
77
</ItemGroup>
88
<ItemGroup>
99
<PackageVersion Include="BlazorMonaco" Version="3.3.0" />
@@ -12,31 +12,32 @@
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageVersion>
15-
<PackageVersion Include="HotChocolate.AspNetCore" Version="13.9.12" />
16-
<PackageVersion Include="HotChocolate.Data" Version="13.9.12" />
17-
<PackageVersion Include="HotChocolate.Types.Scalars" Version="13.9.12" />
15+
<PackageVersion Include="HotChocolate.AspNetCore" Version="15.1.10" />
16+
<PackageVersion Include="HotChocolate.Data" Version="15.1.10" />
17+
<PackageVersion Include="HotChocolate.Types.Scalars" Version="15.1.10" />
18+
<PackageVersion Include="HotChocolate.Types.Analyzers" Version="15.1.10" />
1819
<PackageVersion Include="Macross.Json.Extensions" Version="3.0.0" />
19-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
20-
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" />
21-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
22-
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
23-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
24-
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
25-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
26-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
27-
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1" />
28-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
29-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
30-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
20+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.9" />
21+
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.9" />
22+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.9" />
23+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.9" />
24+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.9" />
25+
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.9" />
26+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.9" />
27+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" />
28+
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.9" />
29+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.9" />
30+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.9" />
31+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
3132
<PackageVersion Include="Moq" Version="4.20.72" />
3233
<PackageVersion Include="Shouldly" Version="4.3.0" />
33-
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
34+
<PackageVersion Include="System.CodeDom" Version="9.0.9" />
3435
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
35-
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
36+
<PackageVersion Include="System.Text.Json" Version="9.0.9" />
3637
<PackageVersion Include="TabBlazor" Version="0.8.1.1-alpha" />
37-
<PackageVersion Include="Websocket.Client" Version="5.1.2" />
38+
<PackageVersion Include="Websocket.Client" Version="5.3.0" />
3839
<PackageVersion Include="xunit" Version="2.9.3" />
39-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2">
40+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5">
4041
<PrivateAssets>all</PrivateAssets>
4142
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4243
</PackageVersion>

Linq2GraphQL.sln

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
5656
EndProject
5757
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartGG", "StartGG\StartGG.csproj", "{B59EEB8E-8B81-4470-9295-86DF27A769D2}"
5858
EndProject
59+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nullable", "nullable", "{3D9B8FE2-6906-4190-9AB4-845BAB6E403C}"
60+
EndProject
61+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nonnullable", "nonnullable", "{1F4F9593-3C19-4C2E-AF8C-C269659AA12A}"
62+
EndProject
5963
Global
6064
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6165
Debug|Any CPU = Debug|Any CPU
@@ -119,17 +123,19 @@ Global
119123
HideSolutionNode = FALSE
120124
EndGlobalSection
121125
GlobalSection(NestedProjects) = preSolution
122-
{AD8291B6-5979-4C43-B785-EAD4FF93C564} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
123-
{F412B4C3-F872-483C-A55D-B49782ACAAFE} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
124126
{F9EAFD31-9AF1-47DF-9C78-003C7AC67C5D} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
125-
{F0D6061C-3D3F-4323-AE4F-39737F5E2247} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
126127
{C1908816-34E7-4B41-9E39-2283C59DB017} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
127-
{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
128128
{058B468F-CE72-4CFF-8847-87CEED642C4E} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
129129
{C0E1A444-A834-4FC0-8436-38066EA8D37D} = {F646B02D-53FC-4C88-8941-2255A2F4DAF6}
130130
{A941BD4C-8B04-4273-AC0B-CF86D71D7E0B} = {884758A6-B667-4CA0-B186-AFB6331A24A5}
131131
{3C66EF43-E66D-46DE-B2BB-434E7FC20487} = {884758A6-B667-4CA0-B186-AFB6331A24A5}
132132
{B59EEB8E-8B81-4470-9295-86DF27A769D2} = {884758A6-B667-4CA0-B186-AFB6331A24A5}
133+
{3D9B8FE2-6906-4190-9AB4-845BAB6E403C} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
134+
{1F4F9593-3C19-4C2E-AF8C-C269659AA12A} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
135+
{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2} = {3D9B8FE2-6906-4190-9AB4-845BAB6E403C}
136+
{F0D6061C-3D3F-4323-AE4F-39737F5E2247} = {3D9B8FE2-6906-4190-9AB4-845BAB6E403C}
137+
{AD8291B6-5979-4C43-B785-EAD4FF93C564} = {1F4F9593-3C19-4C2E-AF8C-C269659AA12A}
138+
{F412B4C3-F872-483C-A55D-B49782ACAAFE} = {1F4F9593-3C19-4C2E-AF8C-C269659AA12A}
133139
EndGlobalSection
134140
GlobalSection(ExtensibilityGlobals) = postSolution
135141
SolutionGuid = {01DC7AB7-9900-4FCA-BACB-7DAAE825E25E}

README.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div align='center'>
32

43
<img src=https://raw.githubusercontent.com/Linq2GraphQL/Linq2GraphQL.Client/main/Logo.svg alt="logo" width=100 height=100 />
@@ -13,9 +12,12 @@
1312
</div>
1413

1514
# Introduction
16-
Linq2GraphQL generates C# classes from the GraphQL schema and and togheter with the nuget package Linq2GraphQL.Client it makes it possible to query the server using Linq expressions.
15+
16+
Linq2GraphQL generates C# classes from the GraphQL schema and and togheter with the nuget package Linq2GraphQL.Client it
17+
makes it possible to query the server using Linq expressions.
1718

1819
A simple query that will get the first 10 orders with the primitive properties of orders and the connected customer.
20+
1921
```cs
2022
var orders = await sampleClient
2123
.Query
@@ -26,6 +28,7 @@ var orders = await sampleClient
2628
```
2729

2830
A example mutation where we add a new customer and return the Customer Id.
31+
2932
```cs
3033
var customerId = await sampleClient
3134
.Mutation
@@ -40,16 +43,19 @@ A example mutation where we add a new customer and return the Customer Id.
4043
```
4144

4245
# Getting Started
46+
4347
## Generate Client code
48+
4449
There are two options to generate the client code from the GraphQL schema.
45-
Use the online tool to <a href="https://linq2graphql.com/generate-client"> generate</a> or install Linq2GraphQL.Generator as a tool.
50+
Use the online tool to <a href="https://linq2graphql.com/generate-client"> generate</a> or install
51+
Linq2GraphQL.Generator as a tool.
4652

47-
Install/Update Tool:
53+
Install/Update Tool:
4854

4955
dotnet tool update Linq2GraphQL.Generator -g --prerelease
50-
51-
Usage:
52-
56+
57+
Usage:
58+
5359
Linq2GraphQL.Generator <endpoint> [options]
5460

5561
Arguments:
@@ -64,24 +70,29 @@ Install/Update Tool:
6470
-es --enum-strategy If AddUnknownOption all enums will have an additional Unknown option
6571
-nu --nullabel Nullable client [default: false]
6672
-d --deprecated Include Deprecated as Obsolete
67-
73+
6874
As an example:
6975

7076
Linq2GraphQL https://spacex-production.up.railway.app/ -c="SpaceXClient" -n="SpaceX" -o="Generated"
7177

72-
Would generate a client from url *https://spacex-production.up.railway.app/* with the name *SpaceXClient* in the namespace *SpaceX* to folder *Generated*
78+
Would generate a client from url *https://spacex-production.up.railway.app/* with the name *SpaceXClient* in the
79+
namespace *SpaceX* to folder *Generated*
7380

7481
## Add Nuget
7582

76-
Latest stable: [![Nuget](https://img.shields.io/nuget/v/Linq2GraphQL.Client.svg)](https://www.nuget.org/packages/Linq2GraphQL.Client)
83+
Latest
84+
stable: [![Nuget](https://img.shields.io/nuget/v/Linq2GraphQL.Client.svg)](https://www.nuget.org/packages/Linq2GraphQL.Client)
7785
<br/>
78-
Latest prerelease: [![Nuget](https://img.shields.io/nuget/vpre/Linq2GraphQL.Client.svg)](https://www.nuget.org/packages/Linq2GraphQL.Client)
86+
Latest
87+
prerelease: [![Nuget](https://img.shields.io/nuget/vpre/Linq2GraphQL.Client.svg)](https://www.nuget.org/packages/Linq2GraphQL.Client)
7988

8089
dotnet add package Linq2GraphQL.Client --prerelease
8190

8291
## Dependency Injection
92+
8393
The client adds a set of extensions to make it easier to add the client to dependency injection.
8494
As an example this would add SpaceXClient to the container:
95+
8596
```cs
8697
services
8798
.SpaceXClient(x =>
@@ -94,15 +105,22 @@ services
94105
httpClient.BaseAddress = new Uri("https://spacex-production.up.railway.app/");
95106
});
96107
```
108+
97109
## Safe Mode
98-
Turning on *SafeMode* will make the client before the first request to do an introspection query to the endpoint. The schema will be used to make sure that any auto included properties are available. This is an advanced feature that require the endpoint to support introspection. By default safe mode is turned of.
110+
111+
Turning on *SafeMode* will make the client before the first request to do an introspection query to the endpoint. The
112+
schema will be used to make sure that any auto included properties are available. This is an advanced feature that
113+
require the endpoint to support introspection. By default safe mode is turned of.
99114

100115
# Acknowledgments
101-
Linq2GraphQL is inspired by [GraphQLinq](https://github.com/Giorgi/GraphQLinq) , thank you [Giorgi](https://github.com/Giorgi)
116+
117+
Linq2GraphQL is inspired by [GraphQLinq](https://github.com/Giorgi/GraphQLinq) , thank
118+
you [Giorgi](https://github.com/Giorgi)
102119

103120
## Contributing
104121

105-
Are you a developer looking to contribute to this project? Please see our [Developer Guide](DEVELOPER.md) for comprehensive information about:
122+
Are you a developer looking to contribute to this project? Please see our [Developer Guide](DEVELOPER.md) for
123+
comprehensive information about:
106124

107125
- T4 template development workflow
108126
- Code generation system architecture
@@ -112,7 +130,9 @@ Are you a developer looking to contribute to this project? Please see our [Devel
112130

113131
## Development Workflow
114132

115-
**⚠️ Important for Developers:** When modifying T4 templates (`.tt` files), you must manually regenerate the corresponding `.cs` files using Visual Studio's "Run Custom Tool" feature. See [DEVELOPER.md](DEVELOPER.md) for detailed instructions.
133+
**⚠️ Important for Developers:** When modifying T4 templates (`.tt` files), you must manually regenerate the
134+
corresponding `.cs` files using Visual Studio's "Run Custom Tool" feature. See [DEVELOPER.md](DEVELOPER.md) for detailed
135+
instructions.
116136

117137
[![Stargazers repo roster for @linq2graphql/linq2graphql.client](https://reporoster.com/stars/dark/linq2graphql/linq2graphql.client)](https://github.com/linq2graphql/linq2graphql.client/stargazers)
118138

0 commit comments

Comments
 (0)