Closed marcoklein closed 2 years ago
Many thanks for raising this bug report @marcoklein. :bug: We will now attempt to reproduce the bug based on the steps you have provided.
Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:
If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket.
Thanks again! :pray:
Hi @marcoklein! Thanks for reaching out! Just to double-check, what were the GraphQL queries you used for the two different debug logs above?
Tip: You can enable debug logging for the GraphQL server itself rather than checking the driver or database logs, see here. This will print the incoming GraphQL query, the executed cypher including parameters, and the received records.
@marcoklein, paging again here to see if you can provide some GraphQL queries/mutations to trigger this behaviour - we can't reverse engineer the output Cypher.
Here you go.
@neo4j/graphql:graphql Incoming GraphQL:
Query:
{
sites(
options: {limit: 10}
where: {geo_point_LTE: {point: {latitude: 48.8791666666661, longitude: 2.3124}, distance: 1000.0}}
) {
id
point {
latitude
longitude
}
geo_point {
latitude
longitude
}
}
}
Variables:
{} +0ms
@neo4j/graphql:auth JWT not configured +0ms
@neo4j/graphql:execute About to execute Cypher:
Cypher:
MATCH (this:Site)
WHERE distance(this.geo_point, point($this_geo_point_LTE.point)) <= $this_geo_point_LTE.distance
RETURN this { .id, point: apoc.cypher.runFirstColumn('RETURN
CASE this.point IS NOT NULL
WHEN true THEN { point: this.point }
ELSE NULL
END AS result',{ this: this },false), geo_point: apoc.cypher.runFirstColumn('RETURN
CASE this.point IS NOT NULL
WHEN true THEN { point: this.point }
ELSE NULL
END AS result',{ this: this },false) } as this
LIMIT $this_limit
Params:
{
"this_geo_point_LTE": {
"point": {
"longitude": 2.3124,
"latitude": 48.8791666666661
},
"distance": 1000
},
"this_limit": {
"low": 10,
"high": 0
}
} +0ms
@neo4j/graphql:execute Execute successful, received 0 records +2s
@marcoklein thanks for providing the query!
I see that you are using the version 2.5.9
of the @neo4j/graphl
library. Do your circumstances/environment allow you to update to the latest version? With the latest version, 3.4.0
, this problem is resolved.
Closing this issue as resolved given that the issue cannot be reproduced in the latest version of the library. Thanks for the report!
Thank you. We will prioritize an upgrade then.
On Tue, Jun 28, 2022, 16:11 Darrell Warde @.***> wrote:
Closed #1537 https://github.com/neo4j/graphql/issues/1537 as completed.
— Reply to this email directly, view it on GitHub https://github.com/neo4j/graphql/issues/1537#event-6894431571, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSRL3POXZP5UTSZB7YVJWLVRMBX3ANCNFSM5YC3OLAQ . You are receiving this because you were mentioned.Message ID: @.***>
Describe the bug The
@alias
directive does not work with thePoint
type. The generated cypher still uses the "old" name instead of the aliased property.Type definitions
Foo
has a Neo4j property ofpoint
.To Reproduce Steps to reproduce the behavior:
See also Screenshots / Debug Logs below
Expected behavior Use alias in cypher query so it can run distance searches.
Screenshots
Debug Logs
With
alias
defined it creates the wrong point Cypher (e.g. pointing togeo_point
instead ofpoint
expected by alias (seeWHERE distance(this.geo_point...)
With
point
it works fine:System (please complete the following information):
Additional context