graphql-engine/server/src-lib/Hasura/Backends/MSSQL
Antoine Leblanc 666f4cacb7 Only require MkRootFieldName in top-level functions (that make root fields)
### Description

By definition, root fields are at the root of the schema: only functions that craft root fields need to know about how to customize the name of root fields. However, the presence of `Has MkRootFieldName` in `MonadBuildSchemaBase` meant that the entirety of the schema building code was implicitly aware of / capable of altering root field names.

This PR removes this constraint, and moves it to the functions that do craft root fields. This has several upsides:
- it makes it more explicit where root fields are being crafted
- it prevents functions that should not use this from mistakenly applying it to non-root fields
- it simplifies the shared schema context

### Future work

- can we maybe pass this as an argument, instead of making it a required part of the context?
- ~~AFAICT, we only ever use `mempty` for it: is this actually dead code that we should actually just remove altogether?~~

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5235
GitOrigin-RevId: 4268751f3ab87ae8e03b6fe9e1efa1b096200027
2022-08-03 19:09:50 +00:00
..
DDL Remove strictness annotations from data types in the Hasura.Backends hierarchy 2022-07-29 14:06:23 +00:00
Execute Move SchemaOptions to its own module, remove magic bools 2022-07-14 17:59:01 +00:00
FromIr server: transform enum with upper for graphql-default 2022-07-19 06:56:45 +00:00
Instances Only require MkRootFieldName in top-level functions (that make root fields) 2022-08-03 19:09:50 +00:00
Schema Move RoleName into SchemaContext. 2022-07-29 15:38:44 +00:00
SQL Remove RQL/Types.hs 2022-04-27 13:58:47 +00:00
Types Remove strictness annotations from data types in the Hasura.Backends hierarchy 2022-07-29 14:06:23 +00:00
Connection.hs Remove strictness annotations from data types in the Hasura.Backends hierarchy 2022-07-29 14:06:23 +00:00
DDL.hs Move MkTypename and NamingCase into their own modules. 2022-07-12 14:01:28 +00:00
FromIr.hs Tidy up MSSQL.FromIr 2022-03-10 10:34:52 +00:00
Meta.hs An ErrorMessage type, to encapsulate. 2022-07-18 20:27:06 +00:00
Plan.hs Remove strictness annotations from data types in the Hasura.Backends hierarchy 2022-07-29 14:06:23 +00:00
ToQuery.hs server: fix create event trigger failure on tables with MSSQL reserved keywords as name 2022-06-15 17:11:44 +00:00
Types.hs Add docstrings to the module headers of a few selected mssql modules 2022-01-03 17:17:18 +00:00