diff options
| author | Danny Navarro <j@dannynavarro.net> | 2016-12-18 11:43:45 -0300 |
|---|---|---|
| committer | Danny Navarro <j@dannynavarro.net> | 2016-12-18 11:43:45 -0300 |
| commit | aa66236081bff41ff7cea6cceac8d19095020763 (patch) | |
| tree | 2af57f18393e7f1eae8fb7bf923094c764f45647 | |
| parent | afb2fc4eb999578bdd1823e854a3c5328715ed6a (diff) | |
| download | graphql-aa66236081bff41ff7cea6cceac8d19095020763.tar.gz | |
Add homePlanet to test schema
| -rw-r--r-- | tests/Test/StarWars/Data.hs | 2 | ||||
| -rw-r--r-- | tests/Test/StarWars/QueryTests.hs | 4 | ||||
| -rw-r--r-- | tests/Test/StarWars/Schema.hs | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/tests/Test/StarWars/Data.hs b/tests/Test/StarWars/Data.hs index cec90ae..17263c0 100644 --- a/tests/Test/StarWars/Data.hs +++ b/tests/Test/StarWars/Data.hs @@ -70,7 +70,7 @@ luke' = Human , _friends = ["1002","1003","2000","2001"] , _appearsIn = [4,5,6] } - , homePlanet = "Tatoonie" + , homePlanet = "Tatooine" } vader :: Human diff --git a/tests/Test/StarWars/QueryTests.hs b/tests/Test/StarWars/QueryTests.hs index dee9929..85a15a9 100644 --- a/tests/Test/StarWars/QueryTests.hs +++ b/tests/Test/StarWars/QueryTests.hs @@ -18,8 +18,6 @@ import Test.StarWars.Schema -- * Test -- See https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsQueryTests.js - - test :: TestTree test = testGroup "Star Wars Query Tests" [ testGroup "Basic Queries" @@ -206,7 +204,7 @@ test = testGroup "Star Wars Query Tests" , "leia" .= object [leiaName] ]] , testGroup "Fragments for complex queries" - [ testCase "Aliases to query for duplicate content" . testQuery + [ testCase "Aliases to query for duplicate content" . testQuery [r| query DuplicateFields { luke: human(id: "1000") { name diff --git a/tests/Test/StarWars/Schema.hs b/tests/Test/StarWars/Schema.hs index 9021bd0..ff79686 100644 --- a/tests/Test/StarWars/Schema.hs +++ b/tests/Test/StarWars/Schema.hs @@ -42,5 +42,6 @@ character char = , Schema.scalar "name" $ name char , Schema.array "friends" $ character <$> getFriends char , Schema.enum "appearsIn" . traverse getEpisode $ appearsIn char - , Schema.scalar "secretBackstory" $ secretBackstory char + , Schema.scalar "secretBackstory" $ secretBackstory char + , Schema.scalar "homePlanet" $ either mempty homePlanet char ] |
