profile
viewpoint
Michael Staib michaelstaib ChilliCream Zurich http://www.chillicream.com Microsoft MVP | https://twitter.com/michael_staib

ChilliCream/hotchocolate 1298

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

michaelstaib/PublicSpeaking 9

Contains demos and slides to my public speaking engagements.

SwissLife-OSS/thor-generator 7

An Event Tracing for Windows (ETW) EventSource generator built on .Net Core 2.0

benmccallum/HotChocolateRepos 0

A place to reproduce issues and share them

michaelstaib/apollo-server 0

🌍 GraphQL server for Express, Connect, Hapi, Koa and more

michaelstaib/awesome-graphql 0

Awesome list of GraphQL & Relay

michaelstaib/dotnet 0

dotnet is the official home of .NET on GitHub. It's a starting point to find .NET OSS projects from Microsoft, including those that are part of the .NET Foundation.

push eventChilliCream/hotchocolate

Michael Staib

commit sha f9f1f7d10f76293d6243b2a52dc6bd7448f0e2be

Added more tests for type refs

view details

push time in 15 minutes

push eventChilliCream/hotchocolate

Michael Staib

commit sha aff48fec7b059a7a08114ecd5ca2bf77af5a6d3b

Added more type rewriter logic

view details

push time in an hour

push eventChilliCream/hotchocolate

Michael Staib

commit sha d952cdc615847947401d869b62b9ff330348830c

Added more tests

view details

push time in 13 hours

push eventChilliCream/hotchocolate-docs

Ben McCallum

commit sha f7dde0533ec17eb4cbf2674cf11e0f85cd9b58e5

