-
-
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.
Update sangria to 2.0.0-RC1 and misc updates / fixes (#87)
* Update sangria to 2.0.0-RC1 and misc updates / fixes * Fixed the doubled escape sign $ while generating the source
- Loading branch information
Showing
19 changed files
with
186 additions
and
92 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
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
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 +1 @@ | ||
sbt.version=1.2.6 | ||
sbt.version=1.3.10 |
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
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
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
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
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
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
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,3 +1,3 @@ | ||
# validation should fail with the broken.graphql file | ||
> graphqlValidateSchema build product-schema | ||
-> graphqlValidateSchema build product-schema-broken | ||
-> graphqlValidateSchema build product-schema-broken |
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
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
20 changes: 20 additions & 0 deletions
20
src/test/resources/apollo/starwars/SearchQueryWithArgumentFragment.graphql
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,20 @@ | ||
query SearchQueryWithArgumentFragment($text: String!, $lengthUnit: LengthUnit = METER) { | ||
search(text: $text) { | ||
...StarshipDetail | ||
...HumanDetail | ||
...DroidDetail | ||
} | ||
} | ||
|
||
fragment StarshipDetail on Starship { | ||
name | ||
length(unit: $lengthUnit) | ||
} | ||
|
||
fragment HumanDetail on Human { | ||
name | ||
} | ||
|
||
fragment DroidDetail on Droid { | ||
name | ||
} |
32 changes: 32 additions & 0 deletions
32
src/test/resources/apollo/starwars/SearchQueryWithArgumentFragment.scala
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,32 @@ | ||
import sangria.macros._ | ||
import types._ | ||
object SearchQueryWithArgumentFragment { | ||
object SearchQueryWithArgumentFragment extends GraphQLQuery { | ||
val document: sangria.ast.Document = graphql"""query SearchQueryWithArgumentFragment($$text: String!, $$lengthUnit: LengthUnit = METER) { | ||
search(text: $$text) { | ||
...StarshipDetail | ||
...HumanDetail | ||
...DroidDetail | ||
} | ||
} | ||
|
||
fragment StarshipDetail on Starship { | ||
name | ||
length(unit: $$lengthUnit) | ||
} | ||
fragment HumanDetail on Human { | ||
name | ||
} | ||
fragment DroidDetail on Droid { | ||
name | ||
}""" | ||
case class Variables(text: String, lengthUnit: Option[LengthUnit]) | ||
case class Data(search: List[Search]) | ||
sealed trait Search { def name: Option[String] } | ||
object Search { | ||
case class Human(name: Option[String]) extends Search | ||
case class Droid(name: Option[String]) extends Search | ||
case class Starship(name: Option[String], length: Option[Float]) extends Search | ||
} | ||
} | ||
} |
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
5 changes: 3 additions & 2 deletions
5
src/test/scala/rocks/muki/graphql/codegen/ScalametaUtilsSpec.scala
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
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
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
Oops, something went wrong.