GSQL Insert INTO for edge with TO as multiple vertex types

251 Views Asked by At

How do you add a hint to your Tigergraph GSQL for insert edge query where the TO vertex are several different possible types each having UUID?

For example, when I tried INSERT INTO has_edge VALUES (child,parent), the error occurs because TO vertex options contains multiple vertex types: "hint must be provided for string type expression"

1

There are 1 best solutions below

0
On BEST ANSWER

Since the TO vertex has multiple possible types, you need to disambiguate it with a vertex hint like this:

INSERT INTO has_edge VALUES("1", "1" vertexHint)

where vertexHint is the name of the vertex that you want the edge to point to.