Skip to content

Releases: charlesdevandiere/graphql-client-extensions

4.0.0

26 Apr 11:56
0a52eb0
Compare
Choose a tag to compare

Breaking change

3.2.2

05 Apr 12:02
731f880
Compare
Choose a tag to compare

Added

Add source link to the nuget package

3.2.1

05 Apr 11:39
fb9b7be
Compare
Choose a tag to compare

3.1.0

06 May 16:08
13464f5
Compare
Choose a tag to compare

Changes:

Upgrade GraphQL.Query.Builder to version 1.2.1

3.0.1

13 May 08:25
49b8bf1
Compare
Choose a tag to compare

Upgrade dependencies

  • Dawn.Guard: 1.12.0
  • GraphQL.Query.Builder: 1.0.1

3.0.0

19 Mar 12:40
6044ef6
Compare
Choose a tag to compare

Changes

Query build outsourced

Query build has been outsourced in GraphQL.Query.Builder package.

New icon

logo

Breaking changes

Namespace for IQuery, IQuery<T>, Query<T>, IQueryStringBuilder, QueryStringBuilder, QueryOptions classes and interfaces is now GraphQL.Query.Builder

2.1.0

16 Feb 17:19
88328b3
Compare
Choose a tag to compare

Changes

Support scalar type query

Schema :

names(match: String!): [String!]

Query :

names(match: "John")

2.0.0

19 Dec 21:38
c49e87f
Compare
Choose a tag to compare

New features

Batched queries

You can now send batched queries

var queries = new IQuery[]
{
  new Query<Human>("human")
    .Alias("john")
    .AddArguments(new { name = "John" })
    .AddField(h => h.FirstName),
  new Query<Human>("humans")
    .Alias("all")
    .AddField(h => h.FirstName)
};
using var client = new GraphQLClient("<url>");
IReadOnlyDictionary<string, JToken> batch = await client.GetBatch(queries);

Improuvments

.NET Core 3.1

Samples and test projects target now .NET Core 3.1.

GraphQL.Client.Extensions continue to target .NET Standard 2.0.

Code quality

Code coverage is now published.

Test projects were migrated to XUnit.

We use Dawn.Guard for argument validation.

Breaking changes

JToken and string result

Now, if you use JToken or string result in Get or Post methods, you recieve only the data node of the JSON response :

var queri = new Query<Human>("human")
    .AddArguments(new { name = "John" })
    .AddField(h => h.FirstName);
using var client = new GraphQLClient("<url>");
string json = await client.Get<string>(query);
{
  "firstName": "John"
}

In previous version :

{
  "data": {
    "human": {
      "firstName": "John"
    }
  }
}

Exception management

GraphQL.Client.Extensions methods now throw GraphQLClientException.

GraphQL errors can be recovered like this :

try
{
 // ...
}
catch (GraphQLClientException e)
{
  GraphQLError[] errors = e.Data["Errors"];
}

In previous version :

GraphQLError[] errors = e.Data["errors"];

1.0.0

04 Jul 14:19
7b4a65a
Compare
Choose a tag to compare

Changes:

  • 7b4a65a update sample readme (#20) +semver: major

This list of changes was auto generated.

0.2.5

04 Jul 12:18
a7832f2
Compare
Choose a tag to compare

Changes:

This list of changes was auto generated.