Details
-
Improvement
-
Status: To Do
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Add a meta field(source_id, target_id) to GraphQL Edge Query (label)
In Vertex Query(ServiceColumn) there is a fixed field called id.
However, there is only a ServiceColumn for the connected source/target in the Edge (label).
Therefore, in order to access the Source/Target ServiceColumn id of an Edge at the time of GraphQL query,
it is necessary to access in the same format as the corresponding ServiceColumn
This is logically very clear, but it is inconvenient in actual use.
For more convenient queries, add a meta field to the Edge such as _source, _target, and so on.
The `source_id` indicates the id value of the Source ServiceColumn.
The `target_id` indicates the id value of the Target ServiceColumn.
If the above applies, you can query all of them in the following two ways.
as is
{ s2graph { User(id: "daewon") { id Like(limit: 10) { Book { id } } } } }
to be
{ s2graph { User(id: "daewon") { id Like(limit: 10) { target_id } } } }