Skip to content

Conversation

@rose-a
Copy link
Collaborator

@rose-a rose-a commented Apr 1, 2019

This PR adds a configurable preprocessing method to GraphQLHttpOptions, which is executed for each request prior to sending it. By default it just passes on the received request, so the default behaviour is not changed.

The main intention for me is to automatically add the authorization info which was set in the DefaultRequestHeaders to a request payload which is sent via websocket (so no HTTP headers are available).

There might be a lot of other usecases though....

rose-a and others added 30 commits November 20, 2018 22:12
* create observable subscription

* create integration test server and test project

* fix debug output

* create basic unit test for subscription

* make unit test politically correct

* make sure all ClientWebSockets are disposed on disposing the GraphQlHttpClient

* fix comment

* Modified GraphQL.Client.csproj
* add StringEnumConverter to JsonSerializerSettings

* fix dependencies

* change version

* fix version

* fix CloseAsync

* lock dispose

* implement external exception handling for subscription streams

* fix doc comment

* add back-off delay for automatic reconnects

* create GraphQLHttpWebSocket class

* get single socket working

* fix subscription test, cleanup code

* more code cleanup

* add test CanConnectMultipleSubscriptionsSimultaneously

* dynamically find free ports for integration test

* add WebSocketExceptionHandler to clientOptions

* move reconnect-logic into subscriptions

* move external exception handler declaration to CreateSubscriptionStream overloads

* fix exception on disposing disconnected subscription

* fix tests, add console app for testing reconnect after server restart
rose-a and others added 27 commits January 22, 2019 14:25
* add StringEnumConverter to JsonSerializerSettings

* fix dependencies

* change version

* fix version

* fix CloseAsync

* lock dispose

* implement external exception handling for subscription streams

* fix doc comment

* add back-off delay for automatic reconnects

* create GraphQLHttpWebSocket class

* get single socket working

* fix subscription test, cleanup code

* more code cleanup

* add test CanConnectMultipleSubscriptionsSimultaneously

* dynamically find free ports for integration test

* add WebSocketExceptionHandler to clientOptions

* move reconnect-logic into subscriptions

* move external exception handler declaration to CreateSubscriptionStream overloads

* fix exception on disposing disconnected subscription

* fix tests, add console app for testing reconnect after server restart

* Update GraphQL.Client.Tests.csproj

