graphql-engine/server/tests-py/queries
Lyndon Maydwell 0c1016e065 Inconsistent metadata support for REST endpoints
Previously invalid REST endpoints would throw errors during schema cache build.

This PR changes the validation to instead add to the inconsistent metadata objects in order to allow use of `allow_inconsistent_metadata` with inconsistent REST endpoints.

All non-fatal endpoint definition errors are returned as inconsistent metadata warnings/errors depending on the use of `allow_inconsistent_metadata`. The endpoints with issues are then created and return informational runtime errors when they are called.

Console impact when creating endpoints is that error messages now refer to metadata inconsistencies rather than REST feature at the top level:

![image](https://user-images.githubusercontent.com/92299/109911843-ede9ec00-7cfe-11eb-9c55-7cf924d662a6.png)

<img width="969" alt="image" src="https://user-images.githubusercontent.com/92299/110258597-8336fa00-7ff7-11eb-872c-bfca945aa0e8.png">

Note: Conflicting endpoints generate one error per conflicting set of endpoints due to the implementation of `groupInconsistentMetadataById` and `imObjectIds`. This is done to ensure that error messages are terse, but may pose errors if there are some assumptions made surrounding `imObjectIds`.

Related to https://github.com/hasura/graphql-engine-mono/pull/473 (Allow Inconsistent Metadata (v2) #473 (Merged))

---

### Kodiak commit message

Changes the validation to use inconsistent metadata objects for REST endpoint issues.

#### Commit title

Inconsistent metadata for REST endpoints

GitOrigin-RevId: b9de971208e9bb0a319c57df8dace44cb115ff66
2021-03-10 05:26:10 +00:00
..
actions Fix action relationship type and input arguments (closes #6402) (#284) 2021-01-18 06:57:24 +00:00
compression [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
endpoints Inconsistent metadata support for REST endpoints 2021-03-10 05:26:10 +00:00
event_triggers server: template the schema and table names in the event trigger PG functions 2021-01-06 20:22:34 +00:00
explain [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
graphql_introspection [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
graphql_mutation [Preview] Inherited roles for postgres read queries 2021-03-08 11:15:10 +00:00
graphql_query [Preview] Inherited roles for postgres read queries 2021-03-08 11:15:10 +00:00
graphql_validation [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
heterogeneous [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
horizontal_scale/basic sync metadata cache across multiple instances connected to same db (closes #1182) (#1574) 2019-03-12 11:16:27 +05:30
inconsistent_objects server: support mssql views 2021-03-05 10:53:38 +00:00
logging [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
query_cache Caching, Rate Limiting, Metrics & Session Variable Improvements (#376) 2021-02-13 00:06:18 +00:00
remote_schemas server: fix issue when remote relationship col has a custom GQL name 2021-03-09 09:25:29 +00:00
schema/duplication add tests 2020-09-01 17:13:42 +05:30
subscriptions [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
unauthorized_role [server] coalesce multiple run_sql calls in tests (#270) 2021-01-06 16:07:22 +00:00
v1 server: support mssql views 2021-03-05 10:53:38 +00:00
webhooks/request_context pass gql requests into auth webhook POST body (#149) 2021-02-03 07:11:39 +00:00
clear_db.yaml python based tests (#387) 2018-09-18 11:51:57 +05:30