I am working on a project using GraphQL, HotChocolate, and the newly release Data API Builder (DAB).
I am using HotChocolate’s schema stitching in an attempt to use DAB within the remote schema function.
However, DAB’s schema definition built from my MSSQL database within Azure contains a Single which is giving me the error:
“1. Cannot Resolve type ‘Single’ (HotChocolate.Types)”
As the error suggests, and from my reading, HotChocolate.Types does not contain a definition for Single.
Here is part of my schema definition:
input DefaultValue {
Byte: Byte
Short: Short
Int: Int
Long: Long
String: String
Boolean: Boolean
Single: Single <---------
Float: Float
Decimal: Decimal
DateTime: DateTime
ByteArray: ByteArray
LocalTime: LocalTime
}
I have tried adding the C# Single type using the AddType service.
builder.Services
.AddGraphQLServer()
.AddType<Single>() //Adding single type here
.AddRemoteSchema("DABConnection");
I have also tried defining my own single type with derives from the float type but the same error persists.
ToBeBesideTheCSharp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.