Closed aaawuanjun closed 4 days ago
To resolve the "Invalid vertex id" error when creating an edge with UUIDs as vertex IDs in HugeGraph, you need to ensure that the vertex IDs are correctly formatted and parsed. In HugeGraph, UUIDs should be prefixed with U"
to indicate that they are UUIDs.
Here's how you can modify your request to include the correct format for UUIDs:
{
"label": "pstudent",
"outV": "U\"3b567246-d408-461f-b481-a899d1477e0d\"",
"inV": "U\"a9a0e424-129b-487d-a089-6372673ebedc\"",
"outVLabel": "person",
"inVLabel": "student",
"properties": {
"date": "20171210",
"weight": 0.4
}
}
By ensuring that your vertex IDs are prefixed with U"
, the checkAndParseVertexId
method will correctly parse them as UUIDs. This should help you avoid the "Invalid vertex id" error.
To continue the conversation, mention @dosu.
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label
Problem Type (问题类型)
rest-api (结果不合预期)
Before submit
Environment (环境信息)
Your Question (问题描述)
when I use create edge rest api, vertices id use uuid.
create edge cause error: Invalid vertex id '3b567246-d408-461f-b481-a899d1477e0d'
Vertex/Edge example (问题点 / 边数据举例)