INNER CODE UNIT · Rust
get_conn_from_ctx
rkudryashov/graphql-rust-demo · auth-service/src/lib.rs:64
pub fn get_conn_from_ctx(ctx: &Context<'_>) -> PooledConnection<ConnectionManager<PgConnection>> {
ctx.data::<PgPool>()
.expect("Can't get pool")
.get()
.expect("Can't get DB connection")
}