Skip to content

Releases: byme8/ZeroQL

v3.2.0-preview.3

20 Dec 19:02
Compare
Choose a tag to compare
v3.2.0-preview.3 Pre-release
Pre-release

Add unexpected error reporting.

v3.2.0-preview.2

14 Dec 16:16
Compare
Choose a tag to compare
v3.2.0-preview.2 Pre-release
Pre-release

Add initial cancelation support.

v3.2.0-preview.1

10 Dec 10:39
Compare
Choose a tag to compare
v3.2.0-preview.1 Pre-release
Pre-release

Add initial support for unions and "... on" syntax.

v3.1.0

05 Dec 21:51
6b00048
Compare
Choose a tag to compare
  • Added initial support for interfaces
  • Void source generation when the checksum of schema file is not changed

v3.1.0-preview.1

29 Nov 13:46
Compare
Choose a tag to compare
v3.1.0-preview.1 Pre-release
Pre-release

Add initial support for Graphql interfaces.

v3.0.0

13 Nov 09:52
Compare
Choose a tag to compare
  • Support for .Net 7
  • Refactor NuGet configuration to void unnecessary references

The base classes for the GraphQL client are moved to ZeroQL.Runtime.
The client generation tools(GraphQLGenerator) are moved to a separate package ZeroQL.Tools.

v3.0.0-preview1

13 Nov 09:31
Compare
Choose a tag to compare
v3.0.0-preview1 Pre-release
Pre-release
Attempt to fix CLI build.

v2.1.1

30 Oct 12:17
Compare
Choose a tag to compare

Improve error logging and fix warnings in generated cilent.

v2.1.0

29 Oct 12:23
8106c3c
Compare
Choose a tag to compare

Adds support for user-defined scalars.

Let's suppose that server returns the Instant type from NodaTime.
The schema looks like that

"""
Represents an instant on the global timeline, with nanosecond resolution.
"""
scalar Instant

type Query {
  instant: Instant!
}

The ZeroQL knows nothing about the scalar type Instant, but we should be able to add support for it. To make it work, create the class Instant in the ZeroQL namespace and define a JSON serializer for it:

namespace ZeroQL;

public class Instant
{
    public DateTimeOffset DateTimeOffset { get; set; }
}

public class InstantJsonConverter : JsonConverter<Instant?>
{
    public override Instant? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
    {
        var text = reader.GetString();
        if (string.IsNullOrEmpty(text))
        {
            return null;
        }
        return new Instant { DateTimeOffset = DateTimeOffset.Parse(text) };
    }

    public override void Write(Utf8JsonWriter writer, Instant? value, JsonSerializerOptions options)
    {
        var text = value?.DateTimeOffset.ToString("O");
        writer.WriteStringValue(text);
    }
}

Then, somewhere in your app, add this serializer to JSON options:

ZeroQLJsonOptions.Configure(o => o.Converters.Add(new InstantJsonConverter()));

Now we are ready to consume it:

var response = await qlClient.Query(static q => q.Instant);

v2.0.0

09 Oct 15:12
Compare
Choose a tag to compare

Add support for:

  • File upload
  • Persisted queries
  • Request-like syntax