Skip to content

Commit

Permalink
FSharp.Data.GraphQL.Server.AspNetCore (#430)
Browse files Browse the repository at this point in the history
Adds ASP.NET Core DI integration using a Giraffe HttpHandler and a WebSocket protocol support

Co-authored-by: Andrii Chebukin <[email protected]>
Co-authored-by: Andrii Chebukin <[email protected]>
  • Loading branch information
3 people committed Mar 24, 2024
1 parent 246d6c0 commit 2c86a71
Show file tree
Hide file tree
Showing 66 changed files with 5,421 additions and 647 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,39 +59,47 @@ jobs:
- name: Pack FSharp.Data.GraphQL.Shared project
run: |
cd src/FSharp.Data.GraphQL.Shared
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Shared project to GitHub
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Shared.${{env.VERSION}}.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Client project
run: |
cd src/FSharp.Data.GraphQL.Client
dotnet pack --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Client project to GitHub
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Client.${{env.VERSION}}.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server project
run: |
cd src/FSharp.Data.GraphQL.Server
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server project to GitHub
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.${{env.VERSION}}.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.AspNetCore project
run: |
cd src/FSharp.Data.GraphQL.Server.AspNetCore
dotnet pack --no-build --configuration Release /p:IsNuget=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.AspNetCore project to GitHub
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.AspNetCore.${{env.VERSION}}.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Relay project
run: |
cd src/FSharp.Data.GraphQL.Server.Relay
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Relay project to GitHub
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.Relay.${{env.VERSION}}.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Middleware project
run: |
cd src/FSharp.Data.GraphQL.Server.Middleware
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Middleware project to GitHub
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.Middleware.${{env.VERSION}}.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
Expand All @@ -104,7 +112,7 @@ jobs:
- name: Pack FSharp.Data.GraphQL.ProjectTemplates template project
run: |
cd samples
dotnet pack --nologo --configuration Release /p:ContinuousIntegrationBuild=true -o ../nuget
dotnet pack --configuration Release /p:ContinuousIntegrationBuild=true -o ../nuget
- name: Publish FSharp.Data.GraphQL.ProjectTemplates project to GitHub
run: |
$path = "nuget/FSharp.Data.GraphQL.ProjectTemplates.${{env.VERSION}}.nupkg"
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,39 +58,47 @@ jobs:
- name: Pack FSharp.Data.GraphQL.Shared project
run: |
cd src/FSharp.Data.GraphQL.Shared
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Shared project to NuGet
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Shared.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Client project
run: |
cd src/FSharp.Data.GraphQL.Client
dotnet pack --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Client project to NuGet
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Client.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server project
run: |
cd src/FSharp.Data.GraphQL.Server
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server project to NuGet
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.AspNetCore project
run: |
cd src/FSharp.Data.GraphQL.Server.AspNetCore
dotnet pack --no-build --configuration Release /p:IsNuget=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.AspNetCore project to NuGet
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.AspNetCore.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Relay project
run: |
cd src/FSharp.Data.GraphQL.Server.Relay
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Relay project to NuGet
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.Relay.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Middleware project
run: |
cd src/FSharp.Data.GraphQL.Server.Middleware
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --no-build --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Middleware project to NuGet
run: |
dotnet nuget push nuget/FSharp.Data.GraphQL.Server.Middleware.${{env.VERSION}}.{nupkg,snupkg} -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
Expand All @@ -103,7 +111,7 @@ jobs:
- name: Pack FSharp.Data.GraphQL.ProjectTemplates template project
run: |
cd samples
dotnet pack --nologo --configuration Release /p:ContinuousIntegrationBuild=true -o ../nuget
dotnet pack --configuration Release /p:ContinuousIntegrationBuild=true -o ../nuget
- name: Publish FSharp.Data.GraphQL.ProjectTemplates project to GitHub
run: |
$path = "nuget/FSharp.Data.GraphQL.ProjectTemplates.${{env.VERSION}}.nupkg"
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,4 @@ $RECYCLE.BIN/
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*/**/.vscode/*
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<PropertyGroup Label="NuGet">
<Authors>John Bazinga, Andrii Chebukin, Jurii Chebukin, Ismael Carlos Velten, njlr, Garrett Birkel</Authors>
<Authors>John Bazinga, Andrii Chebukin, Jurii Chebukin, Ismael Carlos Velten, Valber M. Silva de Souza, njlr, Garrett Birkel</Authors>
<Product>FSharp.Data.GraphQL</Product>
<Summary>F# implementation of Facebook GraphQL query language</Summary>

Expand Down
47 changes: 31 additions & 16 deletions FSharp.Data.GraphQL.Integration.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Packages.props = Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BA7F22E2-D411-4229-826B-F55FF171D12A}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.IntegrationTests.Server", "tests\FSharp.Data.GraphQL.IntegrationTests.Server\FSharp.Data.GraphQL.IntegrationTests.Server.fsproj", "{E6754A20-FA5E-4C76-AB1B-D35DF9526889}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.IntegrationTests", "tests\FSharp.Data.GraphQL.IntegrationTests\FSharp.Data.GraphQL.IntegrationTests.fsproj", "{09D910E6-94EF-46AF-94DF-10A9FEC837C0}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.Server", "src\FSharp.Data.GraphQL.Server\FSharp.Data.GraphQL.Server.fsproj", "{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BDE03396-2ED6-4153-B94C-351BAB3F67BD}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.Shared", "src\FSharp.Data.GraphQL.Shared\FSharp.Data.GraphQL.Shared.fsproj", "{237F9575-6E65-40DD-A77B-BA2882BD5646}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BDE03396-2ED6-4153-B94C-351BAB3F67BD}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.Server", "src\FSharp.Data.GraphQL.Server\FSharp.Data.GraphQL.Server.fsproj", "{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BA7F22E2-D411-4229-826B-F55FF171D12A}"
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Data.GraphQL.Server.AspNetCore", "src\FSharp.Data.GraphQL.Server.AspNetCore\FSharp.Data.GraphQL.Server.AspNetCore.fsproj", "{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -30,18 +32,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x64.ActiveCfg = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x64.Build.0 = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x86.ActiveCfg = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x86.Build.0 = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|Any CPU.Build.0 = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x64.ActiveCfg = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x64.Build.0 = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x86.ActiveCfg = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x86.Build.0 = Release|Any CPU
{E6754A20-FA5E-4C76-AB1B-D35DF9526889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6754A20-FA5E-4C76-AB1B-D35DF9526889}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6754A20-FA5E-4C76-AB1B-D35DF9526889}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -54,6 +44,18 @@ Global
{E6754A20-FA5E-4C76-AB1B-D35DF9526889}.Release|x64.Build.0 = Release|Any CPU
{E6754A20-FA5E-4C76-AB1B-D35DF9526889}.Release|x86.ActiveCfg = Release|Any CPU
{E6754A20-FA5E-4C76-AB1B-D35DF9526889}.Release|x86.Build.0 = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x64.ActiveCfg = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x64.Build.0 = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x86.ActiveCfg = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Debug|x86.Build.0 = Debug|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|Any CPU.Build.0 = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x64.ActiveCfg = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x64.Build.0 = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x86.ActiveCfg = Release|Any CPU
{09D910E6-94EF-46AF-94DF-10A9FEC837C0}.Release|x86.Build.0 = Release|Any CPU
{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -78,15 +80,28 @@ Global
{237F9575-6E65-40DD-A77B-BA2882BD5646}.Release|x64.Build.0 = Release|Any CPU
{237F9575-6E65-40DD-A77B-BA2882BD5646}.Release|x86.ActiveCfg = Release|Any CPU
{237F9575-6E65-40DD-A77B-BA2882BD5646}.Release|x86.Build.0 = Release|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Debug|x64.ActiveCfg = Debug|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Debug|x64.Build.0 = Debug|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Debug|x86.ActiveCfg = Debug|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Debug|x86.Build.0 = Debug|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Release|Any CPU.Build.0 = Release|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Release|x64.ActiveCfg = Release|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Release|x64.Build.0 = Release|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Release|x86.ActiveCfg = Release|Any CPU
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{09D910E6-94EF-46AF-94DF-10A9FEC837C0} = {BA7F22E2-D411-4229-826B-F55FF171D12A}
{E6754A20-FA5E-4C76-AB1B-D35DF9526889} = {BA7F22E2-D411-4229-826B-F55FF171D12A}
{09D910E6-94EF-46AF-94DF-10A9FEC837C0} = {BA7F22E2-D411-4229-826B-F55FF171D12A}
{CA16AC10-9FF2-4894-AC73-99FBD35BB8CC} = {BDE03396-2ED6-4153-B94C-351BAB3F67BD}
{237F9575-6E65-40DD-A77B-BA2882BD5646} = {BDE03396-2ED6-4153-B94C-351BAB3F67BD}
{9E795521-CC0E-4E9C-9DC1-66CFCC7A31C4} = {BDE03396-2ED6-4153-B94C-351BAB3F67BD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1B712506-56AA-424E-9DB7-47BCF3894516}
Expand Down
Loading

0 comments on commit 2c86a71

Please sign in to comment.