public async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log, CancellationToken cancellationToken) { return(await _graphQLFunctions.ExecuteFunctionsQueryAsync( req.HttpContext, cancellationToken)); }
public async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log, [CosmosDB( databaseName: "trivia", collectionName: "questions", ConnectionStringSetting = "CosmosDBConnection")] DocumentClient client, CancellationToken cancellationToken) { return(await _graphQLFunctions.ExecuteFunctionsQueryAsync( req.HttpContext, new Dictionary <string, object> { { "client", client }, { "log", log } }, cancellationToken)); }