change option name

Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/05d42f7b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/05d42f7b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/05d42f7b

Branch: refs/heads/master
Commit: 05d42f7b357921338cbf00712baf6d3ae81065f9
Parents: 46507ce
Author: daewon <dae...@apache.org>
Authored: Fri Jul 13 15:38:52 2018 +0900
Committer: daewon <dae...@apache.org>
Committed: Fri Jul 13 15:38:52 2018 +0900

----------------------------------------------------------------------
 .../main/scala/org/apache/s2graph/graphql/GraphQLServer.scala  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/05d42f7b/s2graphql/src/main/scala/org/apache/s2graph/graphql/GraphQLServer.scala
----------------------------------------------------------------------
diff --git 
a/s2graphql/src/main/scala/org/apache/s2graph/graphql/GraphQLServer.scala 
b/s2graphql/src/main/scala/org/apache/s2graph/graphql/GraphQLServer.scala
index 3b61085..b650714 100644
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/GraphQLServer.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/GraphQLServer.scala
@@ -58,7 +58,7 @@ class GraphQLServer() {
   val config = ConfigFactory.load()
   val s2graph = new S2Graph(config)
   val schemaCacheTTL = Try(config.getInt("schemaCacheTTL")).getOrElse(3000)
-  val withAdmin = Try(config.getBoolean("schemaCacheTTL")).getOrElse(false)
+  val enableMutation = 
Try(config.getBoolean("enableMutation")).getOrElse(false)
 
   val schemaConfig = ConfigFactory.parseMap(Map(
     SafeUpdateCache.MaxSizeKey -> 1, SafeUpdateCache.TtlKey -> schemaCacheTTL
@@ -81,7 +81,7 @@ class GraphQLServer() {
 
   val schemaCacheKey = className + "s2Schema"
 
-  schemaCache.put(schemaCacheKey, createNewSchema(withAdmin))
+  schemaCache.put(schemaCacheKey, createNewSchema(enableMutation))
 
   /**
     * In development mode(schemaCacheTTL = 1),
@@ -127,7 +127,7 @@ class GraphQLServer() {
     import GraphRepository._
 
     val (schemaDef, s2Repository) =
-      schemaCache.withCache(schemaCacheKey, broadcast = false, onEvict = 
onEvictSchema)(createNewSchema(withAdmin))
+      schemaCache.withCache(schemaCacheKey, broadcast = false, onEvict = 
onEvictSchema)(createNewSchema(enableMutation))
 
     val resolver: DeferredResolver[GraphRepository] = 
DeferredResolver.fetchers(vertexFetcher, edgeFetcher)
 

Reply via email to