* Nullable check (graphql-dotnet#86)

* nonnullable

* fix some things

* other fix

* netstandard2.0

* Update README.md

* create "queue" for requests so that only one send operation is performed at a time

* fix websockets on win 7

* remove websockets4net dependency

* Update root.props

* Update config.yml

* IsTestProject

* Benchmar

* benchmark

* Update GraphQLLocation.cs

* new Spec

* fix suff for dotnet core 3.0

* check response for 'null' in where clause

* add obsolete parameterless constructor to GraphQLRequest

* add debug output in websocket receive

* reuse observables for identical requests

* store changes to consoleapp

* fix StackOverflowException in GraphQLRequest.GetHashCode()

* fix receiving long messages via websocket

* add obsolete constructor

* make ReceiveResultStream observable Hot

* fix multiple subscriptions by using subject in GraphQLHttpWebSocket

* fix overlapping subscriptions

* fix subscription test to work arround graphql-dotnet/server#199

* add an observable which publishes all websocket exceptions

* fix OnNext calls of exceptionSubject

* fix GraphQLHttpClient(Uri endPoint, GraphQLHttpClientOptions options) constructor

* test requests via websockets

* bump pre-release version
* add StringEnumConverter to JsonSerializerSettings

* fix dependencies

* change version

* fix version

* fix CloseAsync

* lock dispose

* implement external exception handling for subscription streams

* fix doc comment

* add back-off delay for automatic reconnects

* create GraphQLHttpWebSocket class

* get single socket working

* fix subscription test, cleanup code

* more code cleanup

* add test CanConnectMultipleSubscriptionsSimultaneously

* dynamically find free ports for integration test

* add WebSocketExceptionHandler to clientOptions

* move reconnect-logic into subscriptions

* move external exception handler declaration to CreateSubscriptionStream overloads

* fix exception on disposing disconnected subscription

* fix tests, add console app for testing reconnect after server restart

* Update GraphQL.Client.Tests.csproj

* Nullable check (graphql-dotnet#86)

* nonnullable

* fix some things

* other fix

* netstandard2.0

* Update README.md

* create "queue" for requests so that only one send operation is performed at a time

* fix websockets on win 7

* remove websockets4net dependency

* Update root.props

* Update config.yml

* IsTestProject

* Benchmar

* benchmark

* Update GraphQLLocation.cs

* new Spec

* fix suff for dotnet core 3.0

* check response for 'null' in where clause

* add obsolete parameterless constructor to GraphQLRequest

* add debug output in websocket receive

* reuse observables for identical requests

* store changes to consoleapp

* fix StackOverflowException in GraphQLRequest.GetHashCode()

* fix receiving long messages via websocket

* add obsolete constructor

* make ReceiveResultStream observable Hot

* fix multiple subscriptions by using subject in GraphQLHttpWebSocket

* fix overlapping subscriptions

* fix subscription test to work arround graphql-dotnet/server#199

* add an observable which publishes all websocket exceptions

* fix OnNext calls of exceptionSubject

* fix GraphQLHttpClient(Uri endPoint, GraphQLHttpClientOptions options) constructor

* test requests via websockets

* bump pre-release version

* fix initializing websocket when multiple threads create a subscription concurrently
* add StringEnumConverter to JsonSerializerSettings

* fix dependencies

* change version

* fix version

* fix CloseAsync

* lock dispose

* implement external exception handling for subscription streams

* fix doc comment

* add back-off delay for automatic reconnects

* create GraphQLHttpWebSocket class

* get single socket working

* fix subscription test, cleanup code

* more code cleanup

* add test CanConnectMultipleSubscriptionsSimultaneously

* dynamically find free ports for integration test

* add WebSocketExceptionHandler to clientOptions

* move reconnect-logic into subscriptions

* move external exception handler declaration to CreateSubscriptionStream overloads

* fix exception on disposing disconnected subscription

* fix tests, add console app for testing reconnect after server restart

* Update GraphQL.Client.Tests.csproj

* Nullable check (graphql-dotnet#86)

* nonnullable

* fix some things

* other fix

* netstandard2.0

* Update README.md

* create "queue" for requests so that only one send operation is performed at a time

* fix websockets on win 7

* remove websockets4net dependency

* Update root.props

* Update config.yml

* IsTestProject

* Benchmar

* benchmark

* Update GraphQLLocation.cs

* new Spec

* fix suff for dotnet core 3.0

* check response for 'null' in where clause

* add obsolete parameterless constructor to GraphQLRequest

* add debug output in websocket receive

* reuse observables for identical requests

* store changes to consoleapp

* fix StackOverflowException in GraphQLRequest.GetHashCode()

* fix receiving long messages via websocket

* add obsolete constructor

* make ReceiveResultStream observable Hot

* fix multiple subscriptions by using subject in GraphQLHttpWebSocket

* fix overlapping subscriptions

* fix subscription test to work arround graphql-dotnet/server#199

* add an observable which publishes all websocket exceptions

* fix OnNext calls of exceptionSubject

* fix GraphQLHttpClient(Uri endPoint, GraphQLHttpClientOptions options) constructor

* test requests via websockets

* bump pre-release version

* use JsonSerializerSettings from options in websocket requests

* fix query errors via websocket

* fix sequence termination and error handling in websocket streams
rose-a added a commit that referenced this pull request Feb 5, 2020
@rose-a
Copy link
Collaborator Author

rose-a commented Feb 5, 2020

incorporated in #152

@rose-a rose-a closed this Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant