-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FSharp.Data.GraphQL.Server.AspNetCore #430
FSharp.Data.GraphQL.Server.AspNetCore #430
Conversation
These changes introduce utility code for configuring usage of FSharp.Data.GraphQL in an ASP.NET app, especially one using Giraffe, AND offers an ASP.NET middleware that implements the graphql-transport-ws Websocket subprotocol for GraphQL subscriptions (a.k.a Apollo GraphQL subscription protocol). A companion sample chat application (the backend part) is also introduced with these changes. This development departed from the "start-wars-api" sample. - Originally developed in https://github.com/valbers/graphql-transport-ws.fsharp - See also: fsprojects#428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@valbers brlian job!
Some remarks from me.
I propose:
- You change stuff that is not realted to
IGQLError
- We merge
IGQLError
- You rebase and align your PR on top of
IGQLError
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/Serialization/GraphQLQueryDecoding.fs
Outdated
Show resolved
Hide resolved
@valbers add yourself as a contributor to Directory.Build.props |
@xperiandri thank you so much for the encouraging words and taking the time to review my changes so quick and so thoroughly. I'm going to apply some of the changes you suggested and then I'll see how I can fix the build. It seems to be an inconsistent behavior of the F# compiler relating to the usage of task computation expressions. |
You cannot have too many nesting matches inside the |
Co-authored-by: Andrii Chebukin <xperiandri@live.ru>
Just so you know: I'm planning to solve all issues by the end of this week (i.e. until 2023-03-12). |
Sounds great! |
I know this code will be removed later because of upcoming changes from another branch, but it's breaking the integration tests (more specifically: the type provider). It just feels better to have it work correctly for the moment (and have a passing build :) ).
- use structural logging Co-authored-by: Andrii Chebukin <xperiandri@live.ru>
- using `|> Task.WaitAll` instead of `|> Async.AwaitTask |> Async.RunSynchronously` Co-authored-by: Andrii Chebukin <xperiandri@live.ru>
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
According to suggestion during code review.
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
src/FSharp.Data.GraphQL.Server.AppInfrastructure/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
1e333c5
to
17b251e
Compare
17b251e
to
38fed3c
Compare
src/FSharp.Data.GraphQL.Server.AspNetCore/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
"Identation" -> Indentation
46f53ec
to
cd3b1ce
Compare
… typo:" This reverts commit cd3b1ce.
According to suggestion during code review.
src/FSharp.Data.GraphQL.Server.AspNetCore/GraphQLWebsocketMiddleware.fs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com>
According to suggestion during code review.
As requested during code review.
Adds ASP.NET Core DI integration using a Giraffe HttpHandler and a WebSocket protocol support Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com> Co-authored-by: Andrii Chebukin <andrii@lula.is>
Adds ASP.NET Core DI integration using a Giraffe HttpHandler and a WebSocket protocol support Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com> Co-authored-by: Andrii Chebukin <andrii@lula.is>
Adds ASP.NET Core DI integration using a Giraffe HttpHandler and a WebSocket protocol support Co-authored-by: Andrii Chebukin <XperiAndri@Outlook.com> Co-authored-by: Andrii Chebukin <andrii@lula.is>
These changes introduce utility code for configuring usage of FSharp.Data.GraphQL in an ASP.NET app, especially one using Giraffe, AND offer an ASP.NET middleware that implements the graphql-transport-ws Websocket subprotocol for GraphQL subscriptions (a.k.a Apollo GraphQL subscription protocol).
A companion sample chat application (the backend part) is also introduced with these changes.
This development departed from the "start-wars-api" sample.