graphql-engine/server/src-lib/Hasura/GraphQL/Schema
Antoine Leblanc a023a3259d Prevent uses of unsafeMkName whenever possible.
### Description

This PR is the result of a discussion in #3363. Namely, we would like to remove all uses of `unsafeMkName`, or at the very least document every single one of them, to avoid similar issues. To do so, this PR does the following:
- it adds a hlint suggestion not to use that function:
  - suggestions don't mark the PR as failed, but will be shown at review time
  - it is possible to disable that hint with `{- HLINT ignore myFunction "unsafe" -}`
- wherever possible, it removes uses of `unsafeMkName` in favour of `mkName`
- it adds a comment with a tracking issue for the two remaining uses:
  - #3478
  - #3479

### Remaining work

- discuss whether this hint should make the linter step fail, since the linter step isn't required to merge anyway, and there is a way to disable the hint wherever we think the use of that function is acceptable
- check that none of those uses were load-bearing and result in errors now

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3480
GitOrigin-RevId: 0a7e3e9d1a48185764c04ab61e34b58273af347c
2022-01-27 15:13:37 +00:00
..
Action.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00
Backend.hs server/mssql: restrict "count" aggregate query on multiple columns 2022-01-18 14:54:46 +00:00
BoolExp.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00
Build.hs Refactor XOnConflict and ExtraInsertData 2021-12-09 09:06:56 +00:00
Common.hs simplified schema cache representation of remote relationships 2021-12-21 23:15:50 +00:00
Instances.hs Experimental backend adapter 2021-12-22 00:11:28 +00:00
Introspect.hs Prevent uses of unsafeMkName whenever possible. 2022-01-27 15:13:37 +00:00
Mutation.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00
OrderBy.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00
Postgres.hs server: add support for nested object type in action 2021-12-15 23:52:43 +00:00
Remote.hs Fix for customized remote schema input object types in query variables 2022-01-24 04:46:46 +00:00
RemoteRelationship.hs simplified schema cache representation of remote relationships 2021-12-21 23:15:50 +00:00
RemoteRelationship.hs-boot simplified schema cache representation of remote relationships 2021-12-21 23:15:50 +00:00
Select.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00
Table.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00
Update.hs server: cleanup references to "pgCol" in common and non-postgres backend code 2022-01-19 08:38:48 +00:00