HTTP Query API Support - #1319
Conversation
The HTTP Query API will send `null` for notifications without a position. To make the experience the same between using bolt and HTTP, the driver drops `null` positions via HTTP to make them absent, just like they are via bolt.
| { | ||
| "testkit": { | ||
| "uri": "https://github.com/neo4j-drivers/testkit.git", | ||
| "ref": "6.x" |
There was a problem hiding this comment.
TODO: revert once TestKit PR has been merged:
| @dataclasses.dataclass(slots=True, frozen=True, kw_only=True) | ||
| class HTTPServerInfo: | ||
| neo4j_version: str | ||
| parsed_neo4j_version: tuple[int, int] | None = dataclasses.field( |
There was a problem hiding this comment.
i've got a half-memory of a call about parsing the server version and rejecting the older ones that send values as a flat list rather than a list of records, so users get a clear message instead of a parse error. parsed_neo4j_version is computed here but i couldn't find anything reading it, so i may have the wrong end of this.
a stub advertising 5.19.0 with the flat shape gives:
QueryApiHttpError: protocol error: expected list, got: 1
and that class's docstring points people at filing a driver bug. can't recall if I'm remembering this correctly, and whether it still needs changed?
There was a problem hiding this comment.
I remember we discussed something along those lines
- during refinement 2026-04-28 we decided to fail hard if the discovery endpoint does not exist or if the server version can't be parsed.
- However, I don't think we made a call on which server versions we wouldn't want to support/reject (only that we'd draw the line somewhere™ TBD).
- Neither do I remember that we made a decision on whether older servers should fail hard (i.e., driver perform the check you propose here) or fail soft (i.e., the moment they misbehave, anything may happen including protocol violation errors).
Can you find notes or similar to remind me if anything regarding 2. or 3. was decided?
StephenCathcart
left a comment
There was a problem hiding this comment.
Other than open questions looks good to me 👍
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Fix doc string copy pasta Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Signed-off-by: Rouven Bauer <rouven.bauer@neo4j.com>
Neo4j servers recently introduced a new HTTP API for querying the database (called Query API): https://neo4j.com/docs/query-api/current/
This PR add support for configuring the driver with a HTTP URL (e.g.
https://neo4j.example.com:7474/), which will make the driver run queries and transactions via the HTTP Query API instead of Bolt.Notes
Please note that:
urllib3for sync andaiohttpfor async) are required. Installpip install neo4j[http]instead ofpip install neo4j.basicneo4j.ResultSummary.server.protocol_info) might be missing or inaccurate.UnsupportedTypetype, andUUIDs cannot be exchanged with the DBMS.fetch_sizehas not effect, there is no backpressure mechanism.notifications_min_severity,notifications_disabled_categories,notifications_disabled_classifications) have no effect.Preview
This feature is in preview. This means that it does not follow semver. It might be changed (or in rare cases be removed) at any time without following the normal deprecation cycle.
Depends on:
Closes: DRIVERS-118