mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-20 15:09:02 +03:00
Add fallback for unrecognised types in BigQuery
RestArgument
decoder
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5042 GitOrigin-RevId: 45efb6dff9fbe8e2ec10356921e5c61b2af1bcda
This commit is contained in:
parent
6b03f8b0af
commit
2e940f88c4
@ -59,6 +59,7 @@
|
||||
### Bug fixes and improvements
|
||||
|
||||
- server: use `root_field_namespace` as prefix for remote schema (fixes #8438)
|
||||
- server: allow all argument types for BigQuery routines
|
||||
- server: fix prefix/suffix behaviour for `graphql-default` naming convention (fixes #8544)
|
||||
- server: fix namespace visibility during introspection (fix #8434)
|
||||
- server: Create missing SQL triggers, if any, while reloading metadata and startup.
|
||||
|
@ -316,7 +316,14 @@ instance FromJSON RestArgument where
|
||||
( \o -> do
|
||||
name <- o .:? "name"
|
||||
typeObject <- o .:? "dataType"
|
||||
type' <- mapM (.: "typeKind") typeObject
|
||||
|
||||
-- (Hopefully) very temporary fix: right now, we don't have an
|
||||
-- understanding of @ARRAY@ as a 'RestType', which is causing issues
|
||||
-- in production. With this change, we ignore any BigQuery argument
|
||||
-- types that we don't recognise. While not ideal, this should be
|
||||
-- safe, as we shouldn't get types from BigQuery that it can't itself
|
||||
-- understand.
|
||||
type' <- mapM (.: "typeKind") typeObject <|> pure Nothing
|
||||
pure $ RestArgument name type'
|
||||
)
|
||||
|
||||
@ -336,7 +343,14 @@ instance FromJSON RestStandardSqlField where
|
||||
( \o -> do
|
||||
name <- o .:? "name"
|
||||
typeObject <- o .:? "type"
|
||||
type' <- mapM (.: "typeKind") typeObject
|
||||
|
||||
-- (Hopefully) very temporary fix: right now, we don't have an
|
||||
-- understanding of @ARRAY@ as a 'RestType', which is causing issues
|
||||
-- in production. With this change, we ignore any BigQuery argument
|
||||
-- types that we don't recognise. While not ideal, this should be
|
||||
-- safe, as we shouldn't get types from BigQuery that it can't itself
|
||||
-- understand.
|
||||
type' <- mapM (.: "typeKind") typeObject <|> pure Nothing
|
||||
pure $ RestStandardSqlField name type'
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user