You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Daewon Jeong (JIRA)" <ji...@apache.org> on 2018/08/01 05:46:00 UTC
[jira] [Created] (S2GRAPH-234) Add a meta field(source_id,
target_id) to GraphQL Edge Query (label)
Daewon Jeong created S2GRAPH-234:
------------------------------------
Summary: Add a meta field(source_id, target_id) to GraphQL Edge Query (label)
Key: S2GRAPH-234
URL: https://issues.apache.org/jira/browse/S2GRAPH-234
Project: S2Graph
Issue Type: Improvement
Components: s2graphql
Reporter: Daewon Jeong
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 { id }
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
{noformat}
{
s2graph {
User(id: "daewon") {
id
Like(limit: 10) {
Book {
id
}
}
}
}
}
{noformat}
to be
{noformat}
{
s2graph {
User(id: "daewon") {
id
Like(limit: 10) {
target_id
}
}
}
}
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)