ChilliCream / graphql-platform

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.
https://chillicream.com
MIT License
5.25k stars 744 forks source link

Ability to configure scalar serializers in code. #5127

Open EvilVir opened 2 years ago

EvilVir commented 2 years ago

Is your feature request related to a problem?

I'm using HotChocolate + Strawberry Shake combo to build ecosystem of microservices. On the server side I have own library, distributed by NuGets, that have plenty of extra scalar types. On the client side I wrote corresponding serializer to and from Runtime type, but to actually use them within autogenerated client I need to manually add them all to schema.extensions.graphql file and I need to do this for each and every client in each and every project.

The solution you'd like

IServiceCollection.AddSerializer<T>() method should be enough to register serializer, no graphql schema extensions should be needed.

-- OR --

There should be ability to define additional schema.global.extensions.graphql that would be used for each and every client in the project. That way I can provide that file from NuGet package as well.

Product

Strawberry Shake

michaelstaib commented 2 years ago

We will have a look at this.

EvilVir commented 2 years ago

Thanks! :)