Hotchocolate: Stitching of scalars with list values is not supported

Created on 8 Jan 2021  路  2Comments  路  Source: ChilliCream/hotchocolate

Describe the bug
When stitching a downstream service with spatial types to a gateway service, the coordinates property of a geometry cannot be queried.

To Reproduce
I created an example project here:
https://github.com/nevsnirG/SpatialTypeGateway

Run the downstream service first, and then the gateway. When you run the following query in the downstream service it works fine:

query {
  parcel {
    polygon {
      coordinates
    }
  }
}

However, when you run it in the gateway service you get the following output:

{
  "errors": [
    {
      "message": "The specified type is not a valid list type. (Parameter 'type')",
      "locations": [
        {
          "line": 4,
          "column": 7
        }
      ],
      "path": [
        "parcel",
        "polygon",
        "coordinates"
      ],
      "extensions": {
        "message": "The specified type is not a valid list type. (Parameter 'type')",
        "stackTrace": "   at HotChocolate.Types.TypeExtensions.ElementType(IType type)\r\n   at HotChocolate.Stitching.Delegation.DictionaryDeserializer.DeserializeEnumResult(IInputType inputType, Object value)\r\n   at HotChocolate.Stitching.Delegation.DictionaryDeserializer.DeserializeScalarResult(IInputType inputType, Object value)\r\n   at HotChocolate.Stitching.Delegation.DictionaryDeserializer.DeserializeResult(IType fieldType, Object obj)\r\n   at HotChocolate.Stitching.Delegation.DictionaryResultMiddleware.InvokeAsync(IMiddlewareContext context)\r\n   at HotChocolate.Resolvers.FieldClassMiddlewareFactory.<>c__DisplayClass5_0`1.<CreateDelegate>b__1(IMiddlewareContext context)\r\n   at HotChocolate.Execution.Processing.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken)\r\n   at HotChocolate.Execution.Processing.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken)"
      }
    }
  ],
  "data": {
    "parcel": {
      "polygon": {
        "coordinates": null
      }
    }
  }
}

Expected behavior
The same output as the downstream service is expected.

Desktop (please complete the following information):

  • OS: Windows 10 64-bit Enterprise
  • HC version: 11.0.7
bug 馃尪 hot chocolate

All 2 comments

This is a bug with the any type. we will look into it

should we update the title since it's not specific to spatial types?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergeyshaykhullin picture sergeyshaykhullin  路  3Comments

benmccallum picture benmccallum  路  3Comments

benmccallum picture benmccallum  路  5Comments

sgt picture sgt  路  4Comments

nigel-sampson picture nigel-sampson  路  5Comments