Skip to content

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

Open

Description

Is there an existing issue for this?

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Area: DataIssue is related to filtering, sorting, pagination or projectionsArea: SpatialIssue is related to spatial types🌶️ hot chocolate🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions