Skip to content
Merged
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
22 changes: 0 additions & 22 deletions src/GraphQL.Client/GraphQLClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,6 @@ public static async Task<GraphQLResponse> GetIntrospectionQueryAsync(this GraphQ
public static async Task<GraphQLResponse> PostIntrospectionQueryAsync(this GraphQLClient graphQLClient) =>
await graphQLClient.PostAsync(IntrospectionQuery).ConfigureAwait(false);

#if !NETSTANDARD1_1

/// <summary>
/// Send the Query defined in a file via GET
/// </summary>
/// <param name="graphQLClient">The GraphQLClient</param>
/// <param name="filePath">The Path of the File</param>
/// <returns>The GraphQLResponse</returns>
public static async Task<GraphQLResponse> GetFromFile(this GraphQLClient graphQLClient, string filePath) =>
await graphQLClient.GetQueryAsync(File.ReadAllText(filePath)).ConfigureAwait(false);

/// <summary>
/// Send the Query defined in a file via POST
/// </summary>
/// <param name="graphQLClient">The GraphQLClient</param>
/// <param name="filePath">The Path of the File</param>
/// <returns>The GraphQLResponse</returns>
public static async Task<GraphQLResponse> PostFromFile(this GraphQLClient graphQLClient, string filePath) =>
await graphQLClient.PostQueryAsync(File.ReadAllText(filePath)).ConfigureAwait(false);

#endif

}

}