graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

[UseSorting] throws exception - SpatialData in Database but not in Schema

Open Christine-Schneidenwind opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Product

Hot Chocolate

Describe the bug

I want to enable [UseSorting] on my query. I use SpatialData (postgis extension) in my Entity Framework Database, but not a the schema

The following exception occurres when fetching the Schema:

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

  1. InputObject GeometryOverlaySortInput has no fields declared. (HotChocolate.Data.Sorting.SortInputType<NetTopologySuite.Geometries.GeometryOverlay>)

  2. InputObject CoordinateEqualityComparerSortInput has no fields declared. (HotChocolate.Data.Sorting.SortInputType<NetTopologySuite.Geometries.CoordinateEqualityComparer>)

    at HotChocolate.Configuration.TypeInitializer.EnsureNoErrors() at HotChocolate.Configuration.TypeInitializer.CompleteTypes() at HotChocolate.Configuration.TypeInitializer.Initialize() at HotChocolate.SchemaBuilder.Setup.InitializeTypes(SchemaBuilder builder, IDescriptorContext context, IReadOnlyList`1 types) at HotChocolate.SchemaBuilder.Setup.Create(SchemaBuilder builder, LazySchema lazySchema, IDescriptorContext context) at HotChocolate.SchemaBuilder.Create(IDescriptorContext context) at HotChocolate.SchemaBuilder.HotChocolate.ISchemaBuilder.Create(IDescriptorContext context) at HotChocolate.Execution.RequestExecutorResolver.CreateSchemaAsync(String schemaName, RequestExecutorSetup options, RequestExecutorOptions executorOptions, IServiceProvider serviceProvider, TypeModuleChangeMonitor typeModuleChangeMonitor, CancellationToken cancellationToken) at HotChocolate.Execution.RequestExecutorResolver.CreateSchemaServicesAsync(String schemaName, RequestExecutorSetup options, CancellationToken cancellationToken) at HotChocolate.Execution.RequestExecutorResolver.GetRequestExecutorNoLockAsync(String schemaName, CancellationToken cancellationToken) at HotChocolate.Execution.RequestExecutorResolver.GetRequestExecutorAsync(String schemaName, CancellationToken cancellationToken) at HotChocolate.AspNetCore.Warmup.ExecutorWarmupService.ExecuteAsync(CancellationToken stoppingToken))

Steps to reproduce

  1. I use spatial Data in my Entity Framework Database
 [Column(TypeName="geometry (point)")]
 public Point? MyPoint { get; set; }
  1. I ignore the spatial field in the schema:

descriptor.Ignore(t => t.MyPoint);

So I do not add the SpatialData to the GraphqlServer

.AddSpatialProjections()

because I have schema stitching in place and spatial data are not supported.

  1. I want to use [UseSorting] on my query

Relevant log output

No response

Additional Context?

No response

Version

13.0.5

Christine-Schneidenwind avatar May 09 '23 08:05 Christine-Schneidenwind

this might be related https://github.com/ChilliCream/graphql-platform/issues/4579

rsousacode avatar Jun 16 '24 18:06 rsousacode