graphql-engine/v3/crates/lang-graphql/benches
Philip Lykke Carlsen 18efbe9380 Add ability to override interpretations of roles (#660)
This PR refactors the schema crate to enable overriding the
interpretation of roles at runtime.

By providing a `NamespacedGetter` that ignores roles entirely (i.e.
`GDSNamespacedGetterAgnostic`) to schema generation functions it is
possible to derive a GraphQL schema that ignores permissions and
presets.

This PR leaves back a few opportunities to improve code clarity, which I
hope to address in follow-up PRs.
For instance, it seems superfluous to make sense for generic code
parametrised `<S: SchemaContext>` to carry around both a `S::Namespace`
and a `S::NamespaceGetter`, when all that code could ever do with that
`S::Namespace` value anyway is apply it to the `S::NamespaceGetter`.
Taking this line of reasoning to its conclusion suggests that we can
reduce the complexity of `trait SchemaContext` and its associated types
and kit.

---------

Co-authored-by: Samir Talwar <samir.talwar@hasura.io>
V3_GIT_ORIGIN_REV_ID: c84555fd88279582670919faa5a62bbd00b714bd
2024-06-04 13:04:36 +00:00
..
queries Format everything with Prettier. (#530) 2024-04-30 14:58:57 +00:00
validation/introspection Format everything with Prettier. (#530) 2024-04-30 14:58:57 +00:00
lexer.rs Move all crates into a folder (#355) 2024-03-19 18:07:14 +00:00
parser.rs Move all crates into a folder (#355) 2024-03-19 18:07:14 +00:00
schema_serde.rs Move a couple of lint suppressions closer to the code. (#658) 2024-06-03 12:16:14 +00:00
validation.rs Add ability to override interpretations of roles (#660) 2024-06-04 13:04:36 +00:00