Tag: .net-7.0
-
How can I multiply a INumber with an int?
15 How should I implement the multiplication by int (z * 2) on the last line? public static TResult Test<TResult>() where TResult : INumber<TResult> { TResult x = TResult.AdditiveIdentity; TResult y = TResult.MultiplicativeIdentity; TResult z = x * y; TResult z2 = z * 2; // <— this gives the CS0019 error "The operator *…
-
Getting error – localhost is currently unable to handle this request. HTTP ERROR 502 – GraphQL run on Visual Studio 2022 – Hotchocolate
0 I am trying to execute a simple default Graphql app on Visual studio 2022 on .net 6 and 7. When the app is executed from visual studio I get the error "localhost is currently unable to handle this request. HTTP ERROR 502". I’m using HotChololate.aspnetcore (13.5.1) App URL "https://localhost:64264/graphql" Note: I have graphql app…
-
HotChocolate UseSorting doesn’t work on computed fields
0 I have an ItemType defined with some custom fields that are resolved with ResolveWith: public class ItemType : ObjectType<Item> { protected override void Configure(IObjectTypeDescriptor<FilterTreeItem> descriptor) { descriptor .Field(“fullName”) .Type<StringType>() .ResolveWith<Resolver>(r => r.GetFullName(default!)); // Other properties } private class Resolver { public async Task<string> GetFullName([Parent] Item? parent, CancellationToken cancellationToken = default) { return quot;{parent.FirstName} {parent.LastName}”;…