mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
a8d1002175
In preparation for tightening up the various ways in which we construct and work with session variables, I am trying to move the behavior into the same module(s) as the data types, so that we can avoid exposing the internals of data structures in favor of smart constructors and conversions. The session variable code was split between `Hasura.RQL.Types.Roles`, `Hasura.RQL.Types.Session`, and `Hasura.Session`, with the first two containing most of the data structures (and some logic) and the latter containing the rest of the logic. These files do not interact with the rest of `Hasura.RQL`, though they are depended upon by that namespace. I have refactored these files into a new namespace, `Hasura.Authentication`. It now looks like this: 1. Role types are now in `Hasura.Authentication.Role`. 2. Header constants were moved from `Hasura.Server.Utils` to `Hasura.Authentication.Headers` (plural) to avoid cycles. 3. Header logic was moved from various places into `Hasura.Authentication.Header` (singular) for the same reason. 4. Session variable types and logic live together in `Hasura.Authentication.Session`. 5. User info types and logic live together in `Hasura.Authentication.User`. This new structure is cycle-free and generally avoids importing the rest of the code, which means we should be able to start pruning the list of exports and locking down session variable construction. No behavior was changed in this changeset. The majority of changes are to the imports in a number of files; everything depends on these things. By splitting into multiple files, we also reduce the surface area of an individual import, which was a pleasant side-effect of this work. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10960 GitOrigin-RevId: 7cb962c06483cd9b92b80432aed5cabecb465cda |
||
---|---|---|
.. | ||
aeson-ordered | ||
api-tests | ||
arrows-extra | ||
ci-info | ||
dc-api | ||
ekg-json | ||
ekg-prometheus | ||
graphql-parser | ||
hasura-base | ||
hasura-error-message | ||
hasura-extras | ||
hasura-json-encoding | ||
hasura-prelude | ||
incremental | ||
pg-client | ||
resource-pool | ||
schema-parsers | ||
test-harness | ||
upgrade-tests |