graphql-engine/server
Antoine Leblanc c64f66774b [gardening] remove ToJSON constraint in spockAction (fix #1581)
### Description

The spock handler requires the request type to have a `ToJSON` instance AND a `FromJSON` instance. That's because we parse it from the received bytestring into its proper type.... and call `toJSON` on it to log it. This PR simplifies this, by keeping the intermediate `Value` obtained during parsing, and using it for logging. This has two consequences:

1. it removes the `ToJSON` constraint, which will remove some code down the line (esp. in Metadata)
2. it means we log the actual JSON object query we received, not the result of parsing it, meaning the logged object will contain fields that would have been ignored when parsing the actual value; this is both an upside (more accurate log) and a downside (could be more verbose / more confusing)

### Further work

Should this PR also remove all obsolete ToJSON instances while at it?
How do we test this?

https://github.com/hasura/graphql-engine-mono/pull/1664

GitOrigin-RevId: ae099eea9a671eabadcdf507f993a5ad9433be87
2021-07-05 18:47:55 +00:00
..
bench-wrk server: generalize integration tests 2021-03-11 18:18:41 +00:00
packaging build: use the debian buster version in the docker image 2021-05-27 07:50:15 +00:00
src-bench-cache server: make more use of hlint (#6059) 2020-10-28 16:40:33 +00:00
src-exec server: reorganise version embedding for fewer [TH] rebuilds 2021-06-29 16:40:47 +00:00
src-lib [gardening] remove ToJSON constraint in spockAction (fix #1581) 2021-07-05 18:47:55 +00:00
src-rsr Use exceptions to handle compatibility with pg 9.6 in 2.0 upgrade migration 2021-06-24 02:20:11 +00:00
src-test server: reorganise version embedding for fewer [TH] rebuilds 2021-06-29 16:40:47 +00:00
tests-py server: add query field to http-log and websocket-log 2021-07-02 13:05:57 +00:00
.dockerignore update packages (#251) 2018-08-08 13:10:13 +05:30
.gitignore server/citus: feature branch 2021-05-21 02:47:51 +00:00
.hlint.yaml ci: improve hlint messages 2021-05-04 21:52:55 +00:00
.stylish-haskell.yaml ci: run stylish haskell on all incoming PRs 2021-01-21 23:37:26 +00:00
cabal.project server: Updates 'pg-client-hs', fixes explicit conversions 2021-06-18 17:00:24 +00:00
cabal.project.ci update resource limits on circleci [force ci] 2021-01-29 14:36:07 +00:00
cabal.project.dev server: Bump GHC version to 8.10.2 (#5659) 2020-08-26 23:16:23 -05:00
cabal.project.dev-sh dev.sh: restore code coverage functionality 2020-01-23 18:35:18 -05:00
cabal.project.dev-sh.freeze dev.sh: restore code coverage functionality 2020-01-23 18:35:18 -05:00
cabal.project.dev-sh.local ci: improve compilation times by building a dynamic executable 2021-03-22 21:43:43 +00:00
cabal.project.freeze server: graceful shutdown for event and cron triggers and async action (II) 2021-05-14 09:39:33 +00:00
commit_diff.txt Rewrite GraphQL schema generation and query parsing (close #2801) (#4111) 2020-08-21 12:27:01 -05:00
CONTRIBUTING.md update contributing.md with server dependencies 2021-05-25 14:00:33 +00:00
graphql-engine.cabal server: reorganise version embedding for fewer [TH] rebuilds 2021-06-29 16:40:47 +00:00
Makefile server: add MSSQL support 2021-02-23 17:38:36 +00:00
sample.hie.yaml Merge oss/master onto mono/main 2020-11-12 22:37:19 +05:30
Setup.hs move raven into graphql-engine repo 2018-06-28 00:32:00 +05:30
STYLE.md server: Add a Haskell style guide (#2175) 2020-04-08 02:31:30 -05:00