Skip to content

Commit 531e8b0

Browse files
committed
Fix docs tests
1 parent 14353ec commit 531e8b0

File tree

5 files changed

+0
-193
lines changed

5 files changed

+0
-193
lines changed

docs/en/src/SUMMARY.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
- [Extensions](extensions.md)
3333
- [How extensions are working](extensions_inner_working.md)
3434
- [Available extensions](extensions_available.md)
35-
- [Integrations](integrations.md)
36-
- [Poem](integrations_to_poem.md)
37-
- [Warp](integrations_to_warp.md)
38-
- [Actix-web](integrations_to_actix_web.md)
3935
- [Advanced topics](advanced_topics.md)
4036
- [Custom scalars](custom_scalars.md)
4137
- [Optimizing N+1 queries](dataloader.md)

docs/en/src/context.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -55,41 +55,6 @@ let schema = Schema::build(Query::default(), EmptyMutation, EmptySubscription)
5555
.finish();
5656
```
5757

58-
### Request data
59-
60-
You can put data inside the context at the execution of the request, it's useful for authentication data for instance.
61-
62-
A little example with a `warp` route:
63-
64-
```rust
65-
# extern crate async_graphql;
66-
# extern crate async_graphql_warp;
67-
# extern crate warp;
68-
# use async_graphql::*;
69-
# use warp::{Filter, Reply};
70-
# use std::convert::Infallible;
71-
# #[derive(Default, SimpleObject)]
72-
# struct Query { name: String }
73-
# struct AuthInfo { pub token: Option<String> }
74-
# let schema = Schema::build(Query::default(), EmptyMutation, EmptySubscription).finish();
75-
# let schema_filter = async_graphql_warp::graphql(schema);
76-
let graphql_post = warp::post()
77-
.and(warp::path("graphql"))
78-
.and(warp::header::optional("Authorization"))
79-
.and(schema_filter)
80-
.and_then( |auth: Option<String>, (schema, mut request): (Schema<Query, EmptyMutation, EmptySubscription>, async_graphql::Request)| async move {
81-
// Do something to get auth data from the header
82-
let your_auth_data = AuthInfo { token: auth };
83-
let response = schema
84-
.execute(
85-
request
86-
.data(your_auth_data)
87-
).await;
88-
89-
Ok::<_, Infallible>(async_graphql_warp::GraphQLResponse::from(response))
90-
});
91-
```
92-
9358
## Headers
9459

9560
With the Context you can also insert and appends headers.

docs/en/src/integrations_to_actix_web.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

docs/en/src/integrations_to_poem.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

docs/en/src/integrations_to_warp.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)