update typeName
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/823a8842 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/823a8842 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/823a8842 Branch: refs/heads/master Commit: 823a88421fc89194deacf6a70870a20a34398d2f Parents: 1c60e25 Author: daewon <[email protected]> Authored: Mon Mar 26 15:35:53 2018 +0900 Committer: daewon <[email protected]> Committed: Mon Mar 26 15:35:53 2018 +0900 ---------------------------------------------------------------------- s2graphql/src/main/resources/application.conf | 7 +++---- .../org/apache/s2graph/graphql/types/S2Type.scala | 4 ++-- s2graphql/src/test/resources/application.conf | 7 +++---- .../scala/org/apache/s2graph/graphql/SchemaTest.scala | 14 ++++++-------- 4 files changed, 14 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/823a8842/s2graphql/src/main/resources/application.conf ---------------------------------------------------------------------- diff --git a/s2graphql/src/main/resources/application.conf b/s2graphql/src/main/resources/application.conf index 1844bcc..aac21d1 100644 --- a/s2graphql/src/main/resources/application.conf +++ b/s2graphql/src/main/resources/application.conf @@ -22,12 +22,11 @@ akka { loglevel = "INFO" } -db.default.password = sa -db.default.user = sa +//db.default.url="jdbc:h2:file:./var/metastore;MODE=MYSQL", +//db.default.password = sa +//db.default.user = sa //s2graph.storage.backend = rocks //rocks.storage.file.path = rocks_db //rocks.storage.mode = production //rocks.storage.ttl = -1 //rocks.storage.read.only = false - - http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/823a8842/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 56f008d..768f072 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 @@ -196,11 +196,11 @@ object S2Type { lazy val edgeFields: List[Field[GraphRepository, Any]] = (labelColumns ++ labelProps).map { case (k, v) => makePropField(k, v) } - lazy val fromType = ObjectType(s"${label.label}_from", () => + lazy val fromType = ObjectType(s"Label_${label.label}_from", () => makeServiceColumnFields(label.srcColumn) ++ connectedLabelFields ) - lazy val toType = ObjectType(s"${label.label}_to", () => + lazy val toType = ObjectType(s"Label_${label.label}_to", () => makeServiceColumnFields(label.tgtColumn) ++ connectedLabelFields ) lazy val fromField: Field[GraphRepository, Any] = Field("from", fromType, resolve = c => { http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/823a8842/s2graphql/src/test/resources/application.conf ---------------------------------------------------------------------- diff --git a/s2graphql/src/test/resources/application.conf b/s2graphql/src/test/resources/application.conf index e412f2f..74821e4 100644 --- a/s2graphql/src/test/resources/application.conf +++ b/s2graphql/src/test/resources/application.conf @@ -22,11 +22,10 @@ akka { loglevel = "INFO" } -db.default.url="jdbc:h2:file:./var/metastore;MODE=MYSQL", -db.default.password = sa -db.default.user = sa +//db.default.url="jdbc:h2:file:./var/metastore;MODE=MYSQL", +//db.default.password = sa +//db.default.user = sa //s2graph.storage.backend = rocks -// //rocks.storage.file.path = rocks_db //rocks.storage.mode = production //rocks.storage.ttl = -1 http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/823a8842/s2graphql/src/test/scala/org/apache/s2graph/graphql/SchemaTest.scala ---------------------------------------------------------------------- diff --git a/s2graphql/src/test/scala/org/apache/s2graph/graphql/SchemaTest.scala b/s2graphql/src/test/scala/org/apache/s2graph/graphql/SchemaTest.scala index d4c0c1a..f7b2ea4 100644 --- a/s2graphql/src/test/scala/org/apache/s2graph/graphql/SchemaTest.scala +++ b/s2graphql/src/test/scala/org/apache/s2graph/graphql/SchemaTest.scala @@ -58,7 +58,6 @@ class SchemaTest extends FunSuite with Matchers with BeforeAndAfterAll { Map("name" -> "Input_Service"), Map("name" -> "Input_Index"), Map("name" -> "Input_Prop"), - Map("name" -> "Input_Label_Props"), Map("name" -> "Input_Column"), Map("name" -> "Input_Column_Props"), @@ -71,24 +70,23 @@ class SchemaTest extends FunSuite with Matchers with BeforeAndAfterAll { Map("name" -> "Service"), Map("name" -> "ServiceColumn"), - Map("name" -> "Input_friends_edge_mutate"), - Map("name" -> "Input_friends_edge_props"), - - Map("name" -> "Input_friends_props"), - Map("name" -> "Input_Service_ServiceColumn"), Map("name" -> "Input_Service_ServiceColumn_Props"), + Map("name" -> "Input_label_friends_param"), + Map("name" -> "Input_vertex_kakao_param"), Map("name" -> "Input_kakao_user"), Map("name" -> "Input_kakao_user_vertex_mutate"), - Map("name" -> "Input_kakao_user_vertex_props"), Map("name" -> "Enum_Service"), Map("name" -> "Enum_Label"), Map("name" -> "Enum_kakao_ServiceColumn"), Map("name" -> "Service_kakao"), + Map("name" -> "Label_friends"), + Map("name" -> "Label_friends_from"), + Map("name" -> "Label_friends_to"), // root object type Map("name" -> "Query"), @@ -122,6 +120,6 @@ class SchemaTest extends FunSuite with Matchers with BeforeAndAfterAll { logger.info(s"expected only has: ${expectedSet -- actualSet}") logger.info(s"actual only has: ${actualSet -- expectedSet}") - actualSet shouldBe expectedSet + actualSet.toList.sorted shouldBe expectedSet.toList.sorted } }
