You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by da...@apache.org on 2018/03/30 08:39:13 UTC
[1/2] incubator-s2graph git commit: add indices resolver
Repository: incubator-s2graph
Updated Branches:
refs/heads/master 476bde319 -> 5b22148c6
add indices resolver
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/10aaf115
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/10aaf115
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/10aaf115
Branch: refs/heads/master
Commit: 10aaf11568249af4de7669dd75d86f570b8ef9a9
Parents: 476bde3
Author: daewon <da...@apache.org>
Authored: Fri Mar 30 17:08:14 2018 +0900
Committer: daewon <da...@apache.org>
Committed: Fri Mar 30 17:08:14 2018 +0900
----------------------------------------------------------------------
.../org/apache/s2graph/graphql/types/S2ManagementType.scala | 2 --
.../main/scala/org/apache/s2graph/graphql/types/S2Type.scala | 8 ++------
.../scala/org/apache/s2graph/graphql/types/package.scala | 2 +-
3 files changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/10aaf115/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2ManagementType.scala
----------------------------------------------------------------------
diff --git a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2ManagementType.scala b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2ManagementType.scala
index 7bb5d29..18df00b 100644
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2ManagementType.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2ManagementType.scala
@@ -38,8 +38,6 @@ object S2ManagementType {
import sangria.schema._
- case class PropWithColumn(name: String, Props: Vector[Prop])
-
case class MutationResponse[T](result: Try[T])
def makeMutationResponseType[T](name: String, desc: String, tpe: ObjectType[_, T]): ObjectType[Unit, MutationResponse[T]] = {
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/10aaf115/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2Type.scala
----------------------------------------------------------------------
diff --git a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2Type.scala b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2Type.scala
index 768f072..9ec1f9d 100644
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2Type.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/S2Type.scala
@@ -39,17 +39,13 @@ object S2Type {
from: Any,
to: Any,
direction: String,
- props: Map[String, Any]) {
- }
+ props: Map[String, Any])
// Management params
case class ServiceColumnParam(serviceName: String,
columnName: String,
props: Seq[Prop] = Nil)
-
- val DirArg = Argument("direction", OptionInputType(DirectionType), "desc here", defaultValue = "out")
-
def makeField[A](name: String, cType: String, tpe: ScalarType[A]): Field[GraphRepository, Any] =
Field(name,
OptionType(tpe),
@@ -221,7 +217,7 @@ object S2Type {
lazy val edgeTypeField: Field[GraphRepository, Any] = Field(
s"${label.label}",
ListType(EdgeType),
- arguments = DirArg :: Nil,
+ arguments = Argument("direction", OptionInputType(DirectionType), "desc here", defaultValue = "out") :: Nil,
description = Some("fetch edges"),
resolve = { c =>
val dir = c.argOpt("direction").getOrElse("out")
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/10aaf115/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
----------------------------------------------------------------------
diff --git a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
index a6077a8..754f377 100644
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
@@ -135,7 +135,7 @@ package object types {
ObjectTypeName("Label"),
ObjectTypeDescription("desc here"),
AddFields(
- Field("indexes", ListType(LabelIndexType), resolve = c => Nil),
+ Field("indices", ListType(LabelIndexType), resolve = c => c.value.indices),
Field("props", ListType(LabelMetaType), resolve = c => c.value.labelMetas)
),
RenameField("label", "name")
[2/2] incubator-s2graph git commit: [S2GRAPH-195]: could not create
indices using S2GraphQL
Posted by da...@apache.org.
[S2GRAPH-195]: could not create indices using S2GraphQL
JIRA:
[S2GRAPH-195] https://issues.apache.org/jira/browse/S2GRAPH-195
Pull Request:
Closes #149
Author
daewon <da...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/5b22148c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/5b22148c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/5b22148c
Branch: refs/heads/master
Commit: 5b22148c6d4039b9c7ba33bfde940aeae5822504
Parents: 10aaf11
Author: daewon <da...@apache.org>
Authored: Fri Mar 30 17:11:44 2018 +0900
Committer: daewon <da...@apache.org>
Committed: Fri Mar 30 17:11:44 2018 +0900
----------------------------------------------------------------------
CHANGES | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/5b22148c/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 07cd59a..cc5b308 100644
--- a/CHANGES
+++ b/CHANGES
@@ -50,6 +50,7 @@ Release Notes - S2Graph - Version 0.2.0
* [S2GRAPH-190] - Remove unnecessary TC JsonBenchmarkSpec
* [S2GRAPH-191] - Providing request / response logging to GraphQL server and removing println
* [S2GRAPH-192] - could not find service column when creating the label
+ * [S2GRAPH-195] - could not create indices using S2GraphQL
** Improvement
* [S2GRAPH-72] - Support Apache TinkerPop and Gremlin