graphql-engine/server/tests-py/queries
Lyndon Maydwell 08da0c63b6 REST Endpoints - Prohibit Invalid slashes, duplicate variables, non-singular query definitions, subscriptions
Resolves Issues:

* https://github.com/hasura/graphql-engine-mono/issues/658 - Invalid Slashes
* https://github.com/hasura/graphql-engine-mono/issues/628 - Subscriptions

Implementation:

* Moved some logic from Endpoint.hs to allow reuse of splitting url into PathSegments.
* Additional validation steps alongside checking for overlapping routes
* Logging potential misuse of GET for mutations

Future Work:

* [ ] GET is allowed for mutations (Ignore/Log warning for Now)
* [ ] Add to scInconsistentObjs rather than throwing error
  * Add information to scInconsistentObjs instead of raising errors directly.

TODO:

* [x] Duplicate variable segments with the same name in the location should not be allowed
* [x] We should throw an error on trailing and leading slashes and URLs which contain empty segments
* [x] Endpoints can be created using subscriptions. But the error only shows at the time of the query
* [x] Tests

---

### Kodiak commit message

Prohibit Invalid slashes, duplicate variables, subscriptions for REST endpoints.

GitOrigin-RevId: 86c0d4af97984c8afd02699e6071e9c1658710b8
2021-02-24 04:31:05 +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 REST Endpoints - Prohibit Invalid slashes, duplicate variables, non-singular query definitions, subscriptions 2021-02-24 04:31:05 +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 server: run function permissions tests in CI 2021-02-18 08:27:00 +00:00
graphql_query server: fix issue with queries on character column types (close #6217) 2021-02-22 10:21:21 +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 separate metadata database and server code setup for multi sources (#197) 2020-12-28 12:56:55 +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: Remote relationships permissions 2021-01-19 20:57:58 +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: fix issue with queries on character column types (close #6217) 2021-02-22 10:21:21 +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