bitflicker64 commented on code in PR #499:
URL: https://github.com/apache/hugegraph-doc/pull/499#discussion_r4113857476


##########
content/en/docs/language/cypher-compatibility.md:
##########
@@ -0,0 +1,82 @@
+---
+title: "Cypher Compatibility"
+linkTitle: "Cypher Compatibility"
+weight: 3
+---
+
+### Scope
+
+This page records the cases verified for the current Cypher development 
change. It does not claim full
+openCypher or Neo4j compatibility, or compatibility across every released 
HugeGraph version. The tested
+working tree is based on 
[`hugegraph/hugegraph@27a7c9b`](https://github.com/hugegraph/hugegraph/commit/27a7c9b42274d6d4f95eabed6d2051d393ae0eaf)
+and uses Java `17.0.20.1`, TinkerPop `3.8.1`, 
`org.opencypher.gremlin:translation:1.0.4`, and RocksDB.
+
+The endpoint is `/graphspaces/{graphspace}/graphs/{graph}/cypher`. General 
usage is covered in the
+[HugeGraph Cypher guide](/docs/language/hugegraph-cypher/).
+
+### Request forms and parameters
+
+| Request | Verified contract | Test method |
+|---|---|---|
+| `GET ?cypher=<URL-encoded statement>` | Existing query-string form | 
`testGet` |
+| `POST application/json` with raw Cypher text | Legacy raw-body form remains 
available | `testPost` |
+| `POST text/plain` with raw Cypher text | Plain-text form | 
`testPlainTextPost` |

Review Comment:
   Important: This table lists `POST text/plain` and `POST application/json` 
with a `{"cypher": ..., "parameters": ...}` object as verified request forms, 
and line 34 says a missing binding is an execution error. None of that is in 
any Apache HugeGraph release or in apache/hugegraph master. Evidence: on 
apache/hugegraph master (2f827d6e8) `CypherAPI.post` has 
`@Consumes(APPLICATION_JSON)` only and takes the whole body as the Cypher 
string, so a text/plain request gets 415 and a JSON object body is sent to the 
translator as Cypher text and fails. `CypherApiTest` on master has only 
`testGet`, `testPost`, `testCreate` and `testRelationQuery`; 
`testPlainTextPost` and `testParameters` exist only on the hugegraph/hugegraph 
fork (PR #238, open). The tested base 27a7c9b is not an ancestor of apache 
master and uses TinkerPop 3.8.1, while apache master and 1.7.0 use 3.5.1. The 
guide on this PR (hugegraph-cypher.md, Known limitations) says the opposite for 
released versions: a missing binding e
 valuates to null and the query returns no rows. A reader who follows this page 
against a released server gets errors, and the two pages disagree on the same 
`$param` case. The CN page repeats this at lines 23 to 35. Requested change: 
mark the request-forms table, the JSON example and the binding rules (EN and 
CN) as unreleased behaviour from hugegraph/hugegraph PR #238, state that 
released servers accept only GET `?cypher=` and raw-text `POST 
application/json`, and say which HugeGraph version the verified results apply 
to. Alternatively hold this page until the server change is merged into 
apache/hugegraph.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to