mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
get_source_tables
API call, don't fold table names.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5837 GitOrigin-RevId: 9f785793a279c4016d8ed88374d2442019489252
This commit is contained in:
parent
8729301ad6
commit
fb3ba23a44
@ -40,7 +40,6 @@ import Data.Has
|
||||
import Data.HashMap.Strict qualified as HM
|
||||
import Data.HashMap.Strict.InsOrd qualified as InsOrdHashMap
|
||||
import Data.HashMap.Strict.InsOrd qualified as OMap
|
||||
import Data.List.NonEmpty qualified as NonEmpty
|
||||
import Data.Text.Extended
|
||||
import Data.Text.Extended qualified as Text.E
|
||||
import Hasura.Backends.DataConnector.API qualified as API
|
||||
@ -368,8 +367,7 @@ runGetSourceTables GetSourceTables {..} = do
|
||||
$ (Servant.Client.genericClient // API._schema) (Text.E.toTxt _gstSourceName) apiConfig
|
||||
|
||||
let fullyQualifiedTableNames = fmap API.dtiName $ API.srTables schemaResponse
|
||||
tableNames = fmap (fold . NonEmpty.intersperse "." . API.unTableName) fullyQualifiedTableNames
|
||||
pure $ EncJSON.encJFromJValue tableNames
|
||||
pure $ EncJSON.encJFromJValue fullyQualifiedTableNames
|
||||
backend -> Error.throw500 ("Schema fetching is not supported for '" <> Text.E.toTxt backend <> "'")
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -79,17 +79,17 @@ schemaInspectionTests opts = describe "Schema and Source Inspection" $ do
|
||||
|]
|
||||
)
|
||||
[yaml|
|
||||
- Artist
|
||||
- Album
|
||||
- Customer
|
||||
- Employee
|
||||
- Genre
|
||||
- Invoice
|
||||
- InvoiceLine
|
||||
- MediaType
|
||||
- Playlist
|
||||
- PlaylistTrack
|
||||
- Track
|
||||
- - Artist
|
||||
- - Album
|
||||
- - Customer
|
||||
- - Employee
|
||||
- - Genre
|
||||
- - Invoice
|
||||
- - InvoiceLine
|
||||
- - MediaType
|
||||
- - Playlist
|
||||
- - PlaylistTrack
|
||||
- - Track
|
||||
|]
|
||||
|
||||
describe "get_table_info" $ do
|
||||
|
Loading…
Reference in New Issue
Block a user