Skip to content

Commit 1f1b94e

Browse files
author
Raul Hidalgo Caballero
committed
added netstandard1.1 support
1 parent aa9dd65 commit 1f1b94e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/GraphQL.Client/GraphQL.Client.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<PropertyGroup>
12-
<TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks>
12+
<TargetFrameworks>netstandard1.1;netstandard1.3;netstandard2.0</TargetFrameworks>
1313
</PropertyGroup>
1414

1515
<ItemGroup>
@@ -20,4 +20,8 @@
2020
<ProjectReference Include="..\GraphQL.Common\GraphQL.Common.csproj" />
2121
</ItemGroup>
2222

23+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1'">
24+
<PackageReference Include="System.Net.Http" Version="4.3.3" />
25+
</ItemGroup>
26+
2327
</Project>

src/GraphQL.Client/GraphQLClientExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ public static async Task<GraphQLResponse> GetIntrospectionQueryAsync(this GraphQ
116116
public static async Task<GraphQLResponse> PostIntrospectionQueryAsync(this GraphQLClient graphQLClient) =>
117117
await graphQLClient.PostAsync(IntrospectionQuery).ConfigureAwait(false);
118118

119+
#if !NETSTANDARD1_1
120+
119121
/// <summary>
120122
/// Send the Query defined in a file via GET
121123
/// </summary>
@@ -134,6 +136,8 @@ public static async Task<GraphQLResponse> GetFromFile(this GraphQLClient graphQL
134136
public static async Task<GraphQLResponse> PostFromFile(this GraphQLClient graphQLClient, string filePath) =>
135137
await graphQLClient.PostQueryAsync(File.ReadAllText(filePath)).ConfigureAwait(false);
136138

139+
#endif
140+
137141
}
138142

139143
}

0 commit comments

Comments
 (0)