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/01/22 06:47:02 UTC
[jira] [Comment Edited] (S2GRAPH-172) Suggest to implement GraphQL
as standard web interface for S2Graph.
[ https://issues.apache.org/jira/browse/S2GRAPH-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16333925#comment-16333925 ]
Daewon Jeong edited comment on S2GRAPH-172 at 1/22/18 6:46 AM:
---------------------------------------------------------------
Finished preparing to support GraphQL in S2Graph.
The initial commit included
* Add S2Graph project
* S2GraphQL is based on Akka-http and [Sangria|https://github.com/sangria-graphql/] (GraphQL scala implementation).
As a plan to support GraphQL, I thought that I would support GraphQL in API of S2Graph Tutorial (readme.md)
A list of required APIs is shown below.
* mutation:
- createService
- createLabel
- insert (add edges)
* query
- getEdges
- getLabels
- getServices
If the above functions are supported in GraphQL, the following types of APIs will be available.
<code>
mutation {
createService (serviceName: "daewon", compressionAlgorithm: "gz") {
id
}
}
<code>
<code>
query {
CocoaFavorites (id: "Elmo") {
id
friends {
userName
post
{ userName }
}
}
}
<code>
When querying the above API, I will use the [GraphiQL|https://github.com/graphql/graphiql] client to get help with autocompletion and schema-based types.
I would like to divide the above tasks into several sub-tasks to divide the issue.
[https://github.com/daewon/incubator-s2graph/tree/S2GRAPH-172]
was (Author: daewon):
Finished preparing to support GraphQL in S2Graph.
The initial commit included
* Add S2Graph project
* S2GraphQL is based on Akka-http and [Sangria|https://github.com/sangria-graphql/] (GraphQL scala implementation).
As a plan to support GraphQL, I thought that I would support GraphQL in API of S2Graph Tutorial (readme.md)
A list of required APIs is shown below.
* mutation:
- createService
- createLabel
- insert (add edges)
* query
- getEdges
- getLabels
- getServices
If the above functions are supported in GraphQL, the following types of APIs will be available.
{code:javascript}
mutation {
createService (serviceName: "daewon", compressionAlgorithm: "gz") {
id
}
}
{code:javascript}
{code:javascript}
query {
CocoaFavorites (id: "Elmo") {
id
friends {
userName
post {
userName
}
}
}
}
{code:javascript}
When querying the above API, I will use the [GraphiQL|https://github.com/graphql/graphiql] client to get help with autocompletion and schema-based types.
I would like to divide the above tasks into several sub-tasks to divide the issue.
[https://github.com/daewon/incubator-s2graph/tree/S2GRAPH-172]
> Suggest to implement GraphQL as standard web interface for S2Graph.
> -------------------------------------------------------------------
>
> Key: S2GRAPH-172
> URL: https://issues.apache.org/jira/browse/S2GRAPH-172
> Project: S2Graph
> Issue Type: New Feature
> Reporter: Daewon Jeong
> Priority: Minor
> Labels: features
>
> GraphQL Support
> Suggest to implement GraphQL as standard web interface for S2Graph.
> S2Graph's query is implemented in its own way, it provides many features, but it is not easy to learn this query from the user.
> I would like to hear how you can provide the GraphQL function for convenient use of S2Graph.
> p.s: Graph QL has nothing to do with Graph DataBase, and Graph search is not the purpose of GraphQL.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)