コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }