Support for custom scalars
See original GitHub issueGraphQL.g.cs(6110, 36): [CS0246] The type or namespace name ‘ObjectId’ could not be found (are you missing a using directive or an assembly reference?)
in schema it looks like:
scalar ObjectId
Does it support custom scalars? I’ve generated client from schema that uses Mongo ObjectId, and got this error
Issue Analytics
- State:
- Created a year ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Custom scalars - Apollo GraphQL Docs
GraphQL includes the following scalar types by default: Int , Float , String , Boolean , and ID . You can also define...
Read more >Support for custom scalars · Issue #585 - GitHub
After speaking with @glasser, I noticed that we don't currently have great support for custom scalar types on Apollo Client.
Read more >Custom Scalars and Enums – GraphQL Tools
Custom Scalar Examples. Let's look at a couple of examples to demonstrate how a custom scalar type can be defined. Date as a...
Read more >Adding Custom Scalars - DGS Framework
It is easy to add a custom scalar type in the DGS framework: Create a class that implements the graphql.schema.Coercing interface and annotate...
Read more >Scalar types in AWS AppSync
AWS AppSync does not support custom scalars. This means that you cannot use AWS as a prefix for custom object types. The following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
At the moment, it will fail. It is not bootstrapped correctly in the library. It is possible to define it as a custom scalar, but it would be much better to handle it as a system type.
I already started working on it and noticed that HotChocolate and System.Text.Json serialize
System.TimeSpan
in different formats. So, I plan to add a more robust way to tinker with JSON serialization in the library.@ahanoff Checkout v2.1.0