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 <[email protected]>
Authored: Fri Mar 30 17:08:14 2018 +0900
Committer: daewon <[email protected]>
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")

Reply via email to