mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 12:31:52 +03:00
666f4cacb7
### 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 |
||
---|---|---|
.. | ||
Action.hs | ||
Backend.hs | ||
BoolExp.hs | ||
Build.hs | ||
Common.hs | ||
Instances.hs | ||
Introspect.hs | ||
Mutation.hs | ||
NamingCase.hs | ||
Node.hs | ||
Options.hs | ||
OrderBy.hs | ||
Parser.hs | ||
Postgres.hs | ||
Relay.hs | ||
Remote.hs | ||
RemoteRelationship.hs | ||
Select.hs | ||
SubscriptionStream.hs | ||
Table.hs | ||
Typename.hs | ||
Update.hs |