graphql-engine/server/tests-py/queries/graphql_query/empty
Antoine Leblanc d66d2d81fd server: use placeholder to prevent empty query roots
### Description

The GraphQL spec has to conflicting requirements:
1. an object must contain at least one field: the schema may not contain empty objects
2. the _query_root_ must always be present

Given _1_, the schema generation code removes from the schema all fields that would result in empty objects, such as a table for which a user does not have select permissions. But, as a result, our code also potentially removes _query_root_ if it is empty, breaking _2_.

This PR introduces a dummy "placeholder" field in the query root if it's empty, to ensure we never remove it from the schema.

### Remaining work

- [x] changelog entry
- [x] tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/148
GitOrigin-RevId: bfd6bfcc2f3de92900b6ba566012f093399ca037
2022-01-27 18:08:11 +00:00
..
check_no_empty_roots.yaml Prevent empty subscription roots (fix hasura/graphql-engine#6898) 2021-09-16 07:42:46 +00:00
select_placeholder.yaml server: use placeholder to prevent empty query roots 2022-01-27 18:08:11 +00:00