mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-23 23:43:44 +03:00
e5c1106864
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4614 GitOrigin-RevId: f7828d4c0bbf4c46059b08b86b22915cc8de3cbf
18 lines
662 B
Haskell
18 lines
662 B
Haskell
module Test.QuerySpec (spec) where
|
|
|
|
import Control.Monad (when)
|
|
import Hasura.Backends.DataConnector.API (Capabilities (..), Config, Routes (..), SourceName)
|
|
import Servant.API (NamedRoutes)
|
|
import Servant.Client (Client)
|
|
import Test.Hspec
|
|
import Test.QuerySpec.BasicSpec qualified
|
|
import Test.QuerySpec.RelationshipsSpec qualified
|
|
import Prelude
|
|
|
|
spec :: Client IO (NamedRoutes Routes) -> SourceName -> Config -> Capabilities -> Spec
|
|
spec api sourceName config Capabilities {..} = do
|
|
describe "query API" do
|
|
Test.QuerySpec.BasicSpec.spec api sourceName config
|
|
when (dcRelationships) $
|
|
Test.QuerySpec.RelationshipsSpec.spec api sourceName config
|