graphql-engine/server/tests-py/queries/remote_schemas/permissions
Samir Talwar eab4f75212 An ErrorMessage type, to encapsulate.
This introduces an `ErrorMessage` newtype which wraps `Text` in a manner which is designed to be easy to construct, and difficult to deconstruct.

It provides functionality similar to `Data.Text.Extended`, but designed _only_ for error messages. Error messages are constructed through `fromString`, concatenation, or the `toErrorValue` function, which is designed to be overridden for all meaningful domain types that might show up in an error message. Notably, there are not and should never be instances of `ToErrorValue` for `String`, `Text`, `Int`, etc. This is so that we correctly represent the value in a way that is specific to its type. For example, all `Name` values (from the _graphql-parser-hs_ library) are single-quoted now; no exceptions.

I have mostly had to add `instance ToErrorValue` for various backend types (and also add newtypes where necessary). Some of these are not strictly necessary for this changeset, as I had bigger aspirations when I started. These aspirations have been tempered by trying and failing twice.

As such, in this changeset, I have started by introducing this type to the `parseError` and `parseErrorWith` functions. In the future, I would like to extend this to the `QErr` record and the various `throwError` functions, but this is a much larger task and should probably be done in stages.

For now, `toErrorMessage` and `fromErrorMessage` are provided for conversion to and from `Text`, but the intent is to stop exporting these once all error messages are converted to the new type.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5018
GitOrigin-RevId: 84b37e238992e4312255a87ca44f41af65e2d89a
2022-07-18 20:27:06 +00:00
..
argument_presets An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
inheritance An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
remote_relationships An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
schema_customization An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
update_remote_schema server, console, docs: add update_remote_schema API 2021-06-21 17:42:40 +00:00
add_permission_with_dangling_fields.yaml Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions 2020-12-21 09:12:35 +00:00
add_permission_with_valid_subset_of_arguments.yaml Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions 2020-12-21 09:12:35 +00:00
add_permission_with_valid_subset_of_fields.yaml Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions 2020-12-21 09:12:35 +00:00
argument_preset_validation.yaml server: move remote schema permissions APIs to /v1/metadata 2021-01-18 10:39:29 +00:00
execution_with_partial_args_exposed_to_role.yaml An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
execution_with_partial_fields_exposed_to_role_cached.yaml Adds integration test for caching remote schema queries 2021-06-22 21:11:02 +00:00
execution_with_partial_fields_exposed_to_role.yaml An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
role_based_schema_enum_validations.yaml server: move remote schema permissions APIs to /v1/metadata 2021-01-18 10:39:29 +00:00
role_based_schema_input_object_validation.yaml server: fix empty remote input objects (fixes #6029, #6703) 2021-04-21 01:17:01 +00:00
role_based_schema_interface_validation.yaml server: move remote schema permissions APIs to /v1/metadata 2021-01-18 10:39:29 +00:00
role_based_schema_object_validation.yaml server: fix empty remote input objects (fixes #6029, #6703) 2021-04-21 01:17:01 +00:00
role_based_schema_scalar_validation.yaml server: move remote schema permissions APIs to /v1/metadata 2021-01-18 10:39:29 +00:00
role_based_schema_union_validation.yaml server: move remote schema permissions APIs to /v1/metadata 2021-01-18 10:39:29 +00:00
setup.yaml Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions 2020-12-21 09:12:35 +00:00
teardown.yaml Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions 2020-12-21 09:12:35 +00:00
unknown_role_execution.yaml An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00