Update security.md (#105)

view details

push time in 16 hours

push eventChilliCream/hotchocolate

Michael Staib

commit sha e7f859ca60efe0ad739acd12a540f280458972c3

Added more clrtype ref tests

view details

push time in 16 hours

push eventChilliCream/hotchocolate

Michael Staib

commit sha 56ff592d46212ec13098d9f06f5ef600bfd816b0

Added more tests

view details

push time in 20 hours

issue openedChilliCream/hotchocolate

Release 10.5

  • [ ] Update Change Log
  • [ ] Blog Post

created time in 2 days

issue closedChilliCream/hotchocolate

Issues with union types in subscriptions

Per https://hotchocolategraphql.slack.com/archives/CD9TNKT8T/p1584999380445000

Trying to use a union type in a subscription, but seeing some weird behaviour when I'm pushing some data to the topic through a mutation.

In BCP, I see nothing happening.

In playground, I see the following message being received: {id: "1", type: "complete"} , and the subscription is stopped.

image

IConversationChange.cs

    [UnionType(Name = "ConversationChange")]
    public interface IConversationChange
    {
    }

ConversationViewer.cs

    public class ConversationViewer : IConversationChange
    {
        public User User { get; set; }
        public DateTime LastSeenAt { get; set; }

        public ConversationViewer(User user)
        {
            User = user;
            LastSeenAt = DateTime.UtcNow;
        }
    } 

ConversationSubscriptions.cs

    [ExtendObjectType(Name = "Subscription")]
    public class ConversationSubscriptions
    {
        [SubscribeAndResolve]
        public async Task<IAsyncEnumerable<IConversationChange>> ConversationUpdatesAsync(
            int conversationId,
            [Service]ITopicEventReceiver eventReceiver,
            CancellationToken cancellationToken) {
            return await eventReceiver.SubscribeAsync<string, IConversationChange>(
                    $"conversation-changes_{conversationId}", cancellationToken)
                .ConfigureAwait(false);
        }
    }

ConversationMutations.cs

    public class ConversationMutations
    { 
        public async Task<ConversationViewPayload> ConversationViewAsync(
            ConversationViewInput input,
            [GlobalState]string currentUserToken,
            UserByTokenDataLoader userByTokenLoader,
            [Service]ITopicEventSender eventSender,
            CancellationToken cancellationToken)
        {
            var users = await userByTokenLoader.LoadAsync(cancellationToken, currentUserToken);

            if (!users?.Any() ?? true)
            {
                throw new Exception("User not found");
            }

            var msg = new ConversationViewer(users.First());

            await eventSender.SendAsync(
                $"conversation-changes_{input.ConversationId}", msg, cancellationToken);

            return new ConversationViewPayload();
        }
    }

Mutation:

mutation {
  conversationView(input: {conversationId: 1055}) { __typename }
}

Subscription:

subscription {
  conversationUpdates(conversationId:1055) {
        ...on ConversationViewer {
          lastSeenAt
          user { name }
        }
      }
}

closed time in 2 days

hognevevle

issue commentChilliCream/hotchocolate

Issues with union types in subscriptions

This one is fixed with 10.5.rc.0

hognevevle

comment created time in 2 days

created tagChilliCream/hotchocolate

tag10.5.0-rc.0

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

created time in 2 days

release ChilliCream/hotchocolate

10.5.0-rc.0

released time in 2 days

issue commentChilliCream/hotchocolate

[Question] descriptor.Field([fieldname]).ignore() is failing

can you retest this with the current 10.5 preview?

MartinScha

comment created time in 2 days

issue closedChilliCream/hotchocolate

Using Connection Types In An Interface Throws Error The name `IConnection` was already registered by another type.

Describe the bug Version 10.4.0

I have an interface that contains a graphql relay field.

using HotChocolate.Types;
using HotChocolate.Types.Relay;

    public class SubjectInterface : InterfaceType<ISubject>
    {
        protected override void Configure(IInterfaceTypeDescriptor<ISubject> descriptor)
        {
            descriptor.Name("SubjectInterface");
            // This introduces some conflict into the schema
            descriptor.Field("records").AddPagingArguments().Type<ConnectionType<SubjectItemInterface>>();

        }
    }

And then two objects that implement that interface in exactly the same way, This is currently a base case before I add more fields to the different implementations

public class SubjectType : ObjectType<Subject>
    {
        protected override void Configure(IObjectTypeDescriptor<Subject> descriptor)
        {
            descriptor.Field<SubjectResolver>(t => t.GetRecords(default, default));
        }
    }

And the resolver for the object:

public class SubjectResolver
    {
        [UsePaging]
        public async Task<IEnumerable<ISubjectItem>> GetRecords(
            [Service] ISubjectItemService subjectItemService,
            [Service] IResolverContext context)
        {
            return await subjectItemService.GetSubjectRecords(context.Parent<ISubject>());
        }
    }

The error this then throws is: HotChocolate.SchemaException: The nameISubjectItemConnectionwas already registered by another type. - Type: ISubjectItemConnection

I can also reproduce this if I have only one implementation of the ISubject interface.

As well as if I change the definiton of the records field to descriptor.Field("records").UsePaging<SubjectItemInterface>();

closed time in 2 days

dannyheardairelogic

issue commentChilliCream/hotchocolate

Using Connection Types In An Interface Throws Error The name `IConnection` was already registered by another type.

I have now looked at your project. Sorry for the long delay ... I always have a large backlog.

You have actually multiple issues here.

For instance you are using relay types and implementing the node interface which demands the id field to be of ID type but right after declaring it correctly you are overwriting it with UUID.

Regarding the paging attribute... since you declare a specific schema type in your interface you need to use that also in the attribute.

[UsePaging(SchemaType = typeof(SubjectItemInterface))]
        public IQueryable<ISubjectItem> GetItems(
            [Service] ISubjectItemService subjectItemService,
            [Service] IResolverContext context)
        {
            return subjectItemService.GetSubjectItems(context.Parent<ISubject>());
        }

While mixing and matching works, when starting with hot chocolate it is good to stick to one approach which will lead to a better understanding of it and to better code. When you have mastered it it can be quite useful to mix and match between code-first variants.

dannyheardairelogic

comment created time in 2 days

PR opened ChilliCream/hotchocolate

Type System Rewriters

This pr will allow to scope types and rewrite types in the type initializer based on these scopes.

Introduces:

  • Introduces Type Based Interceptors
  • Global Interceptors
  • Scopes on types and type references
  • Refined initialization pipeline
  • Refined type references
+584031 -58386

0 comment

2052 changed files

pr created time in 2 days

issue commentChilliCream/hotchocolate

Support for namespace per client in Client API

This is on our list internally but it is good to have your issue now. The CLI too actually already has this capability but we have to bring it into the project system.

keerthivasanm

comment created time in 2 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 3a8be9ab07d29b27337482e4fbe388962baecd9d

introduced From to descriptors

view details

Michael Staib

commit sha 1affa024267a0eec37becf206b1d0a716041cd8f

descriptor cleanup

view details

Michael Staib

commit sha b8bd62e53f10386db1c08cf906f2ba308e62c915

reworked clr type ref

view details

Michael Staib

commit sha c5344bc7f6cbf82948b175882f9bc4a0e19e7e80

Reworked type references

view details

push time in 2 days

issue commentChilliCream/hotchocolate

GraphQL multipart request specification

Not yet.

michaelstaib

comment created time in 2 days

issue closedChilliCream/hotchocolate

schema first from multiple files

I tried to split graqhql language code in multiple files like this:

a.graphql: type Query{ hello: String! }

b.graphql: type Query{ hi: String! }

and typed code like this in gateway, but i get an error
" HotChocolate.SchemaException:“The name Query was already registered by another type. - Type: Query":

services.AddGraphQL(sp => SchemaBuilder.New() .AddDocumentFromFile("a.graphql") .AddDocumentFromFile("b.graphql") .BindComplexType<Query>() .Create());

closed time in 2 days

zivfuture

issue commentChilliCream/hotchocolate

schema first from multiple files

Closing this issue since splitting types in sdl first is not supported in 10

zivfuture

comment created time in 2 days

issue commentChilliCream/hotchocolate

schema first from multiple files

Join our slack channel

zivfuture

comment created time in 2 days

issue commentChilliCream/hotchocolate

schema first from multiple files

We haven’t support for extend on sdl first yet. There is however a big update coming to sdl first. We will soon start discussing sdl first in v11

zivfuture

comment created time in 2 days

issue closedChilliCream/hotchocolate

Authorization not correctly working for stitched, local schemas

Describe the bug When using schema stitching, and adding built schemas (i.e. not over HTTP) to the schema stitching builder, the authorization middleware/directive that is registered with the sub-schemas is not applied correctly, and causes the AUTH_NOT_AUTHENTICATED error to be thrown in all cases (with auth, without auth, with correct role/policy, without correct role/policy).

To Reproduce Steps to reproduce the behavior:

  1. Build 2 distinct schemas similar to the following:
var schema1 = HotChocolate.SchemaBuilder.New()
    .AddDocumentFromString(schema1Content)
    .AddAuthorizeDirectiveType()
    .BindComplexType<GraphQL.Schema1.Query>(t => t.To("Query"))
    .BindComplexType<GraphQL.Schema1.Mutation>(t => t.To("Mutation"))
    .Create();
var schema2 = HotChocolate.SchemaBuilder.New()
    .AddDocumentFromString(schema2Content)
    .AddAuthorizeDirectiveType()
    .BindComplexType<GraphQL.Schema2.Query>(t => t.To("Query"))
    .BindComplexType<GraphQL.Schema2.Mutation>(t => t.To("Mutation"))
    .Create();
  1. Stitch the schemas together:
services.AddStitchedSchema(builder => builder
    .AddSchema("schema1", schema1)
    .AddSchema("schema2", schema2);
  1. Make sure you are using the authorize directive in one of the schemas, e.g.
type Profile {
  email: String!
  firstName: String!
  id: Int!
  lastName: String!
}
type Query {
  profile: Profile @authorize
}
  1. Make sure you are using services.AddAuthorization(...) and services.AddAuthentication(...) in Startup's ConfigureServices, and app.UseAuthentication(); in Configure (before the call to app.UseGraphQLHttpPost(...))

Expected behavior Authorization to be correctly applied.

Desktop (please complete the following information):

  • Framework: ASP.NET Core 2.2 (netcoreapp2.2)
  • HotChocolate Packages, all version 10.2.0: "HotChocolate" "HotChocolate.Stitching" "HotChocolate.AspNetCore" "HotChocolate.AspNetCore.Playground" "HotChocolate.AspNetCore.Authorization"

Additional context

  1. Changing services.AddStitchedSchema(...) line above to services.AddGraphQL(schema1) DOES apply the authorization flow as expected, it seems to be only when combined with stitching that this issue presents itself
  2. I've added a QueryRequestInterceptor and logged out the context.User which is correctly set from the asp.net authorization flow
  3. I've added middleware in AddSchemaConfiguration to explicitly set context.ContextData[nameof(ClaimsPrincipal)] which appears to be the field the directive middleware uses, but it still throws the same error.

I'm really liking HotChocolate so far, however I'm struggling to get this piece in particular working. I might be "using it wrong" so please feel free to correct me. I could create a repro of this in a small repo, please let me know if this isn't clear (or clearly the wrong approach) and i can do this. I've tried to find an existing issue around this and must say, your team has been great with getting back to everyone and supporting the community. This partly relates to tickets like #1231 . I also saw mentioned in #1228 that theres an "interceptor" i might need to have configured, but couldn't find further information on that.

closed time in 3 days

barticus

issue commentChilliCream/hotchocolate

Authorization not correctly working for stitched, local schemas

This is fixed in preview 9... lets close the issue :)

barticus

comment created time in 3 days

push eventChilliCream/hotchocolate-examples

Ben McCallum

commit sha c47c98a56ff1f0f85c06fdc71924b22dbb46052f

Don't serialize unless needed (#23)

view details

push time in 3 days

create barnchChilliCream/hotchocolate

branch : mst/stitching

created branch time in 3 days

issue commentAPIs-guru/graphql-over-http

Find the best time for the GraphQL over HTTP working group

Will do tonight, thanks for the ping 😅

sjparsons

comment created time in 3 days

issue closedChilliCream/hotchocolate

Deprecations not appearing in stitched schema

Describe the bug Deprecation not coming through in schema.

To Reproduce Stitched schema with downstream schema using .Deprecate("...") on a field

Expected behavior Field to be deprecated when stitched with msg given.

Desktop (please complete the following information):

  • Linux container, netcore3.1, HC 10.5.0-preview.3 or preview.6

closed time in 4 days

benmccallum

issue commentChilliCream/hotchocolate

Deprecations not appearing in stitched schema

This one is now fixed with: https://github.com/ChilliCream/hotchocolate/releases/tag/10.5.0-preview.10

benmccallum

comment created time in 4 days

created tagChilliCream/hotchocolate

tag10.5.0-preview.10

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

created time in 4 days

release ChilliCream/hotchocolate

10.5.0-preview.10

released time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha d039a08ab0cb2513210d8e72e87ba3f08084336b

Fixed type in deprecation field

view details

Michael Staib

commit sha 101e0cd0c092b7690e9574236cef6771fd755bb0

Fixed tests

view details

push time in 4 days

pull request commentChilliCream/hotchocolate-docs

Update apollo-tracing.md

thanks for your contribution!

vbornand

comment created time in 4 days

pull request commentChilliCream/hotchocolate-docs

Return a list of Person instead of a single Person

thanks for your contribution!

iwatakeshi

comment created time in 4 days

pull request commentChilliCream/hotchocolate-docs

docs: Show's an example on the order_by argument

thanks for your contribution!

maraisr

comment created time in 4 days

push eventChilliCream/hotchocolate-docs

Marais Rossouw

commit sha 4e6173c1d6ca0899a37252f4cd945a333ee3ec8b

docs: Show's an example on the order_by argument (#102)

view details

push time in 4 days

PR merged ChilliCream/hotchocolate-docs

docs: Show's an example on the order_by argument

This PR aims to show an example of how sorting works.

The only thing I was unable to replicate—was the ability to sort by multiple fields. Is this something that is supported?


Please do assume I know nothing about c#, I simply cloned https://github.com/ChilliCream/hotchocolate and ran the AspNetCore.StarWars example. But feel this example is at least accurate of the back off the docs.

+28 -0

0 comment

1 changed file

maraisr

pr closed time in 4 days

push eventChilliCream/hotchocolate-docs

Takeshi

commit sha 4ab4693caec13cfe261c04e89bf65878824d390f

Return a list of Person instead of a single Person (#103) * Return a list of Person instead or Person Hi. Please correct me if I'm mistaken, but I believe one should return a `List<Person>` instead of `Person` in the resolver since I assume that `GetFriends()` returns a list. Thank you. * Update schema-object-type.md Use `IEnumerable`

view details

push time in 4 days

PR merged ChilliCream/hotchocolate-docs

Return a list of Person instead of a single Person

Hi,

Please correct me if I'm mistaken, but I believe one should return a List<Person> instead of Person in the resolver since I assume that GetFriends() returns a list.

Thank you.

+4 -4

1 comment

1 changed file

iwatakeshi

pr closed time in 4 days

push eventChilliCream/hotchocolate-docs

vbornand

commit sha a17ea571cb5900854cb3fdac9bfde1e0e5d8af4c

Update apollo-tracing.md (#104) Fix syntax error in sample code. Fix 404 link

view details

push time in 4 days

PR merged ChilliCream/hotchocolate-docs

Update apollo-tracing.md

Fix syntax error in sample code. Fix dead link

+3 -3

0 comment

1 changed file

vbornand

pr closed time in 4 days

issue commentChilliCream/hotchocolate

Using UseSelection with subscription

can we close this issue?

MysticFragilist

comment created time in 4 days

pull request commentChilliCream/hotchocolate

2094 Offset (skip-take) Paging. Out of the box support

@ademchenko, we think that this paging will be moved into a separate project, not into the type core. In general offset, paging is something we want to do but we are at the moment busy getting the new execution engine and data abstractions together. Only after this, we will have a look at your pr.

So this, for now, has to wait for a little. we will I think come back to this in two or three weeks.

Sorry for the wait but these two changes are massive and really demand all our attention.

ademchenko

comment created time in 4 days

delete branch ChilliCream/hotchocolate

delete branch : mst/filters

delete time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 84995baab2057fe9c9e03d950aaa702efc0eaba7

Copied version 10 filters to version 11 (#2097)

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 63dd0b0c6a91f9b6f2fab07fc862ce1f69243d36

Removed filters and fixed more tests

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 1ed34c9d991eafb7d49680c9916841df05d54247

Fixed more tests

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 7d4d6774e592b0c0ca472163d1837927255322e3

fixed more tests

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 1fed4deb2768532fb9965aba00e9dd90bbc1a110

Reintegrated more tests

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 0917deeeb5219f636243ebe75cdb9e6bee8a2428

Integrated more tests

view details

push time in 4 days

MemberEvent

push eventChilliCream/hotchocolate

Michael Staib

commit sha 73a5eda24836a0954746bbdca82c3fa0ce8ebb7f

Added more tests

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 28a64d9121cb2fba6a6ee0911eb12cdfa6edb194

Added some tests

view details

push time in 4 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 9dfd425e49cc206077bdc8f81fb055836db818bb

Migrated mongo tests and fixed issues with the type discovery

view details

Michael Staib

commit sha d23644f413290a7a478f090d290dbf4781c5c896

Added type interceptors

view details

push time in 4 days

issue commentChilliCream/hotchocolate

Type Descriptor Context

https://github.com/ChilliCream/hotchocolate-examples/tree/master/workshop/src/Server/PureCodeFirst

codecantrell

comment created time in 4 days

issue commentChilliCream/hotchocolate

Type Descriptor Context

You even could just leave the types away and just add the .net types.

codecantrell

comment created time in 4 days

issue commentChilliCream/hotchocolate

Type Descriptor Context

I think you just need to add the types and we will do that automatically for you. Basically, by default, we can infer those type structures.

codecantrell

comment created time in 4 days

issue commentChilliCream/hotchocolate

Using UseSelection with subscription

The thing here is that UseSelection works on IQueryable not just on anything. So, if the subscription message, for instance, would be an Id and you would then use the DBContext in your case to fetch data with that id it would work.

MysticFragilist

comment created time in 4 days

issue closedChilliCream/hotchocolate

Exposing query params in IResolverContext

Problem: When one wishes access of query params inside a Resolver, it is not really comfortable to get the params from IResolverContext

Solution: IResolverContext has a method like "T GetQueryParam<T>(string name)" The method has some special treatments for enums.

As I needed this method in our project I have already coded the solution and I integrated the code already in hotchocolate. If you are interested, we can push my branch.

closed time in 5 days

raorob

issue commentChilliCream/hotchocolate

Rust relay-compiler new persisted query support

@artola fyi

maraisr

comment created time in 5 days

issue commentChilliCream/hotchocolate

Type Descriptor Context

Also there is a way to control field inference. Basically this is done through the type inspector. Can you maybe describe more what your aim is, it might be that it is simpler than what you are trying.

codecantrell

comment created time in 5 days

issue commentChilliCream/hotchocolate

Type Descriptor Context

What do you mean by parent. The types have no parent. This is not a resolver. The type system initialization works completely different.

codecantrell

comment created time in 5 days

issue commentChilliCream/hotchocolate

Exposing query params in IResolverContext

Then we don’t you use context.Argument<T>(name)?

raorob

comment created time in 5 days

issue commentChilliCream/hotchocolate

Exposing query params in IResolverContext

Hi @raorob,

what do you mean with query param exactly?

Http Query Parameters?

raorob

comment created time in 6 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 20492261581b62b0e71253e6eace2734d95821c3

The schema name can now be consistently accessed throught middleware

view details

push time in 6 days

issue commentSwissLife-OSS/snapshooter

Iterative test case with multiple Snapshot.Match fails in 0.5.4 but worked in 0.5.2

Hi,

I have introduced this little bug with a feature that I have added to support some cases with test helpers.

We will introduce a new test context and with that fix this issue.

Thanks for reporting this.

moredatapls

comment created time in 6 days

issue commentChilliCream/hotchocolate

F# discriminated union support

Can you elaborate on your request?

aammfe

comment created time in 6 days

issue commentChilliCream/hotchocolate

Possible bug filtering nested entities

I think I can even reproduce this with our blog example @PascalSenn.

arminneman

comment created time in 6 days

issue commentChilliCream/hotchocolate

Proposal for dynamic query cache control

@tomphilbin shall we discuss the on the next working group meeting? I am keen to move forward on this but want to discuss the how a bit.

tomphilbin

comment created time in 6 days

issue closedChilliCream/hotchocolate

Need away to set value of request.credentials for GraphQL Playground

I am using Playground with graph queries that are required to be authorized. In my project, I have Cookie-based authentication. What I found is Playground doesn't work well with such a scenario. During debugging I found it is not sending any cookies to the server with require. From what I see possible reason is a default setting request.credentials in set to "omit". We need to have a way to set it to "same-origin" or "include"

closed time in 7 days

AgrawalAshishS

issue commentChilliCream/hotchocolate

Need away to set value of request.credentials for GraphQL Playground

You can always just use the npm package of playground and then integrate it yourself. With that, you are more flexible.

AgrawalAshishS

comment created time in 7 days

pull request commentChilliCream/hotchocolate

Changes to make Decimal serialization more deterministic with decimal places

@barticus not sure about this. What is the benefit of having zeros at the end?

barticus

comment created time in 7 days

created tagChilliCream/hotchocolate

tag10.5.0-preview.9

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

created time in 7 days

release ChilliCream/hotchocolate

10.5.0-preview.9

released time in 7 days

delete tag ChilliCream/hotchocolate

delete tag : 10.5.0-preview.9

delete time in 7 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 1f7486c5db528d6a80ca262a8a0d581b8dae7be4

Fixed multi delegation

view details

push time in 7 days

created tagChilliCream/hotchocolate

tag10.5.0-preview.9

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

created time in 7 days

release ChilliCream/hotchocolate

10.5.0-preview.9

released time in 7 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha 96cddb4dc506f85def2fee54b54a3d079f11d9dd

Added support for local schema authentication and multi delegation

view details

push time in 7 days

created tagChilliCream/hotchocolate

tag10.5.0-preview.8

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

created time in 7 days

release ChilliCream/hotchocolate

10.5.0-preview.8

released time in 7 days

delete tag ChilliCream/hotchocolate

delete tag : 10.5.0-preview.8

delete time in 7 days

push eventChilliCream/hotchocolate

barticus

commit sha 34c61a7bd41809c898375c3bb305a49b34c9de91

Changes the serialization formatter for decimals (#1940) Co-authored-by: Michael Staib <michael@chillicream.com>

view details

push time in 7 days

PR merged ChilliCream/hotchocolate

Changes to make Decimal serialization more deterministic with decimal places :beetle: bug 🌶 hot chocolate

Summary of the changes (Less than 80 chars)

  • Change DecimalType serialization to use the "F" specifier rather than "E" which lost precision of decimal places once number had more than 6 significant digits
  • Also added an optional override for the decimal type to allow specifying of the number of decimal digits

Addresses #1929

+165 -20

14 comments

12 changed files

barticus

pr closed time in 7 days

issue closedChilliCream/hotchocolate

DecimalType loss of precision

Describe the bug Decimal scalar values lose precision due to them being serialized into scientific format from the request in 10.4.3

To Reproduce Steps to reproduce the behavior:

  1. Have an input field with a Decimal type in your schema
  2. Make a request with a (not too large) number with a decimal place, e.g. 200000.99
  3. The value resolved will be rounded up, e.g. 200001.00

Expected behavior The full value is passed through

Additional context I've fixed this locally by changing the "SerializeDecimal" method in the DecimalType class to:

private static string SerializeDecimal(decimal value) =>
            value.ToString("G", CultureInfo.InvariantCulture);

Similar to https://github.com/ChilliCream/hotchocolate/issues/1846

closed time in 7 days

barticus

issue commentChilliCream/hotchocolate

DecimalType loss of precision

We decided for G in the end and this fix is now going into version 10.5.0-preview.8

barticus

comment created time in 7 days

push eventbarticus/hotchocolate

Michael Staib

commit sha 107d5e0ed024c892cadfce5f1638c30a45a32695

fixed tests

view details

push time in 7 days

pull request commentChilliCream/hotchocolate

Changes to make Decimal serialization more deterministic with decimal places

@barticus G does not contain only two digits; it will contain all significant digits.

barticus

comment created time in 7 days

pull request commentChilliCream/hotchocolate

Changes to make Decimal serialization more deterministic with decimal places

@barticus I have removed NumberDecimalDigits since serialization/deserialization, in my opinion, should essentially lead to the same value. That was also my main hold up on this one. I will merge this one now and integrate it into preview-8. Sorry for the wait on this one but at the moment we are really focused on version 11 which really takes a lot of my attention right now. We try to get 10.5 out this week.

barticus

comment created time in 7 days

push eventbarticus/hotchocolate

Michael Staib

commit sha c75991180bbb3272b4517f90689b0c288ac0ba80

Fixed subscription compile issue that stems form merge issue

view details

push time in 7 days

push eventbarticus/hotchocolate

Michael Staib

commit sha 47e8ec704bdcd5f1378f4b84a688fcf6553f2857

Added same formatting to float

view details

push time in 7 days

push eventbarticus/hotchocolate

Michael Staib

commit sha 742291f86b5b1644d9701446077cbd93ae735521

Fixed tests that were broken due to an issue coming from the v10 master

view details

push time in 7 days

push eventbarticus/hotchocolate

Erwan JOLY

commit sha d262d2f5b075c5f8796c8127f43150ab2a7eb9aa

Fix stitching serialization invalid json #2024 #1972 on v10 (#2091)

view details

Michael Staib

commit sha 7dbeadcee1ec87a989396e540455d3a99e51826b

Fixed paging issues

view details

Michael Staib

commit sha ed85abcc4b0d3526edc9e2251e86e1f5f292d438

code cleanup

view details

Michael Staib

commit sha 1353a04d88c1b57af888c789d0d370b97c9a62e2

Merge branch 'version_10_0_0_master' of https://github.com/ChilliCream/hotchocolate into version_10_0_0_master

view details

Michael Staib

commit sha 27ef61a0598ac4e1f176d26429c6773baf94e214

expose character set in content type

view details

Michael Staib

commit sha 18876447f50aa01058085a5d0ae4cc49f2a26454

filters compile

view details

Michael Staib

commit sha 0fbf15ff4a0ee47a9fcc6b674d42a8bb729101c7

Merge branch 'version_10_0_0_master' into fix/1929-decimal-type-precision

view details

push time in 7 days

pull request commentChilliCream/hotchocolate

Changes to make Decimal serialization more deterministic with decimal places

@barticus we are at the moment focused on version 11, but we will merge this one probably this week. We will change it to G as discussed with you.

barticus

comment created time in 7 days

issue commentChilliCream/hotchocolate

Hot Chocolate docs and schema not loading

Do you have a schema exception when the schema is built on the first request?

gurdeepsira

comment created time in 7 days

push eventChilliCream/hotchocolate

Michael Staib

commit sha e9d88bac3ad8eea27027bb6e53a21b083044c2c8

added more test code

view details

Michael Staib

commit sha 5c3456955b142eac63e204a20727329093afb679

Fixed tests

view details

push time in 8 days

pull request commentChilliCream/hotchocolate

Changes to make Decimal serialization more deterministic with decimal places

But we will fix the issue

barticus

comment created time in 8 days

more