DotNetBrightener.Integration.GraphQL
1.0.0-beta-003
dotnet add package DotNetBrightener.Integration.GraphQL --version 1.0.0-beta-003
NuGet\Install-Package DotNetBrightener.Integration.GraphQL -Version 1.0.0-beta-003
<PackageReference Include="DotNetBrightener.Integration.GraphQL" Version="1.0.0-beta-003" />
paket add DotNetBrightener.Integration.GraphQL --version 1.0.0-beta-003
#r "nuget: DotNetBrightener.Integration.GraphQL, 1.0.0-beta-003"
// Install DotNetBrightener.Integration.GraphQL as a Cake Addin
#addin nuget:?package=DotNetBrightener.Integration.GraphQL&version=1.0.0-beta-003&prerelease
// Install DotNetBrightener.Integration.GraphQL as a Cake Tool
#tool nuget:?package=DotNetBrightener.Integration.GraphQL&version=1.0.0-beta-003&prerelease
GraphQL Integration
DotNetBrightener.Integration.GraphQL is a library that provides APIs to integrate with GraphQL in your Asp.Net Core project with minimal efforts.
If you are not familar with GraphQL, check out https://github.com/facebook/graphql and https://graphql-dotnet.github.io/docs/getting-started
Feature:
- WebAPI-like approach of implementing GraphQL
- Modular, only depends on GraphQL DotNet library
TODO:
[ ] Authorization to the exposing APIs [ ]
Installation
You can install the library from Nuget Package Management on Visual Studio. Require .Net 5.0. Follow instructions on https://www.nuget.org/packages/DotNetBrightener.Integration.GraphQL for installation options.
Usage
1. Register GraphQL Integration to IServiceCollection
In your Startup.ConfigureService(IServiceCollection services)
method, add the following:
services.EnableGraphQL();
If you have your graph types in the same assembly as Startup
class, the above code will automatically register all the types.
Otherwise, assuming you have YourGraphType
in a separate assembly, then add the reference to that assembly and use the following to register your graph types.
var assembly = typeof(YourGraphType).Assembly;
services.AddGraphTypes(assembly);
2. Register GraphQL Integration Middleware
In your Startup.Configure()
method, add the following to register the middleware to your application
var graphQLEndpoint = "/[your-desired-endpoint]"; // default is /graphql if you don't specify
app.UseGraphQLIntegration(graphQLEndpoint);
3. Define your first model (GraphType) -- TODO
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
-
net5.0
- GraphQL (>= 3.1.5)
- GraphQL.Server.Transports.AspNetCore (>= 4.3.1)
- GraphQL.Server.Transports.AspNetCore.SystemTextJson (>= 4.3.1)
- GraphQL.Server.Ui.Playground (>= 4.3.1)
- System.Linq.Dynamic.Core (>= 1.2.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DotNetBrightener.Integration.GraphQL:
Package | Downloads |
---|---|
WebEdFramework
The based library for Modules to be built and run with WebEd CMS or any applications that are based on WebEd Framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|