-
Notifications
You must be signed in to change notification settings - Fork 136
Configurable preprocessing method for requests #104
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
Closed
rose-a
wants to merge
58
commits into
graphql-dotnet:master
from
haprotec:configurable-preprocessing-method-for-requests
Closed
Configurable preprocessing method for requests #104
rose-a
wants to merge
58
commits into
graphql-dotnet:master
from
haprotec:configurable-preprocessing-method-for-requests
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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
…-client into subscriptions-api
* 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
…-client into subscriptions-api
* 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
…-client into subscriptions-api
* 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
…-client into subscriptions-api
rose-a
added a commit
that referenced
this pull request
Feb 5, 2020
Collaborator
Author
|
incorporated in #152 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
DefaultRequestHeadersto a request payload which is sent via websocket (so no HTTP headers are available).There might be a lot of other usecases though....