{"action":"created","comment":{"url":"https://api.github.com/repos/prismagraphql/prisma/pulls/comments/198132795","pull_request_review_id":132005881,"id":198132795,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODEzMjc5NQ==","diff_hunk":"@@ -1,145 +1,274 @@\n package com.prisma.api.connector.postgresql.database\n \n-import java.sql.{PreparedStatement, Statement}\n+import java.sql.{PreparedStatement, ResultSet, Statement}\n import java.util.Date\n \n import com.prisma.api.connector._\n import com.prisma.api.connector.postgresql.database.JdbcExtensions._\n+import com.prisma.api.connector.postgresql.database.JooqExtensions._\n import com.prisma.api.connector.postgresql.database.PostgresSlickExtensions._\n-import com.prisma.api.schema.UserFacingError\n-import com.prisma.gc_values.{GCValue, ListGCValue, NullGCValue, _}\n-import com.prisma.shared.models.Manifestations.RelationTableManifestation\n+import com.prisma.api.schema.APIErrors.{NodesNotConnectedError, RequiredRelationWouldBeViolated}\n+import com.prisma.gc_values.{ListGCValue, NullGCValue, _}\n+import com.prisma.shared.models.TypeIdentifier.IdTypeIdentifier\n import com.prisma.shared.models._\n import com.prisma.slick.NewJdbcExtensions._\n import cool.graph.cuid.Cuid\n import org.joda.time.{DateTime, DateTimeZone}\n-import slick.dbio.{DBIOAction, Effect, NoStream}\n+import org.jooq.conf.Settings\n+import org.jooq.impl.DSL\n+import org.jooq.impl.DSL._\n+import org.jooq.{Query => JooqQuery, _}\n+import slick.dbio.DBIOAction\n+import slick.jdbc.PositionedParameters\n import slick.jdbc.PostgresProfile.api._\n-import slick.jdbc.{PositionedParameters, SQLActionBuilder}\n-import slick.sql.{SqlAction, SqlStreamingAction}\n \n-case class PostgresApiDatabaseMutationBuilder(\n-    schemaName: String,\n-    schema: Schema,\n-) {\n+import scala.collection.JavaConverters._\n+import scala.concurrent.ExecutionContext\n+\n+trait BuilderBase {\n+  import JooqQueryBuilders.placeHolder\n+\n+  def schemaName: String\n+\n+  def dialect: SQLDialect\n+\n+  val sql = DSL.using(dialect, new Settings().withRenderFormatted(true))\n+\n+  private val relayIdTableName = \"_RelayId\"\n+\n+  val relayIdColumn                                                = field(name(schemaName, relayIdTableName, \"id\"))\n+  val relayStableIdentifierColumn                                  = field(name(schemaName, relayIdTableName, \"stableModelIdentifier\"))\n+  val relayTable                                                   = table(name(schemaName, relayIdTableName))\n+  def idField(model: Model)                                        = field(name(schemaName, model.dbName, model.dbNameOfIdField_!))\n+  def modelTable(model: Model)                                     = table(name(schemaName, model.dbName))\n+  def relationTable(relation: Relation)                            = table(name(schemaName, relation.relationTableName))\n+  def scalarListTable(field: ScalarField)                          = table(name(schemaName, scalarListTableName(field)))\n+  def modelColumn(model: Model, column: String)                    = field(name(schemaName, model.dbName, column))\n+  def relationColumn(relation: Relation, side: RelationSide.Value) = field(name(schemaName, relation.relationTableName, relation.columnForRelationSide(side)))\n+  def relationIdColumn(relation: Relation)                         = field(name(schemaName, relation.relationTableName, \"id\"))\n+  def scalarListColumn(scalarField: ScalarField, column: String)   = field(name(schemaName, scalarListTableName(scalarField), column))\n+  def column(table: String, column: String)                        = field(name(schemaName, table, column))\n+  def placeHolders(vector: Vector[Any])                            = vector.map(_ => placeHolder).asJava\n+\n+  def queryToDBIO[T](query: JooqQuery)(setParams: PositionedParameters => Unit, readResult: ResultSet => T): DBIO[T] = {\n+    SimpleDBIO { ctx =>\n+      val ps = ctx.connection.prepareStatement(query.getSQL)\n+      val pp = new PositionedParameters(ps)\n+      setParams(pp)\n+\n+      val rs = ps.executeQuery()\n+      readResult(rs)\n+    }\n+  }\n+\n+  def deleteToDBIO(query: Delete[Record])(setParams: PositionedParameters => Unit): DBIO[Unit] = {\n+    SimpleDBIO { ctx =>\n+      val ps = ctx.connection.prepareStatement(query.getSQL)\n+      val pp = new PositionedParameters(ps)\n+      setParams(pp)\n+\n+      ps.execute()\n+    }\n+  }\n+\n+  private def scalarListTableName(field: ScalarField) = field.model.dbName + \"_\" + field.dbName\n+\n+  def readPrismaNodeWithParent(rf: RelationField) = ReadsResultSet { rs =>\n+    val node = readPrismaNode(rf.relatedModel_!, rs)\n+\n+    val parentId = if (rf.relation.isSameModelRelation) {\n+      val firstSide  = rs.getParentId(RelationSide.A, rf.model.idField_!.typeIdentifier)\n+      val secondSide = rs.getParentId(RelationSide.B, rf.model.idField_!.typeIdentifier)\n+      if (firstSide == node.id) secondSide else firstSide\n+    } else {\n+      val parentRelationSide = rf.relation.modelA match {\n+        case x if x == rf.relatedModel_! => RelationSide.B\n+        case _                           => RelationSide.A\n+      }\n+      rs.getParentId(parentRelationSide, rf.model.idField_!.typeIdentifier)\n+    }\n+    PrismaNodeWithParent(parentId, node)\n+  }\n+\n+  def readsPrismaNode(model: Model): ReadsResultSet[PrismaNode] = ReadsResultSet { rs =>\n+    readPrismaNode(model, rs)\n+  }\n+\n+  private def readPrismaNode(model: Model, rs: ResultSet) = {\n+    val data = model.scalarNonListFields.map(field => field.name -> rs.getGcValue(field.dbName, field.typeIdentifier))\n+    PrismaNode(id = rs.getId(model), data = RootGCValue(data: _*), Some(model.name))\n+  }\n+}\n+\n+case class PostgresApiDatabaseMutationBuilder(schemaName: String) extends BuilderBase with ImportActions {\n   import JooqQueryBuilders._\n \n+  override def dialect = SQLDialect.POSTGRES_9_5\n+\n   // region CREATE\n \n-  def createDataItem(path: Path, args: PrismaArgs): DBIO[CreateDataItemResult] = {\n+  def createDataItem(model: Model, args: PrismaArgs): DBIO[IdGCValue] = {\n+    SimpleDBIO { x =>\n+      val argsAsRoot = args.raw.asRoot.add(model.idField_!.name, generateId(model))\n+      val fields     = model.fields.filter(field => argsAsRoot.hasArgFor(field.name))\n+      val columns    = fields.map(_.dbName)\n \n-    SimpleDBIO[CreateDataItemResult] { x =>\n-      val argsAsRoot   = args.raw.asRoot\n-      val fields       = path.lastModel.fields.filter(field => argsAsRoot.hasArgFor(field.name))\n-      val columns      = fields.map(_.dbName)\n-      val escapedKeys  = columns.map(column => s\"\"\"\"$column\"\"\"\").mkString(\",\")\n-      val placeHolders = columns.map(_ => \"?\").mkString(\",\")\n+      lazy val queryString: String = {\n+        val generatedFields = columns.map(column => modelColumn(model, column))\n+\n+        sql\n+          .insertInto(table(name(schemaName, model.dbName)))\n+          .columns(generatedFields: _*)\n+          .values(columns.map(_ => placeHolder): _*)\n+          .getSQL\n+      }\n \n-      val query                         = s\"\"\"INSERT INTO \"$schemaName\".\"${path.lastModel.dbName}\" ($escapedKeys) VALUES ($placeHolders)\"\"\"\n-      val itemInsert: PreparedStatement = x.connection.prepareStatement(query, Statement.RETURN_GENERATED_KEYS)\n+      val itemInsert: PreparedStatement = x.connection.prepareStatement(queryString, Statement.RETURN_GENERATED_KEYS)\n \n+      val currentTimestamp = currentTimeStampUTC\n       fields.map(_.name).zipWithIndex.foreach {\n         case (column, index) =>\n           argsAsRoot.map.get(column) match {\n-            case Some(NullGCValue) if column == \"createdAt\" || column == \"updatedAt\" => itemInsert.setTimestamp(index + 1, currentTimeStampUTC)\n-            case Some(gCValue)                                                       => itemInsert.setGcValue(index + 1, gCValue)\n-            case None if column == \"createdAt\" || column == \"updatedAt\"              => itemInsert.setTimestamp(index + 1, currentTimeStampUTC)\n-            case None                                                                => itemInsert.setNull(index + 1, java.sql.Types.NULL)\n+            case Some(NullGCValue) if column == createdAtField || column == updatedAtField => itemInsert.setTimestamp(index + 1, currentTimestamp)\n+            case Some(gCValue)                                                             => itemInsert.setGcValue(index + 1, gCValue)\n+            case None if column == createdAtField || column == updatedAtField              => itemInsert.setTimestamp(index + 1, currentTimestamp)\n+            case None                                                                      => itemInsert.setNull(index + 1, java.sql.Types.NULL)\n           }\n       }\n       itemInsert.execute()\n \n       val generatedKeys = itemInsert.getGeneratedKeys\n       generatedKeys.next()\n-      val field = path.lastModel.idField_!\n-      CreateDataItemResult(generatedKeys.getGcValue(field.dbName, field.typeIdentifier))\n+      generatedKeys.getId(model)\n     }\n   }\n \n-  def createRelayRow(path: Path): SqlStreamingAction[Vector[Int], Int, Effect]#ResultAction[Int, NoStream, Effect] = {\n-    val where = path.lastCreateWhere_!\n-    sql\"\"\"INSERT INTO \"#$schemaName\".\"_RelayId\" (\"id\", \"stableModelIdentifier\") VALUES (${where.fieldGCValue}, ${where.model.stableIdentifier})\"\"\".asUpdate\n+  def generateId(model: Model) = {\n+    model.idField_!.typeIdentifier.asInstanceOf[IdTypeIdentifier] match {\n+      case TypeIdentifier.UUID => UuidGCValue.random()\n+      case TypeIdentifier.Cuid => CuidGCValue.random()\n+    }\n   }\n \n-  def createRelationRowByPath(path: Path): SqlAction[Int, NoStream, Effect] = {\n-    val relation = path.lastRelation_!\n-    val childWhere = path.lastEdge_! match {\n-      case _: ModelEdge   => sys.error(\"Needs to be a node edge.\")\n-      case edge: NodeEdge => edge.childWhere\n+  def createRelayRow(where: NodeSelector): DBIO[_] = {\n+    SimpleDBIO[Boolean] { x =>\n+      lazy val queryString: String = {\n+        sql\n+          .insertInto(table(name(schemaName, relayTableName)))\n+          .columns(field(name(schemaName, relayTableName, \"id\")), field(name(schemaName, relayTableName, \"stableModelIdentifier\")))\n+          .values(placeHolder, placeHolder)\n+          .getSQL\n+      }\n+\n+      val statement: PreparedStatement = x.connection.prepareStatement(queryString, Statement.RETURN_GENERATED_KEYS)\n+      statement.setGcValue(1, where.fieldGCValue)\n+      statement.setString(2, where.model.stableIdentifier)\n+\n+      statement.execute()\n     }\n+  }\n+\n+  def createRelation(relationField: RelationField, parentId: IdGCValue, childId: IdGCValue): DBIO[_] = {","path":"server/connectors/api-connector-postgresql/src/main/scala/com/prisma/api/connector/postgresql/database/PostgresApiDatabaseMutationBuilder.scala","position":205,"original_position":205,"commit_id":"18e5bb665a2e417b2eff9ebb909397164e21bb7d","original_commit_id":"18e5bb665a2e417b2eff9ebb909397164e21bb7d","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Method is longer than 50 lines](https://app.codacy.com/app/graphcool/prisma/pullRequest?prid=1792053)","created_at":"2018-06-26T13:00:16Z","updated_at":"2018-06-26T13:00:16Z","html_url":"https://github.com/prismagraphql/prisma/pull/2647#discussion_r198132795","pull_request_url":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/prismagraphql/prisma/pulls/comments/198132795"},"html":{"href":"https://github.com/prismagraphql/prisma/pull/2647#discussion_r198132795"},"pull_request":{"href":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647"}}},"pull_request":{"url":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647","id":195508855,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NTA4ODU1","html_url":"https://github.com/prismagraphql/prisma/pull/2647","diff_url":"https://github.com/prismagraphql/prisma/pull/2647.diff","patch_url":"https://github.com/prismagraphql/prisma/pull/2647.patch","issue_url":"https://api.github.com/repos/prismagraphql/prisma/issues/2647","number":2647,"state":"open","locked":false,"title":"[WIP] refactor mutaction hierarchy","user":{"login":"mavilein","id":2470881,"node_id":"MDQ6VXNlcjI0NzA4ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/2470881?v=4","gravatar_id":"","url":"https://api.github.com/users/mavilein","html_url":"https://github.com/mavilein","followers_url":"https://api.github.com/users/mavilein/followers","following_url":"https://api.github.com/users/mavilein/following{/other_user}","gists_url":"https://api.github.com/users/mavilein/gists{/gist_id}","starred_url":"https://api.github.com/users/mavilein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavilein/subscriptions","organizations_url":"https://api.github.com/users/mavilein/orgs","repos_url":"https://api.github.com/users/mavilein/repos","events_url":"https://api.github.com/users/mavilein/events{/privacy}","received_events_url":"https://api.github.com/users/mavilein/received_events","type":"User","site_admin":false},"body":null,"created_at":"2018-06-18T12:28:29Z","updated_at":"2018-06-26T13:00:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ff12d7e4401c6ad9523a3a72c64f54966f4e93d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647/commits","review_comments_url":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647/comments","review_comment_url":"https://api.github.com/repos/prismagraphql/prisma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prismagraphql/prisma/issues/2647/comments","statuses_url":"https://api.github.com/repos/prismagraphql/prisma/statuses/18e5bb665a2e417b2eff9ebb909397164e21bb7d","head":{"label":"prismagraphql:refactor-mutaction-hierarchy","ref":"refactor-mutaction-hierarchy","sha":"18e5bb665a2e417b2eff9ebb909397164e21bb7d","user":{"login":"prismagraphql","id":17219288,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MjE5Mjg4","avatar_url":"https://avatars0.githubusercontent.com/u/17219288?v=4","gravatar_id":"","url":"https://api.github.com/users/prismagraphql","html_url":"https://github.com/prismagraphql","followers_url":"https://api.github.com/users/prismagraphql/followers","following_url":"https://api.github.com/users/prismagraphql/following{/other_user}","gists_url":"https://api.github.com/users/prismagraphql/gists{/gist_id}","starred_url":"https://api.github.com/users/prismagraphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prismagraphql/subscriptions","organizations_url":"https://api.github.com/users/prismagraphql/orgs","repos_url":"https://api.github.com/users/prismagraphql/repos","events_url":"https://api.github.com/users/prismagraphql/events{/privacy}","received_events_url":"https://api.github.com/users/prismagraphql/received_events","type":"Organization","site_admin":false},"repo":{"id":69164196,"node_id":"MDEwOlJlcG9zaXRvcnk2OTE2NDE5Ng==","name":"prisma","full_name":"prismagraphql/prisma","owner":{"login":"prismagraphql","id":17219288,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MjE5Mjg4","avatar_url":"https://avatars0.githubusercontent.com/u/17219288?v=4","gravatar_id":"","url":"https://api.github.com/users/prismagraphql","html_url":"https://github.com/prismagraphql","followers_url":"https://api.github.com/users/prismagraphql/followers","following_url":"https://api.github.com/users/prismagraphql/following{/other_user}","gists_url":"https://api.github.com/users/prismagraphql/gists{/gist_id}","starred_url":"https://api.github.com/users/prismagraphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prismagraphql/subscriptions","organizations_url":"https://api.github.com/users/prismagraphql/orgs","repos_url":"https://api.github.com/users/prismagraphql/repos","events_url":"https://api.github.com/users/prismagraphql/events{/privacy}","received_events_url":"https://api.github.com/users/prismagraphql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prismagraphql/prisma","description":"⚡️ Prisma turns your database into a realtime GraphQL API","fork":false,"url":"https://api.github.com/repos/prismagraphql/prisma","forks_url":"https://api.github.com/repos/prismagraphql/prisma/forks","keys_url":"https://api.github.com/repos/prismagraphql/prisma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prismagraphql/prisma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prismagraphql/prisma/teams","hooks_url":"https://api.github.com/repos/prismagraphql/prisma/hooks","issue_events_url":"https://api.github.com/repos/prismagraphql/prisma/issues/events{/number}","events_url":"https://api.github.com/repos/prismagraphql/prisma/events","assignees_url":"https://api.github.com/repos/prismagraphql/prisma/assignees{/user}","branches_url":"https://api.github.com/repos/prismagraphql/prisma/branches{/branch}","tags_url":"https://api.github.com/repos/prismagraphql/prisma/tags","blobs_url":"https://api.github.com/repos/prismagraphql/prisma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prismagraphql/prisma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prismagraphql/prisma/git/refs{/sha}","trees_url":"https://api.github.com/repos/prismagraphql/prisma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prismagraphql/prisma/statuses/{sha}","languages_url":"https://api.github.com/repos/prismagraphql/prisma/languages","stargazers_url":"https://api.github.com/repos/prismagraphql/prisma/stargazers","contributors_url":"https://api.github.com/repos/prismagraphql/prisma/contributors","subscribers_url":"https://api.github.com/repos/prismagraphql/prisma/subscribers","subscription_url":"https://api.github.com/repos/prismagraphql/prisma/subscription","commits_url":"https://api.github.com/repos/prismagraphql/prisma/commits{/sha}","git_commits_url":"https://api.github.com/repos/prismagraphql/prisma/git/commits{/sha}","comments_url":"https://api.github.com/repos/prismagraphql/prisma/comments{/number}","issue_comment_url":"https://api.github.com/repos/prismagraphql/prisma/issues/comments{/number}","contents_url":"https://api.github.com/repos/prismagraphql/prisma/contents/{+path}","compare_url":"https://api.github.com/repos/prismagraphql/prisma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prismagraphql/prisma/merges","archive_url":"https://api.github.com/repos/prismagraphql/prisma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prismagraphql/prisma/downloads","issues_url":"https://api.github.com/repos/prismagraphql/prisma/issues{/number}","pulls_url":"https://api.github.com/repos/prismagraphql/prisma/pulls{/number}","milestones_url":"https://api.github.com/repos/prismagraphql/prisma/milestones{/number}","notifications_url":"https://api.github.com/repos/prismagraphql/prisma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prismagraphql/prisma/labels{/name}","releases_url":"https://api.github.com/repos/prismagraphql/prisma/releases{/id}","deployments_url":"https://api.github.com/repos/prismagraphql/prisma/deployments","created_at":"2016-09-25T12:54:40Z","updated_at":"2018-06-26T12:56:38Z","pushed_at":"2018-06-26T12:56:37Z","git_url":"git://github.com/prismagraphql/prisma.git","ssh_url":"git@github.com:prismagraphql/prisma.git","clone_url":"https://github.com/prismagraphql/prisma.git","svn_url":"https://github.com/prismagraphql/prisma","homepage":"https://www.prisma.io/","size":18214,"stargazers_count":9001,"watchers_count":9001,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":509,"mirror_url":null,"archived":false,"open_issues_count":498,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":509,"open_issues":498,"watchers":9001,"default_branch":"master"}},"base":{"label":"prismagraphql:alpha","ref":"alpha","sha":"d3670e82f629a25c586711badccc2a63628637fb","user":{"login":"prismagraphql","id":17219288,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MjE5Mjg4","avatar_url":"https://avatars0.githubusercontent.com/u/17219288?v=4","gravatar_id":"","url":"https://api.github.com/users/prismagraphql","html_url":"https://github.com/prismagraphql","followers_url":"https://api.github.com/users/prismagraphql/followers","following_url":"https://api.github.com/users/prismagraphql/following{/other_user}","gists_url":"https://api.github.com/users/prismagraphql/gists{/gist_id}","starred_url":"https://api.github.com/users/prismagraphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prismagraphql/subscriptions","organizations_url":"https://api.github.com/users/prismagraphql/orgs","repos_url":"https://api.github.com/users/prismagraphql/repos","events_url":"https://api.github.com/users/prismagraphql/events{/privacy}","received_events_url":"https://api.github.com/users/prismagraphql/received_events","type":"Organization","site_admin":false},"repo":{"id":69164196,"node_id":"MDEwOlJlcG9zaXRvcnk2OTE2NDE5Ng==","name":"prisma","full_name":"prismagraphql/prisma","owner":{"login":"prismagraphql","id":17219288,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MjE5Mjg4","avatar_url":"https://avatars0.githubusercontent.com/u/17219288?v=4","gravatar_id":"","url":"https://api.github.com/users/prismagraphql","html_url":"https://github.com/prismagraphql","followers_url":"https://api.github.com/users/prismagraphql/followers","following_url":"https://api.github.com/users/prismagraphql/following{/other_user}","gists_url":"https://api.github.com/users/prismagraphql/gists{/gist_id}","starred_url":"https://api.github.com/users/prismagraphql/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prismagraphql/subscriptions","organizations_url":"https://api.github.com/users/prismagraphql/orgs","repos_url":"https://api.github.com/users/prismagraphql/repos","events_url":"https://api.github.com/users/prismagraphql/events{/privacy}","received_events_url":"https://api.github.com/users/prismagraphql/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prismagraphql/prisma","description":"⚡️ Prisma turns your database into a realtime GraphQL API","fork":false,"url":"https://api.github.com/repos/prismagraphql/prisma","forks_url":"https://api.github.com/repos/prismagraphql/prisma/forks","keys_url":"https://api.github.com/repos/prismagraphql/prisma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prismagraphql/prisma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prismagraphql/prisma/teams","hooks_url":"https://api.github.com/repos/prismagraphql/prisma/hooks","issue_events_url":"https://api.github.com/repos/prismagraphql/prisma/issues/events{/number}","events_url":"https://api.github.com/repos/prismagraphql/prisma/events","assignees_url":"https://api.github.com/repos/prismagraphql/prisma/assignees{/user}","branches_url":"https://api.github.com/repos/prismagraphql/prisma/branches{/branch}","tags_url":"https://api.github.com/repos/prismagraphql/prisma/tags","blobs_url":"https://api.github.com/repos/prismagraphql/prisma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prismagraphql/prisma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prismagraphql/prisma/git/refs{/sha}","trees_url":"https://api.github.com/repos/prismagraphql/prisma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prismagraphql/prisma/statuses/{sha}","languages_url":"https://api.github.com/repos/prismagraphql/prisma/languages","stargazers_url":"https://api.github.com/repos/prismagraphql/prisma/stargazers","contributors_url":"https://api.github.com/repos/prismagraphql/prisma/contributors","subscribers_url":"https://api.github.com/repos/prismagraphql/prisma/subscribers","subscription_url":"https://api.github.com/repos/prismagraphql/prisma/subscription","commits_url":"https://api.github.com/repos/prismagraphql/prisma/commits{/sha}","git_commits_url":"https://api.github.com/repos/prismagraphql/prisma/git/commits{/sha}","comments_url":"https://api.github.com/repos/prismagraphql/prisma/comments{/number}","issue_comment_url":"https://api.github.com/repos/prismagraphql/prisma/issues/comments{/number}","contents_url":"https://api.github.com/repos/prismagraphql/prisma/contents/{+path}","compare_url":"https://api.github.com/repos/prismagraphql/prisma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prismagraphql/prisma/merges","archive_url":"https://api.github.com/repos/prismagraphql/prisma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prismagraphql/prisma/downloads","issues_url":"https://api.github.com/repos/prismagraphql/prisma/issues{/number}","pulls_url":"https://api.github.com/repos/prismagraphql/prisma/pulls{/number}","milestones_url":"https://api.github.com/repos/prismagraphql/prisma/milestones{/number}","notifications_url":"https://api.github.com/repos/prismagraphql/prisma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prismagraphql/prisma/labels{/name}","releases_url":"https://api.github.com/repos/prismagraphql/prisma/releases{/id}","deployments_url":"https://api.github.com/repos/prismagraphql/prisma/deployments","created_at":"2016-09-25T12:54:40Z","updated_at":"2018-06-26T12:56:38Z","pushed_at":"2018-06-26T12:56:37Z","git_url":"git://github.com/prismagraphql/prisma.git","ssh_url":"git@github.com:prismagraphql/prisma.git","clone_url":"https://github.com/prismagraphql/prisma.git","svn_url":"https://github.com/prismagraphql/prisma","homepage":"https://www.prisma.io/","size":18214,"stargazers_count":9001,"watchers_count":9001,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":509,"mirror_url":null,"archived":false,"open_issues_count":498,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":509,"open_issues":498,"watchers":9001,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647"},"html":{"href":"https://github.com/prismagraphql/prisma/pull/2647"},"issue":{"href":"https://api.github.com/repos/prismagraphql/prisma/issues/2647"},"comments":{"href":"https://api.github.com/repos/prismagraphql/prisma/issues/2647/comments"},"review_comments":{"href":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647/comments"},"review_comment":{"href":"https://api.github.com/repos/prismagraphql/prisma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prismagraphql/prisma/pulls/2647/commits"},"statuses":{"href":"https://api.github.com/repos/prismagraphql/prisma/statuses/18e5bb665a2e417b2eff9ebb909397164e21bb7d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codacy-bot"}}