Skip to content

MongoDB geospatial data #3898

@bugproof

Description

@bugproof

MongoDB supports geospatial queries. Currently, HC crashes on schema creation when encountering property like public GeoJsonPoint<GeoJson2DGeographicCoordinates> Location { get; set; }

  1. The type of the member AsDecimal128 of the declaring type BsonValue is
    unknown
    (HotChocolate.Data.Filters.FilterInputType<MongoDB.Bson.BsonDocument>)
    at HotChocolate.Configuration.TypeInitializer.DiscoverTypes()
    at HotChocolate.Configuration.TypeInitializer.Initialize(Func1 schemaR esolver, IReadOnlySchemaOptions options) at HotChocolate.SchemaBuilder.Setup.InitializeTypes(SchemaBuilder build er, DescriptorContext context, IBindingLookup bindingLookup, IReadOnlyList1 typ
    es, LazySchema lazySchema)
    at HotChocolate.SchemaBuilder.Setup.Create(SchemaBuilder builder)
    at HotChocolate.SchemaBuilder.Create()
    at HotChocolate.SchemaBuilder.HotChocolate.ISchemaBuilder.Create()
    ...

So the only solution is DTO and it's not possible to use Relay when the type contains GeoJsonPoint<GeoJson2DGeographicCoordinates>

It would be cool if there was something like https://chillicream.com/docs/hotchocolate/integrations/spatial-data/ that supports mongodb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MongoDBIssue is related to the MongoDB integration⌛ staleNothing happened with this issue in quite a while🌶️ hot chocolate

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions