fix browse rows: avoid filtering columns without graphql type

[DSF-445]: https://hasurahq.atlassian.net/browse/DSF-445?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9682
GitOrigin-RevId: 738095c5f8f7fccd0c0798ec9c1b89eb2db0278b
This commit is contained in:
Luca Restagno 2023-06-27 22:36:26 +02:00 committed by hasura-bot
parent d4e368324d
commit 926b02755d

View File

@ -35,7 +35,12 @@ export const fetchRows = async ({
// Filter out columns that are objects or arrays
// We do this because generateGraphQLSelectQuery cannot handle those types
// TODO: Remove this filter once we improve generateGraphQLSelectQuery
.filter(isScalarGraphQLType)
.filter(column => {
if (typeof column.graphQLProperties?.graphQLType !== 'undefined') {
return isScalarGraphQLType(column);
}
return true;
})
.map(column => column.name),
options,
});