0

We have a gateway API with stitching on and the schema is pulled from a redis cache where underlying APIs push their schema to. When the APIs start, everything is fine - the underlying APIs push their schema to the cache and the gateway reads it. If I update one the schema of an API, say by adding a string field or an int to try out if it would refresh it I get this error when I try to refresh the schema on banana cake pop

"HotChocolate.SchemaException: For more details look at the `Errors` property.

1. Operation is not valid due to the current state of the object. (HotChocolate.Types.UuidType)

   at HotChocolate.Configuration.TypeInitializer.DiscoverTypes()
   at HotChocolate.Configuration.TypeInitializer.Initialize(Func`1 schemaResolver, IReadOnlySchemaOptions options)
   at HotChocolate.SchemaBuilder.Setup.InitializeTypes(SchemaBuilder builder, DescriptorContext context, IBindingLookup bindingLookup, IReadOnlyList`1 types, LazySchema lazySchema)
   at HotChocolate.SchemaBuilder.Setup.Create(SchemaBuilder builder)
   at HotChocolate.SchemaBuilder.Create()
   at HotChocolate.SchemaBuilder.HotChocolate.ISchemaBuilder.Create()
   at .... (cut for brevity)

After researching, we found that it happens when we add the instruction to format the output of the GUID by adding:

.AddType(new UuidType('D'))

To the setup of the Gateway API. If removed then everything appears to be fine. Any idea if that can be resolved ? Really would like to keep the output format of the Guid to the one with dashes. Thanks Vincent

vm2013
  • 304
  • 2
  • 14
  • you need to add this both on the gateway and the downstream service. BTW. we changed the default format for version 12 to include the dashes. – Michael Ingmar Staib Sep 15 '21 at 17:20
  • Thanks @MichaelIngmarStaib. I will try. I saw your announcements ref version 12. Will test it and come back to you. – vm2013 Sep 22 '21 at 11:04

0 Answers0