diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-09-25 21:57:25 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-09-26 07:57:25 +0200 |
| commit | 3373c94895c148ffec199842305e10528440e5bd (patch) | |
| tree | 87fd2ebe0265bdaa486fb149481f599b1f9ba17f /tests/Test/FragmentSpec.hs | |
| parent | 9bfa2aa7e8a72c9cc08743152a96d18312625712 (diff) | |
| download | graphql-3373c94895c148ffec199842305e10528440e5bd.tar.gz | |
Validate field selections on composite types
Diffstat (limited to 'tests/Test/FragmentSpec.hs')
| -rw-r--r-- | tests/Test/FragmentSpec.hs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/Test/FragmentSpec.hs b/tests/Test/FragmentSpec.hs index 27b08a2..8ee1ad2 100644 --- a/tests/Test/FragmentSpec.hs +++ b/tests/Test/FragmentSpec.hs @@ -108,20 +108,16 @@ spec = do it "embeds inline fragments without type" $ do let sourceQuery = [r|{ - garment { - circumference - ... { - size - } + circumference + ... { + size } }|] - actual <- graphql (toSchema "garment" $ garment "Hat") sourceQuery + actual <- graphql (toSchema "circumference" circumference) sourceQuery let expected = HashMap.singleton "data" $ Aeson.object - [ "garment" .= Aeson.object - [ "circumference" .= (60 :: Int) - , "size" .= ("L" :: Text) - ] + [ "circumference" .= (60 :: Int) + , "size" .= ("L" :: Text) ] in actual `shouldResolveTo` expected |
