Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<PropertyGroup>
<Description>Abstractions for the Websocket transport used in GraphQL.Client</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public string Type
/// <summary>
/// The payload of the websocket request
/// </summary>
public GraphQLRequest Payload
public object Payload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change

{
get => ContainsKey(PAYLOAD_KEY) ? (GraphQLRequest)this[PAYLOAD_KEY] : null;
get => ContainsKey(PAYLOAD_KEY) ? this[PAYLOAD_KEY] : null;
set => this[PAYLOAD_KEY] = value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<Description>Abstractions for GraphQL.Client</Description>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Version>1.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<Description>A serializer implementation for GraphQL.Client using Newtonsoft.Json as underlying JSON library</Description>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Version>1.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/GraphQL.Client/GraphQL.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<RootNamespace>GraphQL.Client.Http</RootNamespace>
<Authors>Deinok,Alexander Rose,graphql-dotnet</Authors>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<Company>Deinok,Alexander Rose,graphql-dotnet</Company>
<PackageProjectUrl>https://github.com/graphql-dotnet/graphql-client</PackageProjectUrl>
<RepositoryUrl>https://github.com/graphql-dotnet/graphql-client</RepositoryUrl>
<PackageId>GraphQL.Client</PackageId>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Version>1.0.0</Version>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
Expand Down
6 changes: 6 additions & 0 deletions src/GraphQL.Client/GraphQLHttpClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -36,6 +37,11 @@ public class GraphQLHttpClient : IGraphQLClient
/// </summary>
public GraphQLHttpClientOptions Options { get; }

/// <summary>
/// The custom web socket headers for initialization of connection
/// </summary>
public Dictionary<string, string> WebSocketHeaders { get; } = new Dictionary<string, string>();

/// <summary>
/// Publishes all exceptions which occur inside the websocket receive stream (i.e. for logging purposes)
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL.Client/Websocket/GraphQLHttpWebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public IObservable<GraphQLResponse<TResponse>> CreateSubscriptionStream<TRespons
{
Id = startRequest.Id,
Type = GraphQLWebSocketMessageType.GQL_CONNECTION_INIT,
Payload = new GraphQLRequest()
Payload = _client.WebSocketHeaders.Count > 0 ? _client.WebSocketHeaders : null
};

var observable = Observable.Create<GraphQLResponse<TResponse>>(o =>
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL.Primitives/GraphQL.Primitives.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Description>GraphQL basic types</Description>
<RootNamespace>GraphQL</RootNamespace>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Version>1.0.0</Version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

</PropertyGroup>

</Project>