Document HelixQL response structure and add JSON output examples#47
Document HelixQL response structure and add JSON output examples#47
Conversation
- Add "Response structure" section to output_values.mdx explaining single-element vs. array return shapes and element object shapes (node, edge, vector) including the id field - Add id field to all full-element JSON output examples in output_values.mdx - Add JSON output blocks to all CRUD page examples: addN.mdx, addE.mdx, addV.mdx, updating.mdx, deleting.mdx - Document edge return shape (id, from, to, plus properties) - Document vector return shape (id plus metadata properties) - Add note clarifying that projection omits id unless explicitly requested, while exclusion preserves id https://claude.ai/code/session_011iZUtHW8avKg7x4AbKNH8t
| ```json Output | ||
| { | ||
| "predefined_user": { | ||
| "id": "d3db344g-1de9-5gbf-9247-c51604803082", |
There was a problem hiding this comment.
the character 'g' in this ID value is not valid hexadecimal (valid: 0-9, a-f). Replace 'g' with a valid hex character like 'f'.
| "follows": { | ||
| "id": "a1b2c3d4-1de9-5gbf-9247-c51604803082", | ||
| "from": "c2ca233f-0cd8-4fae-8136-b40593792071", | ||
| "to": "d3db344g-0cd8-4fae-8136-b40593792071" |
There was a problem hiding this comment.
the character 'g' in the to field is not valid hexadecimal. Replace with a valid character (0-9, a-f).
| "friendship": { | ||
| "id": "b2c3d4e5-1de9-5gbf-9247-c51604803082", | ||
| "from": "c2ca233f-0cd8-4fae-8136-b40593792071", | ||
| "to": "d3db344g-0cd8-4fae-8136-b40593792071", |
There was a problem hiding this comment.
the character 'g' in the to field is not valid hexadecimal. Replace with a valid character (0-9, a-f).
| "follows": { | ||
| "id": "a1b2c3d4-1de9-5gbf-9247-c51604803082", | ||
| "from": "c2ca233f-0cd8-4fae-8136-b40593792071", | ||
| "to": "d3db344g-0cd8-4fae-8136-b40593792071" |
There was a problem hiding this comment.
the character 'g' in the to field is not valid hexadecimal. Replace with a valid character (0-9, a-f).
| ```json Output | ||
| { | ||
| "vector_node": { | ||
| "id": "a1b2c3d4-3fg1-7hij-1469-e73826025204", |
There was a problem hiding this comment.
characters 'g', 'h', 'i', 'j' in this ID are not valid hexadecimal (valid range: 0-9, a-f). Replace with valid hex characters.
| { "name": "Charlie", "age": 28, "email": "charlie@example.com" }, | ||
| { "id": "c2ca233f-0cd8-4fae-8136-b40593792071", "name": "Alice", "age": 25, "email": "alice@example.com" }, | ||
| { "id": "d3db344g-1de9-5gbf-9247-c51604803082", "name": "Bob", "age": 30, "email": "bob@example.com" }, | ||
| { "id": "e4ec455h-2ef0-6hcg-0358-d62715914193", "name": "Charlie", "age": 28, "email": "charlie@example.com" } |
There was a problem hiding this comment.
character 'g' in Bob's ID is not valid hexadecimal. Replace with a valid character (0-9, a-f).
| { "id": "c2ca233f-0cd8-4fae-8136-b40593792071", "name": "Alice", "age": 25, "email": "alice@example.com" }, | ||
| { "id": "d3db344g-1de9-5gbf-9247-c51604803082", "name": "Bob", "age": 30, "email": "bob@example.com" }, | ||
| { "id": "e4ec455h-2ef0-6hcg-0358-d62715914193", "name": "Charlie", "age": 28, "email": "charlie@example.com" } | ||
| ] |
There was a problem hiding this comment.
character 'h' in Charlie's ID is not valid hexadecimal. Replace with a valid character (0-9, a-f).
| "user": {"id": "c2ca233f-0cd8-4fae-8136-b40593792071", "name": "Alice", "age": 25, "email": "alice@example.com"}, | ||
| "posts": [ | ||
| {"id": "d3db344g-1de9-5gbf-9247-c51604803082", "title": "My First Post", "content": "This is my first blog post!"}, | ||
| ... |
There was a problem hiding this comment.
character 'g' in the post ID is not valid hexadecimal. Replace with a valid character (0-9, a-f).
| { "id": "d3db344g-1de9-5gbf-9247-c51604803082", "name": "Bob", "age": 30 }, | ||
| { "id": "e4ec455h-2ef0-6hcg-0358-d62715914193", "name": "Charlie", "age": 28 } |
There was a problem hiding this comment.
IDs contain 'g' and 'h' which are not valid hexadecimal characters. Replace with valid characters (0-9, a-f).
Summary
This PR enhances the HelixQL documentation by adding comprehensive information about response structures and including JSON output examples throughout the documentation. These changes help users understand the format and shape of data returned by HelixQL queries.
Key Changes
Added "Response structure" section to
output_values.mdxthat explains:idfield in responsesUpdated all query examples across multiple documentation files to include realistic JSON output examples:
output_values.mdx: Addedidfields to all response examples and updated existing outputsaddN.mdx: Added JSON output examples for node creation queriesaddE.mdx: Added JSON output examples for edge creation queries withid,from, andtofieldsaddV.mdx: Added JSON output examples for vector creation queriesupdating.mdx: Added JSON output example for update operationsdeleting.mdx: Added JSON output examples for delete operationsStandardized response format by including
idfields (UUID strings) in all example outputs, reflecting the actual behavior of HelixDBNotable Details
idvaluesfromandtofields referencing node IDscreated_atidis always included unless explicitly excluded via property projectionhttps://claude.ai/code/session_011iZUtHW8avKg7x4AbKNH8t
Greptile Overview
Greptile Summary
This PR significantly improves the HelixQL documentation by adding comprehensive JSON output examples and detailed response structure documentation. The additions help users understand the format and shape of data returned by HelixQL queries.
Key improvements:
output_values.mdxexplaining how JSON responses are structured with binding names as top-level keysaddN.mdx,addE.mdx,addV.mdx,updating.mdx,deleting.mdx)idfield in responsesIssues found:
Important Files Changed
idfields. Contains invalid UUID formats with non-hexadecimal characters (g, h, i, j).id,from, andtofields. Contains invalid UUID with 'g' character.idfields. Contains invalid UUID with 'g' character.idand metadata fields. Contains invalid UUIDs with non-hexadecimal characters (g, h, i, j).Last reviewed commit: 824c6f2