Skip to content

Commit 93f6cb7

Browse files
committed
Add new often used constructor
1 parent fbf37df commit 93f6cb7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/GraphQL.Client/GraphQLHttpClient.cs

+9
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ public GraphQLHttpClient(GraphQLHttpClientOptions options, IGraphQLWebsocketJson
7171
_lazyHttpWebSocket = new Lazy<GraphQLHttpWebSocket>(CreateGraphQLHttpWebSocket);
7272
}
7373

74+
public GraphQLHttpClient(Action<GraphQLHttpClientOptions> configure, IGraphQLWebsocketJsonSerializer serializer, HttpClient httpClient)
75+
: this(configure.New(), serializer, httpClient) { }
76+
77+
public GraphQLHttpClient(Uri endPoint, IGraphQLWebsocketJsonSerializer serializer, HttpClient httpClient)
78+
: this(o => o.EndPoint = endPoint, serializer, httpClient) { }
79+
80+
public GraphQLHttpClient(string endPoint, IGraphQLWebsocketJsonSerializer serializer, HttpClient httpClient)
81+
: this(new Uri(endPoint), serializer, httpClient) { }
82+
7483
#endregion
7584

7685
#region IGraphQLClient

0 commit comments

Comments
 (0)