mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-20 05:51:54 +03:00
6586053296
> ## Description ✍️ - Creates a new `/capabilities` endpoint for the GDC agent API - Removes capabilities from the `/schema` endpoint - Removes the `/config-schema` endpoint and includes the `ConfigSchemaResponse` within the `CapabilitiesResponse` ### Related Issues ✍ -> https://hasurahq.atlassian.net/browse/GDW-85 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4478 GitOrigin-RevId: 426662ee9e751343d94207d439a5025df65d2de7
17 lines
667 B
Haskell
17 lines
667 B
Haskell
module Test.SchemaSpec (spec) where
|
|
|
|
import Data.List (sortOn)
|
|
import Hasura.Backends.DataConnector.API (Config, Routes (..), SchemaResponse (..), SourceName, TableInfo (..))
|
|
import Servant.API (NamedRoutes)
|
|
import Servant.Client (Client, (//))
|
|
import Test.Data qualified as Data
|
|
import Test.Hspec (Spec, describe, it)
|
|
import Test.Hspec.Expectations.Pretty (shouldBe)
|
|
import Prelude
|
|
|
|
spec :: Client IO (NamedRoutes Routes) -> SourceName -> Config -> Spec
|
|
spec api sourceName config = describe "schema API" $ do
|
|
it "returns Chinook schema" $ do
|
|
tables <- (sortOn dtiName . srTables) <$> (api // _schema) sourceName config
|
|
tables `shouldBe` Data.schemaTables
|