graphql-engine/server/src-lib/Hasura/Backends/Postgres
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
..
Connection PG SSL-cert maybe fields 2022-06-28 01:26:03 +00:00
DDL server: Remove the Show instance from QErr and anything that touches it. 2022-07-01 11:48:26 +00:00
Execute server/postgres: parameterise array variables in queries/subscriptions 2022-06-29 13:37:11 +00:00
Instances Break up class BackendSchema in two 2022-06-30 15:23:35 +00:00
Schema Break up class BackendSchema in two 2022-06-30 15:23:35 +00:00
SQL server/postgres: parameterise array variables in queries/subscriptions 2022-06-29 13:37:11 +00:00
Translate server: Fix a bunch of HLint suggestions 2022-06-21 11:12:42 +00:00
Types server: add infrastructure to write runit tests for update parsers 2022-05-26 14:06:24 +00:00
Connection.hs server: split the Postgres Connection module 2022-03-09 07:15:17 +00:00
DDL.hs Evie/postgres/module docs 2022-02-08 09:25:35 +00:00