Function diana::run_serverless_req[][src]

pub async fn run_serverless_req<C, Q, M, S>(
    body: String,
    raw_auth_header: Option<&str>,
    opts: Options<C, Q, M, S>
) -> ServerlessResponse where
    C: Any + Send + Sync + Clone,
    Q: Clone + ObjectType + 'static,
    M: Clone + ObjectType + 'static,
    S: Clone + SubscriptionType + 'static, 
Expand description

Runs a GraphQL query/mutation in a serverless function. This is deliberately as general as possible so we support basically every serverless function provider. If you’re using AWS Lambda or one of its derivatives (e.g. Netlify), you can use run_aws_req instead for greater convenience. There are no examples for the usage of this function because it’s a primitive. Just provide a request body (which should contain the query, variables, etc.) and the HTTP Authorization header. You don’t need to do any further processing, this function will do the rest.