Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/master' into SchemaVal…
Browse files Browse the repository at this point in the history
…idation_Interfaces

# Conflicts:
#	core/src/main/scala/caliban/validation/Validator.scala
  • Loading branch information
TobiasPfeifer committed Feb 28, 2020
2 parents 47ba000 + b466e7b commit 8b7ef14
Show file tree
Hide file tree
Showing 61 changed files with 495 additions and 312 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The design principles behind the library are the following:
- clean separation between schema definition and implementation: schema is defined and validated at compile time using Scala standard types, resolver (`RootResolver`) is a simple value provided at runtime.
- minimal amount of boilerplate: no need to manually define a schema for every type in your API.

Caliban can also be used to build GraphQL frontends thanks to a type-safe and functional DSL.

### Consult the [Documentation](https://ghostdogpr.github.io/caliban/docs/) to learn how to use Caliban.

### Any questions? Head up to the [#caliban](https://discordapp.com/channels/629491597070827530/633200096393166868) channel on [ZIO Discord](https://discord.gg/EYpumuv).
30 changes: 17 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import sbtcrossproject.CrossPlugin.autoImport.{ crossProject, CrossType }

val mainScala = "2.12.10"
val allScala = Seq("2.13.1", mainScala)
val mainScala = "2.12.10"
val allScala = Seq("2.13.1", mainScala)

val http4sVersion = "0.21.1"
val silencerVersion = "1.6.0"
val sttpVersion = "2.0.1"
val zioVersion = "1.0.0-RC17"

inThisBuild(
List(
organization := "com.github.ghostdogpr",
Expand Down Expand Up @@ -71,10 +75,10 @@ lazy val core = crossProject(JSPlatform, JVMPlatform)
"com.lihaoyi" %%% "fastparse" % "2.2.4",
"com.propensive" %%% "magnolia" % "0.12.7",
"com.propensive" %%% "mercator" % "0.2.1",
"dev.zio" %%% "zio" % "1.0.0-RC17",
"dev.zio" %%% "zio-streams" % "1.0.0-RC17",
"dev.zio" %%% "zio-test" % "1.0.0-RC17" % "test",
"dev.zio" %%% "zio-test-sbt" % "1.0.0-RC17" % "test",
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test",
"io.circe" %%% "circe-derivation" % "0.12.0-M7" % Optional,
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
Expand All @@ -98,8 +102,8 @@ lazy val codegen = project
libraryDependencies ++= Seq(
"org.scalameta" %% "scalafmt-dynamic" % "2.4.2",
"org.scalameta" %% "scalafmt-core" % "2.4.2",
"dev.zio" %% "zio-test" % "1.0.0-RC17" % "test",
"dev.zio" %% "zio-test-sbt" % "1.0.0-RC17" % "test"
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
)
)
.dependsOn(coreJVM)
Expand Down Expand Up @@ -196,10 +200,10 @@ lazy val client = crossProject(JSPlatform, JVMPlatform)
testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")),
libraryDependencies ++= Seq(
"io.circe" %%% "circe-derivation" % "0.12.0-M7",
"com.softwaremill.sttp.client" %%% "core" % "2.0.0",
"com.softwaremill.sttp.client" %%% "circe" % "2.0.0",
"dev.zio" %%% "zio-test" % "1.0.0-RC17" % "test",
"dev.zio" %%% "zio-test-sbt" % "1.0.0-RC17" % "test"
"com.softwaremill.sttp.client" %%% "core" % sttpVersion,
"com.softwaremill.sttp.client" %%% "circe" % sttpVersion,
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test"
)
)
lazy val clientJVM = client.jvm
Expand All @@ -211,7 +215,7 @@ lazy val examples = project
.settings(skip in publish := true)
.settings(
libraryDependencies ++= Seq(
"com.softwaremill.sttp.client" %% "async-http-client-backend-zio" % "2.0.0"
"com.softwaremill.sttp.client" %% "async-http-client-backend-zio" % sttpVersion
)
)
.dependsOn(akkaHttp, http4s, catsInteropJVM, finch, monixInterop, clientJVM)
Expand Down
4 changes: 2 additions & 2 deletions codegen/src/test/scala/caliban/codegen/ClientWriterSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package caliban.codegen
import caliban.parsing.Parser
import zio.Task
import zio.test.Assertion._
import zio.test.{ assertM, suite, testM, DefaultRunnableSpec }
import zio.test.{ assertM, suite, testM, DefaultRunnableSpec, TestAspect }

object ClientWriterSpec
extends DefaultRunnableSpec(
Expand Down Expand Up @@ -361,6 +361,6 @@ object Client {
)
)
}
)
) @@ TestAspect.sequential
}
)
4 changes: 2 additions & 2 deletions codegen/src/test/scala/caliban/codegen/SchemaWriterSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import caliban.parsing.Parser
import caliban.parsing.adt.Document
import zio.Task
import zio.test.Assertion.equalTo
import zio.test.{ assertM, suite, testM, DefaultRunnableSpec }
import zio.test.{ assertM, suite, testM, DefaultRunnableSpec, TestAspect }

object SchemaWriterSpec
extends DefaultRunnableSpec({
Expand Down Expand Up @@ -307,5 +307,5 @@ object Types {
)
)
}
)
) @@ TestAspect.sequential
})
Loading

0 comments on commit 8b7ef14

Please sign in to comment.