Skip to content

Commit a3936ec

Browse files
committed
[Seaography] Docs
1 parent 71b2d2b commit a3936ec

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

Seaography/docs/06-access-control/02-schema-restrictions.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ pub fn schema_builder(..) -> SchemaBuilder {
1212
}
1313
```
1414

15-
You can register entities individually:
15+
The `register_entity_modules` function actually expands to:
16+
17+
```rust
18+
seaography::register_entities!(builder, [actor, address, ..]);
19+
```
20+
21+
You can remove it and register entities individually instead:
1622

1723
```rust
1824
seaography::register_entity!(builder, actor);

Seaography/docs/06-access-control/03-guards.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ impl LifecycleHooksInterface for AccessControlGuard {
3838
action: OperationType, // ⬅ Read, Create, Update, Delete
3939
) -> GuardAction {
4040
match (entity, field, action) {
41-
// block all access on a field
41+
// block all access on a field
4242
("Language", "lastUpdate", _) => GuardAction::Block(None),
43-
// block only update on a field
43+
// block only update on a field
4444
("Language", "name", OperationType::Update) => GuardAction::Block(None),
45-
// custom logic based on context and object value
45+
// custom logic based on context and object value
4646
("Actor", _, _) => {
4747
let permissions = ctx.data::<Permissions>().unwrap();
4848
// ⬆ extract permission from context

Seaography/docs/06-access-control/04-filters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ impl LifecycleHooksInterface for AccessControlHook {
2828
}
2929
```
3030

31-
This method is called on Read, Create, Update, Delete. So you can apply conditional logic based on operation performed and other information from context.
31+
This method is called on Read, Create, Update, Delete. So you can apply conditional logic based on operation performed and other contextual information.

Seaography/docs/06-access-control/05-rbac.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ version = "~2.0.0-rc" # seaography version
1212
features = ["rbac"]
1313
```
1414

15-
After connecting to the database, you should initialize RBAC for the connection before creating the schema:
15+
After connecting to the database, you should initialize RBAC rules for the connection before creating the schema:
1616

1717
```rust
1818
let db = Database::connect(db_url).await?;
@@ -25,7 +25,7 @@ In the GraphQL handler, you have to inject a `UserContext`:
2525
```rust
2626
async fn graphql_handler(..) -> Result<..> {
2727
let mut req = req.into_inner();
28-
req = req.data(seaography::UserContext { user_id }); // ⬅ this user id is used in RBAC
28+
req = req.data(seaography::UserContext { user_id }); // ⬅ this user id is used by RBAC engine
2929
schema.execute(req).await.into()
3030
}
3131
```

Seaography/docs/06-access-control/06-considerations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ By layering these approaches, you can tailor Seaography's authorization model to
4949

5050
## Professional Support
5151

52-
If you need technical advice and support, youre welcome to [consult with SeaQL.org](mailto:[email protected]). Our team can help you adopt and unlock the full potential of the Rust + SeaQL ecosystem by providing expert consulting to support your software development.
52+
If you need technical advice and support, you're welcome to [consult with SeaQL.org](mailto:[email protected]). Our team can help you adopt and unlock the full potential of the Rust + SeaQL ecosystem by providing expert consulting to support your software development.

Seaography/docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function getNextMinorVersionName() {
88

99
/** @type {import('@docusaurus/types').Config} */
1010
const config = {
11-
title: 'Seaography 🧭 A GraphQL framework for SeaORM',
12-
tagline: '🧭 Seaography is a GraphQL framework for SeaORM',
11+
title: 'Seaography 🧭 A GraphQL framework for Rust',
12+
tagline: '🧭 Seaography is a GraphQL framework for Rust',
1313
url: 'https://www.sea-ql.org',
1414
baseUrl: '/Seaography/',
1515
onBrokenLinks: 'throw',

0 commit comments

Comments
 (0)