cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Subscription generation with Point spatial type

I am having a heck of a time using subscription plugins when my type has a Point field. This problem occurs when using either Neo4jGraphQLSubscriptionsSingleInstancePlugin or Neo4jGraphQLSubscriptionsAMQPPlugin when generating your scheme. Here is the specific error:
Error: TypeError[LocationSubscriptionWhere.point_IN]: Provided incorrect InputType: "[Point]"
at TypeMapper.convertInputTypeDefinition (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/TypeMapper.js:335:23)
at TypeMapper.convertInputFieldConfig (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/TypeMapper.js:387:36)
at InputTypeComposer.setField (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/InputTypeComposer.js:127:46)
at /Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/InputTypeComposer.js:133:18
at Array.forEach (<anonymous>)
at InputTypeComposer.addFields (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/InputTypeComposer.js:132:32)
at Function.createTemp (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/InputTypeComposer.js:97:21)
at Function.create (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/InputTypeComposer.js:59:26)
at SchemaComposer.createInputTC (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/graphql-compose/lib/SchemaComposer.js:305:54)
at generateSubscriptionWhereType (/Users/benjaminpurtzer/Documents/PetSocial/api/node_modules/@neo4j/graphql/dist/schema/subscriptions/generate-subscription-where-type.js:33:27)

 

and here is the piece of the schema that is causing problems. If I remove the point field, it works fine, but when I add in that point field, I am getting the above error.

type Location @auth(rules: [{ isAuthenticated: true }]) {
id: ID!
name: String!
name_lc: String!
description: String!
point: Point!
placeId: String
createdAt: DateTime!
}
 
 
I have looked into it, and it seems like for arrays of points, you are using the Point type rather than the PointInput type. 
 
Please let me know if I can help get this resolved, or maybe how to do a patch to fix this for my project.
 
Sincerely,
 
Benjamin Purtzer
0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online