File tree Expand file tree Collapse file tree 11 files changed +79
-31
lines changed Expand file tree Collapse file tree 11 files changed +79
-31
lines changed Original file line number Diff line number Diff line change 1+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+ version : 2
3+ updates :
4+ - package-ecosystem : " nuget"
5+ directory : " /Subgraphs/Authors"
6+ schedule : { interval: "daily" }
7+ open-pull-requests-limit : 10
8+ labels : [ "dependencies", "untracked work" ]
9+ commit-message : { prefix: "chore", include: "scope" }
10+ allow :
11+ - dependency-name : " *"
12+ dependency-type : " direct"
13+ ignore :
14+ - dependency-name : " *"
15+ update-types : [ "version-update:semver-major" ]
16+ groups :
17+ GraphQL :
18+ patterns :
19+ - " HotChocolate.*"
20+ DataAccess :
21+ patterns :
22+ - " Microsoft.EntityFrameworkCore.*"
Original file line number Diff line number Diff line change 1+ <Project >
2+ <PropertyGroup >
3+ <ManagePackageVersionsCentrally >true</ManagePackageVersionsCentrally >
4+ <CentralPackageTransitivePinningEnabled >true</CentralPackageTransitivePinningEnabled >
5+ <CentralPackageVersionOverrideEnabled >false</CentralPackageVersionOverrideEnabled >
6+ </PropertyGroup >
7+ <PropertyGroup >
8+ <EFCoreVersion >9.0.0</EFCoreVersion >
9+ <HotChocolateVersion >15.1.8</HotChocolateVersion >
10+ </PropertyGroup >
11+ <ItemGroup >
12+ <PackageVersion Include =" Microsoft.EntityFrameworkCore.Sqlite" Version =" $(EFCoreVersion)" />
13+ <PackageVersion Include =" Microsoft.EntityFrameworkCore.Tools" Version =" $(EFCoreVersion)" />
14+ <PackageVersion Include =" HotChocolate.AspNetCore" Version =" $(HotChocolateVersion)" />
15+ <PackageVersion Include =" HotChocolate.AspNetCore.Authorization" Version =" $(HotChocolateVersion)" />
16+ <PackageVersion Include =" HotChocolate.AspNetCore.CommandLine" Version =" $(HotChocolateVersion)" />
17+ <PackageVersion Include =" HotChocolate.Data.EntityFramework" Version =" $(HotChocolateVersion)" />
18+ <PackageVersion Include =" HotChocolate.Diagnostics" Version =" $(HotChocolateVersion)" />
19+ <PackageVersion Include =" HotChocolate.Execution" Version =" $(HotChocolateVersion)" />
20+ <PackageVersion Include =" HotChocolate.Fusion" Version =" $(HotChocolateVersion)" />
21+ <PackageVersion Include =" HotChocolate.Subscriptions.Redis" Version =" $(HotChocolateVersion)" />
22+ <PackageVersion Include =" HotChocolate.Transport.Http" Version =" $(HotChocolateVersion)" />
23+ <PackageVersion Include =" HotChocolate.Types.Analyzers" Version =" $(HotChocolateVersion)" />
24+ <PackageVersion Include =" HotChocolate.Types.NodaTime" Version =" $(HotChocolateVersion)" />
25+ <PackageVersion Include =" HotChocolate.Types.OffsetPagination" Version =" $(HotChocolateVersion)" />
26+ </ItemGroup >
27+ </Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net7 .0</TargetFramework >
4+ <TargetFramework >net9 .0</TargetFramework >
55 <Nullable >enable</Nullable >
66 <ImplicitUsings >enable</ImplicitUsings >
77 </PropertyGroup >
88
99 <ItemGroup >
10- <PackageReference Include =" HotChocolate.AspNetCore" Version = " 13.3.0 " />
11- <PackageReference Include =" HotChocolate.AspNetCore.CommandLine" Version = " 13.3.0 " />
12- <PackageReference Include =" HotChocolate.Fusion" Version = " 13.3.0 " />
13- <PackageReference Include =" HotChocolate.Types.Analyzers" Version = " 13.3.0 " >
10+ <PackageReference Include =" HotChocolate.AspNetCore" />
11+ <PackageReference Include =" HotChocolate.AspNetCore.CommandLine" />
12+ <PackageReference Include =" HotChocolate.Fusion" />
13+ <PackageReference Include =" HotChocolate.Types.Analyzers" >
1414 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
1515 <PrivateAssets >all</PrivateAssets >
1616 </PackageReference >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net7 .0</TargetFramework >
4+ <TargetFramework >net9 .0</TargetFramework >
55 <Nullable >enable</Nullable >
66 <ImplicitUsings >enable</ImplicitUsings >
77 <LangVersion >preview</LangVersion >
1616 </ItemGroup >
1717
1818 <ItemGroup >
19- <PackageReference Include =" HotChocolate.AspNetCore" Version = " 13.3.0 " />
20- <PackageReference Include =" HotChocolate.AspNetCore.CommandLine" Version = " 13.3.0 " />
21- <PackageReference Include =" HotChocolate.Data.EntityFramework" Version = " 13.3.0 " />
22- <PackageReference Include =" HotChocolate.Types.Analyzers" Version = " 13.3.0 " >
19+ <PackageReference Include =" HotChocolate.AspNetCore" />
20+ <PackageReference Include =" HotChocolate.AspNetCore.CommandLine" />
21+ <PackageReference Include =" HotChocolate.Data.EntityFramework" />
22+ <PackageReference Include =" HotChocolate.Types.Analyzers" >
2323 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2424 <PrivateAssets >all</PrivateAssets >
2525 </PackageReference >
2626
27- <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version = " 7.0.0 " />
28- <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version = " 7.0.0 " >
27+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" />
28+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" >
2929 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
3030 <PrivateAssets >all</PrivateAssets >
3131 </PackageReference >
Original file line number Diff line number Diff line change 55
66builder . Services
77 . AddGraphQLServer ( )
8- . AddAuthorTypes ( )
9- . RegisterService < AuthorContext > ( ) ;
8+ . AddAuthorTypes ( ) ;
109
1110var app = builder . Build ( ) ;
1211
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public static class Query
1313 int [ ] ids ,
1414 IAuthorsByIdDataLoader userById ,
1515 CancellationToken cancellationToken )
16- => await userById . LoadAsync ( ids , cancellationToken ) ;
16+ => ( await userById . LoadAsync ( ids , cancellationToken ) ) . Select ( x => x ! ) . ToList ( ) ;
1717
1818 public static IQueryable < Author > GetAuthors ( AuthorContext context )
1919 => context . Authors . OrderBy ( t => t . Name ) ;
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net7 .0</TargetFramework >
4+ <TargetFramework >net9 .0</TargetFramework >
55 <Nullable >enable</Nullable >
66 <ImplicitUsings >enable</ImplicitUsings >
77 <LangVersion >preview</LangVersion >
1616 </ItemGroup >
1717
1818 <ItemGroup >
19- <PackageReference Include =" HotChocolate.AspNetCore" Version = " 13.3.0 " />
20- <PackageReference Include =" HotChocolate.AspNetCore.CommandLine" Version = " 13.3.0 " />
21- <PackageReference Include =" HotChocolate.Data.EntityFramework" Version = " 13.3.0 " />
22- <PackageReference Include =" HotChocolate.Types.Analyzers" Version = " 13.3.0 " >
19+ <PackageReference Include =" HotChocolate.AspNetCore" />
20+ <PackageReference Include =" HotChocolate.AspNetCore.CommandLine" />
21+ <PackageReference Include =" HotChocolate.Data.EntityFramework" />
22+ <PackageReference Include =" HotChocolate.Types.Analyzers" >
2323 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
2424 <PrivateAssets >all</PrivateAssets >
2525 </PackageReference >
2626
27- <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" Version = " 7.0.0 " />
28- <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version = " 7.0.0 " >
27+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Sqlite" />
28+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" >
2929 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
3030 <PrivateAssets >all</PrivateAssets >
3131 </PackageReference >
Original file line number Diff line number Diff line change 44
55builder . Services
66 . AddGraphQLServer ( )
7- . AddTypes ( )
8- . RegisterService < BookContext > ( ) ;
9-
7+ . AddTypes ( ) ;
108var app = builder . Build ( ) ;
119
1210app . UseWebSockets ( ) ;
Original file line number Diff line number Diff line change @@ -12,5 +12,5 @@ public static async Task<IEnumerable<Book>> GetBooksAsync(
1212 [ Parent ] Author author ,
1313 IBooksByAuthorIdDataLoader loader ,
1414 CancellationToken cancellationToken )
15- => await loader . LoadAsync ( author . Id , cancellationToken ) ;
15+ => await loader . LoadAsync ( author . Id , cancellationToken ) ?? [ ] ;
1616}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ public static class Query
88 IBookByIdDataLoader loader ,
99 CancellationToken cancellationToken )
1010 => await loader . LoadAsync ( id , cancellationToken ) ;
11-
12- public static async Task < IReadOnlyList < Book > ? > GetBooksById (
11+
12+ public static async Task < IReadOnlyList < Book > > GetBooksById (
1313 int [ ] ids ,
1414 IBookByIdDataLoader loader ,
1515 CancellationToken cancellationToken )
16- => await loader . LoadAsync ( ids , cancellationToken ) ;
16+ => ( await loader . LoadAsync ( ids , cancellationToken ) ) . Select ( x => x ! ) . ToList ( ) ;
1717
1818 public static IQueryable < Book > GetBooks ( BookContext context )
1919 => context . Books . OrderBy ( t => t . Id ) ;
@@ -22,7 +22,7 @@ public static async Task<IEnumerable<Book>> GetBooksByAuthorIdAsync(
2222 int authorId ,
2323 IBooksByAuthorIdDataLoader loader ,
2424 CancellationToken cancellationToken )
25- => await loader . LoadAsync ( authorId , cancellationToken ) ;
25+ => await loader . LoadAsync ( authorId , cancellationToken ) ?? [ ] ;
2626
2727 public static Author GetBookAuthor ( int authorId )
2828 => new Author { Id = authorId } ;
You can’t perform that action at this time.
0 commit comments