Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update chillicream-gql to v14.0.0-tags-13-1-0-preview-5.1 #1838

Merged
merged 6 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"commands": ["docfx"]
},
"strawberryshake.tools": {
"version": "14.0.0-p.33",
"version": "14.0.0-tags-13-1-0-preview-5.1",
"commands": ["dotnet-graphql"]
},
"dotnet-outdated-tool": {
Expand Down
42 changes: 21 additions & 21 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@
<PackageVersion Include="Grpc.AspNetCore" Version="2.61.0" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="Hellang.Middleware.ProblemDetails" Version="6.5.1" />
<PackageVersion Include="HotChocolate" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Abstractions" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.AspNetCore" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Data" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Diagnostics" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Execution.Abstractions" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Data.AutoMapper" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Data.EntityFramework" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Data.Spatial" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Types.Analyzers" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Types.CursorPagination" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Types.OffsetPagination" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Types.NodaTime" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate.Types.Spatial" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake.Transport.Http" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake.Core" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake.Server" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake.Maui" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake.Blazor" Version="14.0.0-p.33" />
<PackageVersion Include="StrawberryShake.Razor" Version="14.0.0-p.33" />
<PackageVersion Include="HotChocolate" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Abstractions" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.AspNetCore" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Data" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Diagnostics" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Execution.Abstractions" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Data.AutoMapper" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Data.EntityFramework" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Data.Spatial" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Types.Analyzers" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Types.CursorPagination" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Types.OffsetPagination" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Types.NodaTime" Version="14.0.0-p.71" />
<PackageVersion Include="HotChocolate.Types.Spatial" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake.Transport.Http" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake.Core" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake.Server" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake.Maui" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake.Blazor" Version="14.0.0-p.71" />
<PackageVersion Include="StrawberryShake.Razor" Version="14.0.0-p.71" />
<PackageVersion Include="MediatR" Version="12.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
Expand Down
148 changes: 67 additions & 81 deletions sample/Sample.Graphql/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,91 +23,75 @@ public partial record EditLaunchRecordPatchRequest : IOptionalTracking<EditLaunc
}

[ExtendObjectType(OperationTypeNames.Mutation)]
public class RocketMutation
public partial class RocketMutation
{
[UseServiceScope]
public Task<CreateRocket.Response> CreateRocket(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<CreateRocket.Response> CreateRocket(
[Service]
IMediator mediator,
CreateRocket.Request request,
CancellationToken cancellationToken
)
{
return mediator.Send(request, cancellationToken);
}
);

[UseServiceScope]
public Task<RocketModel> EditRocket(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<RocketModel> EditRocket(
[Service]
IMediator mediator,
EditRocket.Request request,
CancellationToken cancellationToken
)
{
return mediator.Send(request, cancellationToken);
}
);

[UseServiceScope]
public Task<RocketModel> PatchRocket(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<RocketModel> PatchRocket(
[Service]
IMediator mediator,
EditRocketPatchRequest request,
CancellationToken cancellationToken
)
{
return mediator.Send(request.Create(), cancellationToken);
}
);

[UseServiceScope]
public Task<Unit> DeleteRocket(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<Unit> DeleteRocket(
[Service]
IMediator mediator,
DeleteRocket.Request request,
CancellationToken cancellationToken
)
{
return (Task<Unit>)mediator.Send(request, cancellationToken);
}
);
}

[ExtendObjectType(OperationTypeNames.Mutation)]
public class LaunchRecordMutation
public partial class LaunchRecordMutation
{
[UseServiceScope]
public Task<CreateLaunchRecord.Response> CreateLaunchRecord(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<CreateLaunchRecord.Response> CreateLaunchRecord(
[Service]
IMediator mediator,
CreateLaunchRecord.Request request,
CancellationToken cancellationToken
)
{
return mediator.Send(request, cancellationToken);
}
);

[UseServiceScope]
public Task<LaunchRecordModel> EditLaunchRecord(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<LaunchRecordModel> EditLaunchRecord(
[Service]
IMediator mediator,
EditLaunchRecord.Request request,
CancellationToken cancellationToken
)
{
return mediator.Send(request, cancellationToken);
}
);

[UseServiceScope]
public Task<LaunchRecordModel> PatchLaunchRecord(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<LaunchRecordModel> PatchLaunchRecord(
[Service]
IMediator mediator,
EditLaunchRecordPatchRequest request,
CancellationToken cancellationToken
)
{
return mediator.Send(request.Create(), cancellationToken);
}
);

[UseServiceScope]
public Task<Unit> DeleteLaunchRecord(
[Service] IMediator mediator,
[UseRequestScope]
public partial Task<Unit> DeleteLaunchRecord(
[Service]
IMediator mediator,
DeleteLaunchRecord.Request request,
CancellationToken cancellationToken
)
{
return (Task<Unit>)mediator.Send(request, cancellationToken);
}
);
}

