graphql-engine/server/tests-py/queries/graphql_query
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
..
agg_perm server/mssql: fix SQL generation for aggregation queries in sql server (fixes #7773 & #7871) 2021-12-02 14:22:42 +00:00
aggregations server: add type information to aggregates and stringify them (closes #5704) 2021-01-18 13:52:51 +00:00
allowlist server: revert the relaxing of unique name constraint in allow-lists 2021-08-03 09:23:20 +00:00
basic server: use placeholder to prevent empty query roots 2022-01-27 18:08:11 +00:00
bigquery distinct_on for BigQuery 2022-01-17 10:02:17 +00:00
boolexp BigQuery operators: like/nlike, geography 2022-01-18 13:37:12 +00:00
caching [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
citus server: fix failing citus test 2021-07-21 15:28:32 +00:00
computed_fields server/postgres: add test case to test computed field with session argument in where expression 2021-09-30 11:27:37 +00:00
custom_schema [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
empty server: use placeholder to prevent empty query roots 2022-01-27 18:08:11 +00:00
enums [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
functions Correctly translate permissions on functions to SQL, and simplify Bool Exp IR 2021-10-18 09:17:42 +00:00
limits server: introduce new custom scalars and remove offsetParser 2021-06-10 16:14:21 +00:00
mysql server: deduplicate some pytests 2021-11-26 19:38:17 +00:00
offset [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
order_by server/postgres: support computed fields in order by 2021-07-27 16:28:23 +00:00
permissions BigQuery remote joins 2021-11-24 16:22:55 +00:00
relay [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
v1alpha1/errors Integration test improvements (for speed/clarity), also increase polling interval for scheduled events 2021-04-27 05:35:26 +00:00