Eklee.Azure.Functions.GraphQl
0.1.0
See the version list below for details.
dotnet add package Eklee.Azure.Functions.GraphQl --version 0.1.0
NuGet\Install-Package Eklee.Azure.Functions.GraphQl -Version 0.1.0
<PackageReference Include="Eklee.Azure.Functions.GraphQl" Version="0.1.0" />
paket add Eklee.Azure.Functions.GraphQl --version 0.1.0
#r "nuget: Eklee.Azure.Functions.GraphQl, 0.1.0"
// Install Eklee.Azure.Functions.GraphQl as a Cake Addin #addin nuget:?package=Eklee.Azure.Functions.GraphQl&version=0.1.0 // Install Eklee.Azure.Functions.GraphQl as a Cake Tool #tool nuget:?package=Eklee.Azure.Functions.GraphQl&version=0.1.0
Introduction
The purpose of this library is to help developers with implementing a GraphQl based Azure Function with dependency injection support.
DI Usage
In order to leverage this library, there are 3 steps. You would want to setup your DI, apply the ExecutionContextDependencyInjection attribute, and inject the ExecutionContext as a parameter in your function.
Step 1: Setup DI
The first step is to setup your DI via the Autofac Module. Be sure to register your schema using the extension method RegisterGraphQl. You can then register the types used in your schema.
using Autofac;
namespace FunctionApp1
{
public class MyModuleConfig : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterGraphQl<BooksSchema>();
builder.RegisterType<BooksQuery>();
...
}
}
}
Step 2/3: Setup ExecutionContextDependencyInjection attribute on said function and inject ExecutionContext.
The second step is to apply the ExecutionContextDependencyInjection on your function and tell it which Module type you would like. Next, you can inject the ExecutionContext which internally carries the function instance Id.
public static class BooksGraphFunction
{
[ExecutionContextDependencyInjection(typeof(MyModule))]
[FunctionName("graph")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "books/graph")] HttpRequest req,
ILogger log,
ExecutionContext executionContext)
{
Process GraphQl Request Usage:
Simply leverage the extension method ProcessGraphQlRequest.
return await executionContext.ProcessGraphQlRequest(req);
For more information about dependency injection support, visit: https://github.com/seekdavidlee/Eklee-Azure-Functions-Http
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
- Eklee.Azure.Functions.Http (>= 0.5.0)
- GraphQL (>= 2.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.36.10 | 967 | 1/31/2021 |
0.35.10 | 951 | 1/24/2021 |
0.34.6 | 1,019 | 1/24/2021 |
0.33.6 | 465 | 1/19/2021 |
0.32.4 | 580 | 1/10/2021 |
0.31.8 | 1,073 | 12/19/2020 |
0.30.4 | 994 | 12/8/2020 |
0.27.2 | 873 | 6/14/2020 |
0.27.1 | 644 | 4/11/2020 |
0.27.0 | 578 | 3/28/2020 |
0.26.1 | 705 | 12/22/2019 |
0.25.0 | 750 | 9/30/2019 |
0.24.9 | 931 | 9/29/2019 |
0.23.2 | 728 | 9/15/2019 |
0.22.4 | 708 | 9/8/2019 |
0.21.1 | 1,022 | 9/2/2019 |
0.21.0 | 958 | 8/30/2019 |
0.20.1 | 903 | 8/24/2019 |
0.20.0 | 865 | 8/18/2019 |
0.18.0 | 986 | 8/11/2019 |
0.17.0 | 724 | 8/4/2019 |
0.16.0 | 690 | 8/3/2019 |
0.15.7 | 846 | 7/26/2019 |
0.15.3 | 883 | 7/14/2019 |
0.15.2 | 929 | 7/7/2019 |
0.15.1 | 1,160 | 7/6/2019 |
0.14.1 | 934 | 6/16/2019 |
0.14.0 | 1,224 | 5/18/2019 |
0.13.1 | 725 | 3/31/2019 |
0.13.0 | 794 | 3/31/2019 |
0.12.1 | 1,010 | 3/24/2019 |
0.11.0 | 986 | 3/10/2019 |
0.10.0 | 775 | 3/3/2019 |
0.9.1 | 1,479 | 2/26/2019 |
0.9.0 | 971 | 2/24/2019 |
0.8.0 | 949 | 2/23/2019 |
0.7.2 | 993 | 2/20/2019 |
0.7.1 | 993 | 2/17/2019 |
0.6.3 | 1,008 | 2/10/2019 |
0.5.5 | 826 | 1/20/2019 |
0.5.4 | 825 | 1/13/2019 |
0.5.1 | 855 | 1/7/2019 |
0.4.6 | 841 | 12/31/2018 |
0.4.5 | 837 | 12/28/2018 |
0.4.4 | 1,005 | 12/27/2018 |
0.3.0 | 821 | 11/4/2018 |
0.2.0 | 858 | 11/4/2018 |
0.1.0 | 830 | 10/30/2018 |
Initial release to support query and mutation.