[ExtendObjectType(OperationTypeNames.Query)]
Expand Down Expand Up @@ -183,7 +167,7 @@ public class QueryTests
{
public NodaTimeOutputs NodaTimeTest(NodaTimeInputs inputs)
{
return new NodaTimeOutputs
return new()
{
Instant = inputs.Instant,
LocalDate = inputs.LocalDate,
Expand All @@ -195,13 +179,13 @@ public NodaTimeOutputs NodaTimeTest(NodaTimeInputs inputs)
Duration = inputs.Duration,
ZonedDateTime = inputs.ZonedDateTime,
Offset = inputs.Offset,
IsoDayOfWeek = inputs.IsoDayOfWeek
IsoDayOfWeek = inputs.IsoDayOfWeek,
};
}

public GeometryOutputs GeometryTest(GeometryInputs inputs)
{
return new GeometryOutputs
return new()
{
Geometry = inputs.Geometry,
// TODO: Determine why these are not working
Expand Down Expand Up @@ -256,8 +240,9 @@ public class ReadyRocketType : ObjectType<ReadyRocket>
protected override void Configure(IObjectTypeDescriptor<ReadyRocket> descriptor)
{
// descriptor.Implements<InterfaceType<IReadyRocket>>();
descriptor.Field(z => z.LaunchRecords)
.Type<NonNullType<ListType<NonNullType<ObjectType<LaunchRecord>>>>>()
descriptor
.Field(z => z.LaunchRecords)
.Type<NonNullType<ListType<NonNullType<ObjectType<LaunchRecord>>>>>()
// .UseFiltering()
// .UseSorting()
;
Expand All @@ -270,40 +255,41 @@ public class LaunchRecordType : ObjectType<LaunchRecord>
protected override void Configure(IObjectTypeDescriptor<LaunchRecord> descriptor)
{
// descriptor.Implements<InterfaceType<ILaunchRecord>>();
descriptor.Field(z => z.Rocket)
.Type<NonNullType<ObjectType<ReadyRocket>>>();
descriptor
.Field(z => z.Rocket)
.Type<NonNullType<ObjectType<ReadyRocket>>>();
descriptor.Field(z => z.RocketId).Ignore();
// descriptor.Ignore(z => z.LaunchRecords);
}
}

public class StronglyTypedIdOperationFilterInputType
: FilterInputType
, IComparableOperationFilterInputType
, IComparableOperationFilterInputType
{
public StronglyTypedIdOperationFilterInputType()
{
}
public StronglyTypedIdOperationFilterInputType() { }

public StronglyTypedIdOperationFilterInputType(Action<IFilterInputTypeDescriptor> configure)
: base(configure)
{
}
: base(configure) { }

protected override void Configure(IFilterInputTypeDescriptor descriptor)
{
descriptor.Operation(DefaultFilterOperations.Equals)
.Type<UuidType>();
descriptor
.Operation(DefaultFilterOperations.Equals)
.Type<UuidType>();

descriptor.Operation(DefaultFilterOperations.NotEquals)
.Type<UuidType>();
descriptor
.Operation(DefaultFilterOperations.NotEquals)
.Type<UuidType>();

descriptor.Operation(DefaultFilterOperations.In)
.Type<ListType<UuidType>>();
descriptor
.Operation(DefaultFilterOperations.In)
.Type<ListType<UuidType>>();

descriptor.Operation(DefaultFilterOperations.NotIn)
.Type<ListType<UuidType>>();
descriptor
.Operation(DefaultFilterOperations.NotIn)
.Type<ListType<UuidType>>();

descriptor.AllowAnd(false).AllowOr(false);
}
}
}
Loading
Loading