graphql-engine/server/src-lib/Hasura/GraphQL
Brandon Simmons 4d2dbe68fa
Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097)
Writing to a mutable var is a particularly potent source of leaks since
it mostly defeats GHC's analysis. Here we add assertions to all mutable
writes, and fix a couple spots where we wrote some thunks to a mutable
var (compiled with -O2).

Some of these thunks were probably benign, but others looked liked they
might be retaining big args. Didn't do much analysis, just fixed.

Actually pretty happy with how easy this was to use and as a diagnostic,
once I sorted out some issues. We should consider using it elsewhere,
and maybe extending so that we can use it with tests, enable when
`-fenable-assertsions` etc.

Relates #3388

Also simplified codepaths that use `AcceptWith`, which has unnecessary
`Maybe` fields.
2020-03-17 20:31:22 -05:00
..
Execute Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097) 2020-03-17 20:31:22 -05:00
Resolve auto-include __typename field in custom types' objects (fix #4063) (#4074) 2020-03-11 17:09:00 +05:30
Schema auto-include __typename field in custom types' objects (fix #4063) (#4074) 2020-03-11 17:09:00 +05:30
Transport Use AssertNF for leak prophylaxis when doing mutable writes. Closes #3937 (#4097) 2020-03-17 20:31:22 -05:00
Validate auto-include __typename field in custom types' objects (fix #4063) (#4074) 2020-03-11 17:09:00 +05:30
Context.hs allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
Execute.hs allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
Explain.hs Add caching for recreating event trigger functions 2020-01-08 16:45:46 -06:00
Logging.hs refactor some internal components (#3414) 2019-11-26 17:44:21 +05:30
RemoteServer.hs auto-include __typename field in custom types' objects (fix #4063) (#4074) 2020-03-11 17:09:00 +05:30
Resolve.hs allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
Schema.hs allow custom mutations through actions (#3042) 2020-02-13 23:08:23 +05:30
Utils.hs Refactor schema cache construction to avoid imperative updates 2020-01-08 16:43:06 -06:00
Validate.hs Track variable uses within query validation for caching (fix #3097) (#3135) 2019-10-16 09:33:34 -05:00