graphql-engine/server/src-lib/Hasura/Server
Samir Talwar 40617719ef server: Remove the Show instance from QErr and anything that touches it.
We only use these `Show` instances in error messages (where we call
`show` explicitly anyway) and test cases (in which Hspec requires `Show
a` for any `a` in an assertion).

This removes the instance in favor of a custom `showQErr` function
(which serializes the error to JSON). It is then used in certain error
message production which previously called `show` on a `QErr`.

There are two places where we serialize a QErr and then construct a new
QErr from the resulting string. Instead, we modify the existing QErr to
add extra information.

An orphan `Show QErr` instance is retained for tests so that we can have
nice test failure messages.

This is preparation for future changes in which the error message within
`QErr` will not be exposed directly, and therefore will not have a
`Show` instance. That said, it feels like a sensible kind of cleanup
anyway.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4897
GitOrigin-RevId: 8f79f7a356f0aea571156f39aefac242bf751f3a
2022-07-01 11:48:26 +00:00
..
API server: GHC 9.2 changes compatible with 8.10 (#3550) 2022-06-25 22:09:05 +00:00
Auth server: Fix a bunch of HLint suggestions 2022-06-21 11:12:42 +00:00
Init Monomorphize Some Hge Options 2022-07-01 03:40:46 +00:00
Migrate server: Encapsulate catalog versions in their own type. 2022-06-29 08:19:33 +00:00
Telemetry server/telemetry: support multiple sources 2022-06-15 08:03:31 +00:00
App.hs Rewrite OpenAPI 2022-06-30 12:57:09 +00:00
Auth.hs server: assorted minor clean-up around HTTP managers 2022-02-16 07:09:47 +00:00
CheckUpdates.hs Yeet some default-extensions 2022-03-16 00:40:17 +00:00
Compression.hs server, pro: actually reformat the code-base using ormolu 2021-09-23 22:57:37 +00:00
Cors.hs Yeet some default-extensions 2022-03-16 00:40:17 +00:00
Init.hs Monomorphize Some Hge Options 2022-07-01 03:40:46 +00:00
Limits.hs server: add explicit export lists in OSS server and enforce with warning 2021-11-04 16:09:38 +00:00
Logging.hs server: Remove the Show instance from QErr and anything that touches it. 2022-07-01 11:48:26 +00:00
MetadataOpenAPI.hs server: initial set of DTO types for metadata 2022-06-27 16:33:31 +00:00
Metrics.hs server: add metric for the metadata resource version 2022-03-08 23:00:27 +00:00
Middleware.hs server: assorted minor clean-up around HTTP managers 2022-02-16 07:09:47 +00:00
Migrate.hs server: Encapsulate catalog versions in their own type. 2022-06-29 08:19:33 +00:00
Name.hs server: Reorganize quasi-quoted names. 2022-06-23 09:15:31 +00:00
OpenAPI.hs Rewrite OpenAPI 2022-06-30 12:57:09 +00:00
Rest.hs server: Reorganize quasi-quoted names. 2022-06-23 09:15:31 +00:00
SchemaCacheRef.hs Add unless/when related hints 2022-05-27 13:34:42 +00:00
SchemaUpdate.hs server: Remove the Show instance from QErr and anything that touches it. 2022-07-01 11:48:26 +00:00
Telemetry.hs Remove source cache requirement in action schema 2022-06-23 10:52:32 +00:00
Types.hs server/telemetry: support multiple sources 2022-06-15 08:03:31 +00:00
Utils.hs Weeding (2/?) 2022-06-09 16:40:49 +00:00
Version.hs server/ci: rework version baking, and cache dist-newstyle in CI 2022-04-05 15:59:09 +00:00