-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use newest feature in the test-project
- Loading branch information
Showing
8 changed files
with
49 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,45 @@ | ||
name := "graphql-test-project" | ||
|
||
enablePlugins(GraphQLSchemaPlugin, GraphQLQueryPlugin) | ||
lazy val root = project.in(file(".")) | ||
.aggregate(server, client) | ||
|
||
libraryDependencies ++= Seq( | ||
"org.sangria-graphql" %% "sangria" % "1.3.0", | ||
"org.sangria-graphql" %% "sangria-circe" % "1.1.0" | ||
) | ||
lazy val server = project.in(file("server")) | ||
.enablePlugins(GraphQLSchemaPlugin, GraphQLQueryPlugin) | ||
.configs(IntegrationTest) | ||
.settings(commonSettings, Defaults.itSettings) | ||
.settings( | ||
graphqlSchemaSnippet := "example.ProductSchema.schema", | ||
// integration settings | ||
graphqlQueryDirectory in IntegrationTest := (sourceDirectory in IntegrationTest).value / "graphql" | ||
) | ||
|
||
graphqlSchemaSnippet := "example.ProductSchema.schema" | ||
lazy val client = project.in(file("client")) | ||
.enablePlugins(GraphQLCodegenPlugin, GraphQLQueryPlugin) | ||
.settings(commonSettings) | ||
.settings( | ||
graphqlCodegenSchema := graphqlRenderSchema.toTask("starwars").value, | ||
resourceDirectories in graphqlCodegen := List( | ||
(sourceDirectory in Compile).value / "graphql" | ||
), | ||
graphqlCodegenPackage := "rocks.muki.graphql", | ||
name in graphqlCodegen := "Api", | ||
// includeFilter in graphqlCodegen := "product.graphql" | ||
) | ||
|
||
graphqlSchemas += GraphQLSchema( | ||
"sangria-example", | ||
"staging schema at http://try.sangria-graphql.org/graphql", | ||
Def.task( | ||
GraphQLSchemaLoader | ||
.fromIntrospection("http://try.sangria-graphql.org/graphql", streams.value.log) | ||
.loadSchema() | ||
).taskValue | ||
) | ||
lazy val commonSettings = Seq( | ||
scalaVersion := "2.12.4", | ||
organization := "rocks.muki", | ||
libraryDependencies ++= Seq( | ||
"org.sangria-graphql" %% "sangria" % "1.3.0", | ||
"org.sangria-graphql" %% "sangria-circe" % "1.1.0" | ||
), | ||
// define schemas available in all builds | ||
graphqlSchemas += GraphQLSchema( | ||
"starwars", | ||
"starwars schema at http://try.sangria-graphql.org/graphql", | ||
Def.task( | ||
GraphQLSchemaLoader | ||
.fromIntrospection("http://try.sangria-graphql.org/graphql", streams.value.log) | ||
.loadSchema() | ||
).taskValue | ||
), | ||
) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
query HeroAndFriends { | ||
hero { | ||
name | ||
friends { | ||
name | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.