From 1ec4ba6b034369527bef299ae9c26421b73e5bc9 Mon Sep 17 00:00:00 2001 From: Magnus Ahlberg Date: Tue, 27 Oct 2026 13:50:54 +0100 Subject: [PATCH 1/2] Fix the standalone build after batch queries #126 was tested before the standalone clients reached main. Regenerate the test clients so the standalone runtime copy carries the batch code, and leave out of Linq2GraphQL.Tests.Standalone the tests that need the nullable client and the batch request snapshots, whose aliases hash the enum type name and so the client namespace. --- .../Runtime/Client/Batching/GraphBatch.cs | 69 +++ .../Client/Batching/GraphBatchBuilder.cs | 456 ++++++++++++++++++ .../Runtime/Client/Batching/GraphBatchItem.cs | 105 ++++ .../Client/Batching/GraphBatchOptions.cs | 59 +++ .../Client/Batching/GraphBatchResult.cs | 58 +++ .../Client/Common/GraphEnvelopeReader.cs | 105 +++- .../Runtime/Client/GraphBaseExecute.cs | 27 +- .../Generated/Runtime/Client/GraphClient.cs | 21 + .../Runtime/Client/GraphQueryExecute.cs | 30 +- .../Generated/Runtime/Client/QueryNode.cs | 19 +- .../Generated/Runtime/Client/Utilities.cs | 35 ++ .../Generated/Runtime/RuntimeInfo.cs | 2 +- .../Linq2GraphQL.Tests.Standalone.csproj | 8 +- .../Batch/BatchNullableClientTests.cs | 30 ++ .../Batch/BatchServerLimitTests.cs | 27 -- 15 files changed, 983 insertions(+), 68 deletions(-) create mode 100644 test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatch.cs create mode 100644 test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchBuilder.cs create mode 100644 test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchItem.cs create mode 100644 test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchOptions.cs create mode 100644 test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchResult.cs create mode 100644 test/Linq2GraphQL.Tests/Batch/BatchNullableClientTests.cs diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatch.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatch.cs new file mode 100644 index 00000000..a18b26be --- /dev/null +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatch.cs @@ -0,0 +1,69 @@ +//--------------------------------------------------------------------- +// +// Copy of the Linq2GraphQL runtime, written by the Linq2GraphQL generator +// in standalone mode. Please don't edit this file - regenerate instead. +// The runtime version is in RuntimeInfo.cs. +// Github:https://github.com/linq2graphql/linq2graphql.client +//--------------------------------------------------------------------- +#nullable disable +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +namespace Linq2GraphQL.TestClientStandalone.Runtime; + +public static class GraphBatch +{ + /// + /// Starts a batch of queries on : add them with + /// , then run them all with + /// . + /// + public static IGraphBatchBuilder CreateBatch(this TClient client, + Action configure = null) + where TClient : IGraphClientSource + { + return Create(client, configure); + } + + /// + /// Like , for a client of any type, such as a generated client's interface. + /// + public static IGraphBatchBuilder Create(TClient client, + Action configure = null) + { + ArgumentNullException.ThrowIfNull(client); + + var options = new GraphBatchOptions(); + configure?.Invoke(options); + options.Validate(); + + return new GraphBatchBuilder(client, options); + } +} + +public interface IGraphBatchBuilder +{ + /// + /// Adds a query. runs when the batch executes; it may return null to + /// add nothing. + /// + IGraphBatchBuilder Query(Func itemFactory); + + IGraphBatchBuilder QueryIf(Func itemFactory, bool condition); + + /// Adds a query when , evaluated when the batch executes, is true. + IGraphBatchBuilder QueryIf(Func itemFactory, Func condition); + + /// + /// Sends the batch, invokes each item's callback in the order the items were added, then throws if any + /// request failed or returned errors (see ). + /// + Task ExecuteAsync(CancellationToken cancellationToken = default); + + /// Like , but returns the errors instead of throwing them. + Task ExecuteWithResultAsync(CancellationToken cancellationToken = default); +} diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchBuilder.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchBuilder.cs new file mode 100644 index 00000000..14db859d --- /dev/null +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchBuilder.cs @@ -0,0 +1,456 @@ +//--------------------------------------------------------------------- +// +// Copy of the Linq2GraphQL runtime, written by the Linq2GraphQL generator +// in standalone mode. Please don't edit this file - regenerate instead. +// The runtime version is in RuntimeInfo.cs. +// Github:https://github.com/linq2graphql/linq2graphql.client +//--------------------------------------------------------------------- +#nullable disable +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Net; +using System.Net.Http.Json; +using System.Text; +using System.Text.Json; +using Linq2GraphQL.TestClientStandalone.Runtime.Common; + +namespace Linq2GraphQL.TestClientStandalone.Runtime; + +internal sealed class GraphBatchBuilder(TClient client, GraphBatchOptions options) : IGraphBatchBuilder +{ + private const int MaxErrorMessageLength = 4096; + + private readonly List> itemFactories = []; + private readonly List<(int Order, GraphQueryExecutionException Exception)> executionErrors = []; + private readonly List<(int Order, Exception Exception)> failures = []; + private readonly Dictionary splitTrackers = []; + private bool executed; + + public IGraphBatchBuilder Query(Func itemFactory) + { + ArgumentNullException.ThrowIfNull(itemFactory); + itemFactories.Add(() => itemFactory(client)); + return this; + } + + public IGraphBatchBuilder QueryIf(Func itemFactory, bool condition) + { + ArgumentNullException.ThrowIfNull(itemFactory); + itemFactories.Add(() => condition ? itemFactory(client) : null); + return this; + } + + public IGraphBatchBuilder QueryIf(Func itemFactory, Func condition) + { + ArgumentNullException.ThrowIfNull(itemFactory); + ArgumentNullException.ThrowIfNull(condition); + itemFactories.Add(() => condition() ? itemFactory(client) : null); + return this; + } + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + var result = await ExecuteWithResultAsync(cancellationToken); + result.EnsureNoErrors(); + } + + public async Task ExecuteWithResultAsync(CancellationToken cancellationToken = default) + { + if (executed) + { + throw new InvalidOperationException("A batch can only be executed once."); + } + + executed = true; + + var items = CreateItems(); + var order = items.Select((item, index) => (item, index)).ToDictionary(e => e.item, e => e.index); + + foreach (var phase in SplitIntoPhases(items)) + { + if (options.Mode == GraphBatchMode.Parallel) + { + await ExecuteEachAsync(phase, order, cancellationToken); + } + else + { + await ExecuteMergedAsync(phase, order, cancellationToken); + } + } + + foreach (var (graphClient, tracker) in splitTrackers) + { + if (tracker.LearnedSize is { } size) + { + graphClient.RememberAcceptedBatchSize(size); + } + } + + cancellationToken.ThrowIfCancellationRequested(); + + foreach (var item in items.Where(item => item.Responded)) + { + await item.CompleteAsync(); + } + + return new GraphBatchResult( + executionErrors.OrderBy(e => e.Order).Select(e => e.Exception).ToList(), + failures.OrderBy(f => f.Order).Select(f => f.Exception).ToList()); + } + + /// + /// Runs the factories. An item's alias comes from the position it was added at, skipped ones included, so + /// b1 in an error path is always the second query added. + /// + private List CreateItems() + { + var items = new List(); + for (var index = 0; index < itemFactories.Count; index++) + { + var item = itemFactories[index](); + if (item == null) + { + continue; + } + + if (item.Alias != null) + { + throw new InvalidOperationException( + "The same batch item was added twice. Call OnResult once for every query added."); + } + + item.Alias = "b" + index; + items.Add(item); + } + + return items; + } + + /// + /// Consecutive runs of queries and of mutations, in the order they were added: a query added after a + /// mutation is sent after it. + /// + private static IEnumerable> SplitIntoPhases(List items) + { + var phase = new List(); + foreach (var item in items) + { + if (phase.Count > 0 && phase[0].OperationType != item.OperationType) + { + yield return phase; + phase = []; + } + + phase.Add(item); + } + + if (phase.Count > 0) + { + yield return phase; + } + } + + private async Task ExecuteEachAsync(List phase, IReadOnlyDictionary order, + CancellationToken cancellationToken) + { + if (phase[0].OperationType == OperationType.Mutation) + { + foreach (var item in phase) + { + await ExecuteStandaloneAsync(item, order[item], cancellationToken); + } + + return; + } + + await Parallel.ForEachAsync(phase, CreateParallelOptions(cancellationToken), + (item, token) => new ValueTask(ExecuteStandaloneAsync(item, order[item], token))); + } + + private async Task ExecuteStandaloneAsync(GraphBatchItem item, int order, CancellationToken cancellationToken) + { + GraphQLRequest request; + List errors; + try + { + (request, errors) = await item.ExecuteStandaloneAsync(cancellationToken); + } + catch (Exception exception) when (!cancellationToken.IsCancellationRequested) + { + AddFailure(order, exception); + return; + } + + item.Responded = true; + if (errors.Count > 0) + { + AddExecutionError(order, new GraphQueryExecutionException(errors, request.Query, request.Variables)); + } + } + + private async Task ExecuteMergedAsync(List phase, IReadOnlyDictionary order, + CancellationToken cancellationToken) + { + foreach (var item in phase) + { + await item.InitializeAsync(cancellationToken); + } + + var operationType = phase[0].OperationType; + var chunks = phase + .GroupBy(item => item.Client) + .SelectMany(group => group.Chunk(Math.Min(options.MaxItemsPerRequest, + group.Key.AcceptedBatchSize ?? int.MaxValue))) + .ToList(); + + if (operationType == OperationType.Mutation) + { + foreach (var chunk in chunks) + { + await SendChunkAsync(operationType, chunk, false, order, cancellationToken); + } + + return; + } + + await Parallel.ForEachAsync(chunks, CreateParallelOptions(cancellationToken), + (chunk, token) => new ValueTask(SendChunkAsync(operationType, chunk, false, order, token))); + } + + private async Task SendChunkAsync(OperationType operationType, IReadOnlyList chunk, + bool isSplit, IReadOnlyDictionary order, CancellationToken cancellationToken) + { + var graphClient = chunk[0].Client; + var tracker = GetSplitTracker(graphClient); + var request = CreateRequest(operationType, chunk); + var chunkOrder = order[chunk[0]]; + + BatchEnvelope envelope; + try + { + envelope = await SendAsync(graphClient, request, chunk, cancellationToken); + } + catch (BatchRejectedException rejected) when (!cancellationToken.IsCancellationRequested) + { + if (CanSplit(chunk)) + { + await SendHalvesAsync(operationType, chunk, tracker, order, cancellationToken); + return; + } + + tracker.RejectedOnItsOwn(chunk.Count); + AddFailure(chunkOrder, rejected.InnerException); + return; + } + catch (Exception exception) when (!cancellationToken.IsCancellationRequested) + { + AddFailure(chunkOrder, exception); + return; + } + + if (IsRejection(envelope)) + { + if (CanSplit(chunk)) + { + await SendHalvesAsync(operationType, chunk, tracker, order, cancellationToken); + return; + } + + tracker.RejectedOnItsOwn(chunk.Count); + } + else if (isSplit) + { + tracker.Accepted(chunk.Count); + } + + foreach (var item in chunk) + { + item.Responded = envelope.HasData; + } + + if (envelope.Errors.Count > 0) + { + AddExecutionError(chunkOrder, + new GraphQueryExecutionException(envelope.Errors, request.Query, request.Variables)); + } + } + + private bool CanSplit(IReadOnlyList chunk) + { + return options.SplitOnRejection && chunk.Count > 1; + } + + private async Task SendHalvesAsync(OperationType operationType, IReadOnlyList chunk, + SplitTracker tracker, IReadOnlyDictionary order, CancellationToken cancellationToken) + { + tracker.Split(); + var half = (chunk.Count + 1) / 2; + + await SendChunkAsync(operationType, chunk.Take(half).ToList(), true, order, cancellationToken); + await SendChunkAsync(operationType, chunk.Skip(half).ToList(), true, order, cancellationToken); + } + + private SplitTracker GetSplitTracker(GraphClient graphClient) + { + lock (splitTrackers) + { + if (!splitTrackers.TryGetValue(graphClient, out var tracker)) + { + tracker = new SplitTracker(); + splitTrackers[graphClient] = tracker; + } + + return tracker; + } + } + + /// Errors without a path and no data: the server refused the request before executing it. + private static bool IsRejection(BatchEnvelope envelope) + { + return !envelope.HasData && envelope.Errors.Count > 0 && envelope.Errors.All(e => e.Path is not { Count: > 0 }); + } + + private static GraphQLRequest CreateRequest(OperationType operationType, IReadOnlyList chunk) + { + var variables = chunk.SelectMany(item => item.GetVariables()).ToList(); + var selections = new StringBuilder(); + foreach (var item in chunk) + { + selections.Append(item.GetSelectionText()); + } + + return new GraphQLRequest + { + Query = Utilities.GetOperationText(operationType, + variables.Select(variable => (variable.Name, variable.GraphType)).ToList(), selections.ToString()), + Variables = variables.ToDictionary(variable => variable.Name, variable => variable.Value) + }; + } + + private static async Task SendAsync(GraphClient graphClient, GraphQLRequest graphRequest, + IReadOnlyList chunk, CancellationToken cancellationToken) + { + using var request = new HttpRequestMessage(HttpMethod.Post, "") + { + Content = JsonContent.Create(graphRequest, options: graphClient.SerializerOptions) + }; + await graphClient.ConfigureRequestAsync(request, cancellationToken); + + using var response = await graphClient.HttpClient.SendAsync(request, cancellationToken); + var content = await response.Content.ReadAsByteArrayAsync(cancellationToken); + var slots = chunk.ToDictionary(item => item.Alias, IGraphBatchSlot (item) => item); + + BatchEnvelope envelope = null; + try + { + envelope = GraphEnvelopeReader.ReadBatch(content, slots, graphClient.SerializerOptions); + } + catch (JsonException) + { + } + + // A server that rejects a request (validation, a cost limit) may answer with a non-success status and a + // regular GraphQL body: that body is a result, not a transport failure. + if (envelope is { IsEnvelope: true } && (envelope.HasData || envelope.Errors.Count > 0)) + { + return envelope; + } + + var reason = response.IsSuccessStatusCode + ? $"The response is not a GraphQL response, it has neither data nor errors. Status code {response.StatusCode} Body: " + : $"Http error! Status code {response.StatusCode} Error: "; + var failure = new GraphQueryRequestException(reason + Truncate(Encoding.UTF8.GetString(content)), + graphRequest.Query, graphRequest.Variables); + + if (response.StatusCode == HttpStatusCode.RequestEntityTooLarge) + { + throw new BatchRejectedException(failure); + } + + throw failure; + } + + private static string Truncate(string value) + { + return value.Length <= MaxErrorMessageLength ? value : value[..MaxErrorMessageLength] + "...(truncated)"; + } + + private ParallelOptions CreateParallelOptions(CancellationToken cancellationToken) + { + return new ParallelOptions + { + MaxDegreeOfParallelism = options.MaxDegreeOfParallelism, CancellationToken = cancellationToken + }; + } + + private void AddExecutionError(int order, GraphQueryExecutionException exception) + { + lock (executionErrors) + { + executionErrors.Add((order, exception)); + } + } + + private void AddFailure(int order, Exception exception) + { + lock (failures) + { + failures.Add((order, exception)); + } + } + + private sealed class BatchRejectedException(Exception failure) : Exception(failure.Message, failure); + + /// + /// What splitting taught about one client's server. A size is learned only when every query was accepted + /// once requests were small enough: a query rejected even on its own means the rejection was about that query + /// (an invalid field, say), not about the size of the request. + /// + private sealed class SplitTracker + { + private readonly object sync = new(); + private bool split; + private bool rejectedOnItsOwn; + private int largestAccepted; + + public int? LearnedSize + { + get + { + lock (sync) + { + return split && !rejectedOnItsOwn && largestAccepted > 0 ? largestAccepted : null; + } + } + } + + public void Split() + { + lock (sync) + { + split = true; + } + } + + public void Accepted(int size) + { + lock (sync) + { + largestAccepted = Math.Max(largestAccepted, size); + } + } + + public void RejectedOnItsOwn(int size) + { + lock (sync) + { + rejectedOnItsOwn |= size == 1; + } + } + } +} diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchItem.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchItem.cs new file mode 100644 index 00000000..78f80d09 --- /dev/null +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchItem.cs @@ -0,0 +1,105 @@ +//--------------------------------------------------------------------- +// +// Copy of the Linq2GraphQL runtime, written by the Linq2GraphQL generator +// in standalone mode. Please don't edit this file - regenerate instead. +// The runtime version is in RuntimeInfo.cs. +// Github:https://github.com/linq2graphql/linq2graphql.client +//--------------------------------------------------------------------- +#nullable disable +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Text.Json; +using Linq2GraphQL.TestClientStandalone.Runtime.Common; + +namespace Linq2GraphQL.TestClientStandalone.Runtime; + +/// +/// A query with a result callback, ready to be added to a batch. Create one with +/// . The query itself is not changed, so it can still be +/// executed on its own. +/// +public abstract class GraphBatchItem : IGraphBatchSlot +{ + private protected GraphBatchItem() { } + + /// The item's root field alias in a merged request; its variables carry it as a prefix. + internal string Alias { get; set; } + + internal bool Responded { get; set; } + + internal abstract GraphClient Client { get; } + + internal abstract OperationType OperationType { get; } + + internal abstract Task InitializeAsync(CancellationToken cancellationToken); + + internal abstract string GetSelectionText(); + + internal abstract IEnumerable<(string Name, string GraphType, object Value)> GetVariables(); + + void IGraphBatchSlot.ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + ReadData(ref reader, options); + } + + internal abstract void ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options); + + /// Sends the query as its own request; returns that request and the errors it got back. + internal abstract Task<(GraphQLRequest Request, List Errors)> ExecuteStandaloneAsync( + CancellationToken cancellationToken); + + internal abstract Task CompleteAsync(); +} + +internal sealed class QueryBatchItem(GraphQueryExecute query, Func onResult) + : GraphBatchItem +{ + private T data; + + private string VariablePrefix => Alias + "_"; + + internal override GraphClient Client => query.Client; + + internal override OperationType OperationType => query.OperationType; + + internal override Task InitializeAsync(CancellationToken cancellationToken) + { + return query.InitializeAsync(cancellationToken); + } + + internal override string GetSelectionText() + { + return query.QueryNode.GetQueryString(variablePrefix: VariablePrefix, alias: Alias); + } + + internal override IEnumerable<(string Name, string GraphType, object Value)> GetVariables() + { + return query.QueryNode.GetAllActiveArguments() + .Select(argument => (VariablePrefix + argument.VariableName, argument.GraphType, argument.Value)); + } + + internal override void ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + data = reader.TokenType == JsonTokenType.Null ? default : JsonSerializer.Deserialize(ref reader, options); + } + + internal override async Task<(GraphQLRequest Request, List Errors)> ExecuteStandaloneAsync( + CancellationToken cancellationToken) + { + var request = await query.GetRequestAsync(cancellationToken); + var result = await query.ExecuteBaseWithResultAsync(request, cancellationToken); + data = result.Data; + return (request, result.Errors ?? []); + } + + internal override Task CompleteAsync() + { + query.BaseResult = data; + return onResult(query.ConvertResult(data)); + } +} diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchOptions.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchOptions.cs new file mode 100644 index 00000000..6bb31974 --- /dev/null +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchOptions.cs @@ -0,0 +1,59 @@ +//--------------------------------------------------------------------- +// +// Copy of the Linq2GraphQL runtime, written by the Linq2GraphQL generator +// in standalone mode. Please don't edit this file - regenerate instead. +// The runtime version is in RuntimeInfo.cs. +// Github:https://github.com/linq2graphql/linq2graphql.client +//--------------------------------------------------------------------- +#nullable disable +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +namespace Linq2GraphQL.TestClientStandalone.Runtime; + +public enum GraphBatchMode +{ + /// + /// The batch's queries are merged into as few requests as possible, one aliased root field per query. + /// A non-null root field that fails nulls the whole data of its request, so every item in that + /// request is left without a result. + /// + SingleRequest, + + /// + /// Every query is sent as its own request, with at most + /// in flight. A failing query affects only itself. + /// + Parallel +} + +public sealed class GraphBatchOptions +{ + public GraphBatchMode Mode { get; set; } = GraphBatchMode.SingleRequest; + + /// + /// The most queries merged into one request in mode. Choose it so + /// a request stays under the server's size and cost limits; see also . + /// + public int MaxItemsPerRequest { get; set; } = 100; + + /// The most requests in flight at once. Mutations are always sent one at a time, in order. + public int MaxDegreeOfParallelism { get; set; } = 4; + + /// + /// When the server rejects a merged request before executing it (an HTTP 413, or errors without a path and + /// no data, as a size or cost limit produces), send its queries again in two halves, down to single + /// queries. The size that was accepted is remembered by the client for later batches. + /// + public bool SplitOnRejection { get; set; } = true; + + internal void Validate() + { + ArgumentOutOfRangeException.ThrowIfLessThan(MaxItemsPerRequest, 1, nameof(MaxItemsPerRequest)); + ArgumentOutOfRangeException.ThrowIfLessThan(MaxDegreeOfParallelism, 1, nameof(MaxDegreeOfParallelism)); + } +} diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchResult.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchResult.cs new file mode 100644 index 00000000..f13fa4b9 --- /dev/null +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Batching/GraphBatchResult.cs @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------- +// +// Copy of the Linq2GraphQL runtime, written by the Linq2GraphQL generator +// in standalone mode. Please don't edit this file - regenerate instead. +// The runtime version is in RuntimeInfo.cs. +// Github:https://github.com/linq2graphql/linq2graphql.client +//--------------------------------------------------------------------- +#nullable disable +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Runtime.ExceptionServices; + +namespace Linq2GraphQL.TestClientStandalone.Runtime; + +public sealed class GraphBatchResult +{ + private readonly IReadOnlyList executionErrors; + + internal GraphBatchResult(IReadOnlyList executionErrors, + IReadOnlyList failures) + { + this.executionErrors = executionErrors; + Failures = failures; + Errors = executionErrors.SelectMany(e => e.Errors).ToList(); + } + + /// The GraphQL errors of every request in the batch; an error's path starts with its item's alias. + public IReadOnlyList Errors { get; } + + /// Requests that got no GraphQL response, such as HTTP errors and timeouts. + public IReadOnlyList Failures { get; } + + public bool HasErrors => Errors.Count > 0 || Failures.Count > 0; + + /// + /// Throws when the batch had errors: the single exception as is, several as an + /// . GraphQL errors are a + /// per request. + /// + public void EnsureNoErrors() + { + var exceptions = executionErrors.Concat(Failures).ToList(); + if (exceptions.Count == 1) + { + ExceptionDispatchInfo.Capture(exceptions[0]).Throw(); + } + + if (exceptions.Count > 1) + { + throw new AggregateException("Several requests of the batch failed.", exceptions); + } + } +} diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Common/GraphEnvelopeReader.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Common/GraphEnvelopeReader.cs index b52223f6..ae90a633 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Common/GraphEnvelopeReader.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Common/GraphEnvelopeReader.cs @@ -23,8 +23,8 @@ namespace Linq2GraphQL.TestClientStandalone.Runtime.Common; /// extensions). Reads directly from UTF-8 bytes: only the requested field under /// "data" is deserialized; sibling root fields are skipped without materializing a typed /// value. No JsonDocument and no UTF-16 round trip. Every response path (typed queries, -/// raw GraphClient.ExecuteAsync, the public ProcessResponse overloads and subscription -/// payloads) goes through here, so they cannot drift apart. +/// raw GraphClient.ExecuteAsync, the public ProcessResponse overloads, subscription +/// payloads and batches) goes through here, so they cannot drift apart. /// internal static class GraphEnvelopeReader { @@ -51,15 +51,36 @@ internal static GraphResult ReadDocument(ReadOnlySpan utf8, J return ReadCore(utf8, null, options, out isEnvelope); } + /// + /// Reads the envelope of a batch response: each root field under data whose name is a key of + /// is handed to that slot; other fields are skipped. + /// + internal static BatchEnvelope ReadBatch(ReadOnlySpan utf8, IReadOnlyDictionary slots, + JsonSerializerOptions options) + { + var sink = new BatchDataSink(slots); + var (errors, extensions) = ReadEnvelope(utf8, ref sink, options, out var isEnvelope); + return new BatchEnvelope(isEnvelope, sink.HasData, errors ?? [], extensions); + } + /// Root field to read, or null to read the whole data value. private static GraphResult ReadCore(ReadOnlySpan utf8, string name, JsonSerializerOptions options, out bool isEnvelope) + { + var sink = new SingleDataSink(name); + var (errors, extensions) = ReadEnvelope(utf8, ref sink, options, out isEnvelope); + return new GraphResult { Data = sink.Data, Errors = errors, Extensions = extensions }; + } + + private static (List Errors, Dictionary Extensions) ReadEnvelope( + ReadOnlySpan utf8, ref TSink sink, JsonSerializerOptions options, out bool isEnvelope) + where TSink : struct, IDataSink { isEnvelope = false; if (utf8.Length == 0) { - return new GraphResult { Data = default }; + return (null, null); } var reader = new Utf8JsonReader(utf8, isFinalBlock: true, state: default); @@ -68,7 +89,6 @@ private static GraphResult ReadCore(ReadOnlySpan utf8, string name, { List errors = null; Dictionary extensions = null; - T data = default; while (reader.Read()) { @@ -84,9 +104,7 @@ private static GraphResult ReadCore(ReadOnlySpan utf8, string name, { case "data": isEnvelope = true; - data = name == null - ? JsonSerializer.Deserialize(ref reader, options) - : ReadData(ref reader, name, options); + sink.ReadData(ref reader, options); break; case "errors": isEnvelope = true; @@ -102,7 +120,7 @@ private static GraphResult ReadCore(ReadOnlySpan utf8, string name, } } - return new GraphResult { Data = data, Errors = errors, Extensions = extensions }; + return (errors, extensions); } throw new JsonException("GraphQL response envelope must be a JSON object."); @@ -151,4 +169,75 @@ private static TData ReadData(ref Utf8JsonReader reader, string name, Jso return result; } + + private interface IDataSink + { + void ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options); + } + + private struct SingleDataSink(string name) : IDataSink + { + public T Data { get; private set; } + + public void ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + Data = name == null + ? JsonSerializer.Deserialize(ref reader, options) + : ReadData(ref reader, name, options); + } + } + + private struct BatchDataSink(IReadOnlyDictionary slots) : IDataSink + { + public bool HasData { get; private set; } + + public void ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return; + } + + if (reader.TokenType != JsonTokenType.StartObject) + { + throw new JsonException("The 'data' property must be a JSON object or null."); + } + + HasData = true; + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) + { + break; + } + + var fieldName = reader.GetString(); + reader.Read(); + + if (fieldName != null && slots.TryGetValue(fieldName, out var slot)) + { + slot.ReadData(ref reader, options); + } + else + { + reader.Skip(); + } + } + } + } +} + +/// A root field of a batch response, deserialized by the item that asked for it. +internal interface IGraphBatchSlot +{ + /// Reads the field's value; the reader is on its first token, which may be null. + void ReadData(ref Utf8JsonReader reader, JsonSerializerOptions options); } + +/// The body carried data or errors: it is a GraphQL response. +/// data was an object, so the operation executed (fully or in part). +internal sealed record BatchEnvelope( + bool IsEnvelope, + bool HasData, + List Errors, + Dictionary Extensions); diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphBaseExecute.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphBaseExecute.cs index 3ec6e302..a2198053 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphBaseExecute.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphBaseExecute.cs @@ -15,7 +15,6 @@ using Linq2GraphQL.TestClientStandalone.Runtime.Schema; using System.Collections.Generic; using System.Linq.Expressions; -using System.Text; using System.Text.Json; namespace Linq2GraphQL.TestClientStandalone.Runtime; @@ -76,20 +75,14 @@ private async Task InitQueryAsync(CancellationToken cancellationToken) public GraphQLSchema Schema => schema; - private string GetQueryVariablesString(IReadOnlyList args) - { - if (args.Count == 0) - { - return ""; - } + internal GraphClient Client => client; - var text = new StringBuilder(args.Count * 32); - foreach (var argument in args) - { - text.Append('$').Append(argument.VariableName).Append(": ").Append(argument.GraphType).Append(' '); - } + internal OperationType OperationType => operationType; - return $"({text})"; + /// The one-time setup a request needs, done for a batch that renders the query itself. + internal Task InitializeAsync(CancellationToken cancellationToken) + { + return InitQueryAsync(cancellationToken); } public Task GetRequestAsJsonAsync() @@ -174,13 +167,7 @@ public async Task GetRequestAsync(CancellationToken cancellation private string GetGraphQLQuery(IReadOnlyList args) { - return GetOperationType() + GetQueryVariablesString(args) + "{ " + Environment.NewLine + - QueryNode.GetQueryString() + Environment.NewLine + "}"; - } - - private string GetOperationType() - { - return operationType.ToString().ToLower(); + return Utilities.GetOperationText(operationType, args, QueryNode.GetQueryString()); } public TResult ConvertResult(T result) diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphClient.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphClient.cs index 7c3c75f2..1ff8353b 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphClient.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphClient.cs @@ -113,6 +113,27 @@ public Task> ExecuteAsync(string query, IDictionary options.Value; + private int acceptedBatchSize; + + /// + /// The largest number of merged queries the server accepted after rejecting a bigger batch request, or null + /// when no batch request has been rejected yet. + /// + internal int? AcceptedBatchSize => acceptedBatchSize == 0 ? null : acceptedBatchSize; + + internal void RememberAcceptedBatchSize(int size) + { + int current; + do + { + current = acceptedBatchSize; + if (current != 0 && current <= size) + { + return; + } + } while (Interlocked.CompareExchange(ref acceptedBatchSize, size, current) != current); + } + /// /// The connection_init payload delegate from , diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphQueryExecute.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphQueryExecute.cs index 03a58ea8..2a34305b 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphQueryExecute.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/GraphQueryExecute.cs @@ -46,8 +46,13 @@ await queryExecutor.ExecuteRequestAsync(QueryNode.Name, await GetRequestAsync(ca public async Task> ExecuteBaseWithResultAsync(CancellationToken cancellationToken = default) { - var result = await queryExecutor.ExecuteRawAsync(QueryNode.Name, await GetRequestAsync(cancellationToken), - cancellationToken); + return await ExecuteBaseWithResultAsync(await GetRequestAsync(cancellationToken), cancellationToken); + } + + internal async Task> ExecuteBaseWithResultAsync(GraphQLRequest request, + CancellationToken cancellationToken) + { + var result = await queryExecutor.ExecuteRawAsync(QueryNode.Name, request, cancellationToken); BaseResult = result.Data; return result; } @@ -61,4 +66,25 @@ public async Task> ExecuteWithResultAsync(CancellationToken { return ConvertResultFull(await ExecuteBaseWithResultAsync(cancellationToken)); } + + /// + /// Makes this query an item of a batch (see ). Once the batch has executed, + /// receives the result; it is not called when no response arrived for the item. + /// + public GraphBatchItem OnResult(Action onResult) + { + ArgumentNullException.ThrowIfNull(onResult); + return new QueryBatchItem(this, result => + { + onResult(result); + return Task.CompletedTask; + }); + } + + /// + public GraphBatchItem OnResultAsync(Func onResult) + { + ArgumentNullException.ThrowIfNull(onResult); + return new QueryBatchItem(this, onResult); + } } \ No newline at end of file diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/QueryNode.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/QueryNode.cs index 2c0193a0..f3025a2e 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/QueryNode.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/QueryNode.cs @@ -198,7 +198,7 @@ public List GetAllActiveArguments() return allArguments; } - private string GetArgumentString() + private string GetArgumentString(string variablePrefix) { var args = GetActiveArguments(); ; @@ -210,7 +210,7 @@ private string GetArgumentString() var argString = "("; foreach (var arg in args) { - argString += arg.GraphName + ":$" + arg.VariableName + " "; + argString += arg.GraphName + ":$" + variablePrefix + arg.VariableName + " "; } argString.TrimEnd(); @@ -220,22 +220,25 @@ private string GetArgumentString() } - internal string GetQueryString(string indent = "") + /// Put in front of every variable name, so several queries can share one document. + /// The alias of this node, in place of . + internal string GetQueryString(string indent = "", string variablePrefix = "", string alias = null) { string query; var memberType = Member.GetUnderlyingType(); + alias ??= Alias; if (InterfaceProperty) { - query = "... on " + Name + GetArgumentString() + Environment.NewLine; + query = "... on " + Name + GetArgumentString(variablePrefix) + Environment.NewLine; } - else if (!string.IsNullOrWhiteSpace(Alias)) + else if (!string.IsNullOrWhiteSpace(alias)) { - query = Alias + ":" + Name + GetArgumentString() + Environment.NewLine; + query = alias + ":" + Name + GetArgumentString(variablePrefix) + Environment.NewLine; } else { - query = Name + GetArgumentString() + Environment.NewLine; + query = Name + GetArgumentString(variablePrefix) + Environment.NewLine; } if (memberType.IsListOfPrimitiveTypeOrString()) @@ -250,7 +253,7 @@ internal string GetQueryString(string indent = "") var newIndent = " " + indent; foreach (var childNode in ChildNodes) { - query += childNode.GetQueryString(newIndent); + query += childNode.GetQueryString(newIndent, variablePrefix); } } diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Utilities.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Utilities.cs index 6db5848e..28c803bb 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Utilities.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/Client/Utilities.cs @@ -29,6 +29,41 @@ public static class Utilities /// Separates one argument from the next so that adjacent values cannot run together. private const char Separator = (char)31; + /// + /// The GraphQL document for one operation: its keyword, the declarations of + /// and , the root fields as rendered by . + /// + internal static string GetOperationText(OperationType operationType, IReadOnlyList arguments, + string selections) + { + return GetOperationText(operationType, + arguments.Select(argument => (argument.VariableName, argument.GraphType)).ToList(), selections); + } + + /// The declared variables: their names as the selections use them, and their GraphQL types. + internal static string GetOperationText(OperationType operationType, + IReadOnlyList<(string Name, string GraphType)> variables, string selections) + { + return operationType.ToString().ToLower() + GetVariableDeclarations(variables) + "{ " + Environment.NewLine + + selections + Environment.NewLine + "}"; + } + + private static string GetVariableDeclarations(IReadOnlyList<(string Name, string GraphType)> variables) + { + if (variables.Count == 0) + { + return ""; + } + + var text = new StringBuilder(variables.Count * 32); + foreach (var (name, graphType) in variables) + { + text.Append('$').Append(name).Append(": ").Append(graphType).Append(' '); + } + + return $"({text})"; + } + /// /// Identifies a set of field arguments so that the same field requested with different arguments becomes /// several aliased selections. The result is derived from the argument values only, because the alias has diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/RuntimeInfo.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/RuntimeInfo.cs index 37f14373..436f2302 100644 --- a/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/RuntimeInfo.cs +++ b/test/Linq2GraphQL.TestClientStandalone/Generated/Runtime/RuntimeInfo.cs @@ -18,5 +18,5 @@ namespace Linq2GraphQL.TestClientStandalone.Runtime; /// public static class RuntimeInfo { - public const string Version = "1.0.84-prerelease"; + public const string Version = "1.0.96-prerelease"; } diff --git a/test/Linq2GraphQL.Tests.Standalone/Linq2GraphQL.Tests.Standalone.csproj b/test/Linq2GraphQL.Tests.Standalone/Linq2GraphQL.Tests.Standalone.csproj index 15967aa7..96567edd 100644 --- a/test/Linq2GraphQL.Tests.Standalone/Linq2GraphQL.Tests.Standalone.csproj +++ b/test/Linq2GraphQL.Tests.Standalone/Linq2GraphQL.Tests.Standalone.csproj @@ -35,17 +35,21 @@ true + + 1.0.67-prerelease diff --git a/Directory.Packages.props b/Directory.Packages.props index 72542c81..7b9090e1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,6 +16,9 @@ + + + diff --git a/Linq2GraphQL.CI.slnf b/Linq2GraphQL.CI.slnf index be5bfa99..dbbafbcc 100644 --- a/Linq2GraphQL.CI.slnf +++ b/Linq2GraphQL.CI.slnf @@ -8,6 +8,8 @@ "src\\Linq2GraphQL.Generator\\Linq2GraphQL.Generator.csproj", "test\\Linq2GraphQL.Console\\Linq2GraphQL.Console.csproj", "test\\Linq2GraphQL.Agent.Sample\\Linq2GraphQL.Agent.Sample.csproj", + "test\\Linq2GraphQL.Compat\\Baseline\\Linq2GraphQL.Compat.Baseline.csproj", + "test\\Linq2GraphQL.Compat\\Tests\\Linq2GraphQL.Compat.Tests.csproj", "test\\Linq2GraphQL.TestClient\\Linq2GraphQL.TestClient.csproj", "test\\Linq2GraphQL.TestClientNullable\\Linq2GraphQL.TestClientNullable.csproj", "test\\Linq2GraphQL.TestClientStandalone\\Linq2GraphQL.TestClientStandalone.csproj", diff --git a/Linq2GraphQL.sln b/Linq2GraphQL.sln index 51b9a7b4..8d9ed164 100644 --- a/Linq2GraphQL.sln +++ b/Linq2GraphQL.sln @@ -66,12 +66,26 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nullable", "nullable", "{3D EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nonnullable", "nonnullable", "{1F4F9593-3C19-4C2E-AF8C-C269659AA12A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "compat", "compat", "{5A3C9E21-7B4D-4E8F-A1C2-3D5E6F708192}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.Compat.Baseline", "test\Linq2GraphQL.Compat\Baseline\Linq2GraphQL.Compat.Baseline.csproj", "{71546B4D-AD64-4204-B806-F580FB20CBF7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.Compat.Tests", "test\Linq2GraphQL.Compat\Tests\Linq2GraphQL.Compat.Tests.csproj", "{2ECBBDFD-961C-4686-9D40-0F35D83D196D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {71546B4D-AD64-4204-B806-F580FB20CBF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71546B4D-AD64-4204-B806-F580FB20CBF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71546B4D-AD64-4204-B806-F580FB20CBF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71546B4D-AD64-4204-B806-F580FB20CBF7}.Release|Any CPU.Build.0 = Release|Any CPU + {2ECBBDFD-961C-4686-9D40-0F35D83D196D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2ECBBDFD-961C-4686-9D40-0F35D83D196D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2ECBBDFD-961C-4686-9D40-0F35D83D196D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2ECBBDFD-961C-4686-9D40-0F35D83D196D}.Release|Any CPU.Build.0 = Release|Any CPU {AD8291B6-5979-4C43-B785-EAD4FF93C564}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AD8291B6-5979-4C43-B785-EAD4FF93C564}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD8291B6-5979-4C43-B785-EAD4FF93C564}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -141,6 +155,9 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {71546B4D-AD64-4204-B806-F580FB20CBF7} = {5A3C9E21-7B4D-4E8F-A1C2-3D5E6F708192} + {2ECBBDFD-961C-4686-9D40-0F35D83D196D} = {5A3C9E21-7B4D-4E8F-A1C2-3D5E6F708192} + {5A3C9E21-7B4D-4E8F-A1C2-3D5E6F708192} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2} {AD8291B6-5979-4C43-B785-EAD4FF93C564} = {1F4F9593-3C19-4C2E-AF8C-C269659AA12A} {F412B4C3-F872-483C-A55D-B49782ACAAFE} = {1F4F9593-3C19-4C2E-AF8C-C269659AA12A} {F9EAFD31-9AF1-47DF-9C78-003C7AC67C5D} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2} diff --git a/scripts/update-compat-baseline.ps1 b/scripts/update-compat-baseline.ps1 new file mode 100644 index 00000000..9b9a9bdb --- /dev/null +++ b/scripts/update-compat-baseline.ps1 @@ -0,0 +1,78 @@ +#!/usr/bin/env pwsh +<# +.SYNOPSIS + Moves the compatibility baseline to another published release. + +.DESCRIPTION + test/Linq2GraphQL.Compat checks that an app which updates the runtime packages and keeps its generated client + behaves as before. It holds a frozen copy of the test clients as the baseline release generated them, and runs + them against that release's packages and against this code. + + After a release, run this with the new version. It copies the test clients from the release's git tag into + test/Linq2GraphQL.Compat/FrozenClients, sets Linq2GraphQLBaselineVersion in Directory.Build.props (package + validation uses it too), clears the accepted differences, which the new baseline contains, and refreshes the + baseline runner's lock file. Review and commit the result. + +.PARAMETER Version + The published version to compare against; its git tag must exist. + +.EXAMPLE + ./scripts/update-compat-baseline.ps1 -Version 1.0.67-prerelease +#> +[CmdletBinding()] +param( + [Parameter(Mandatory)] + [string]$Version +) + +$ErrorActionPreference = 'Stop' +$repoRoot = Split-Path -Parent $PSScriptRoot +$compatRoot = Join-Path $repoRoot 'test/Linq2GraphQL.Compat' +$frozenClients = Join-Path $compatRoot 'FrozenClients' +$clients = @('Linq2GraphQL.TestClient', 'Linq2GraphQL.TestClientNullable') + +git -C $repoRoot rev-parse --verify --quiet "refs/tags/$Version" | Out-Null +if ($LASTEXITCODE -ne 0) { throw "There is no git tag $Version. Run git fetch --tags first." } + +$extracted = Join-Path ([System.IO.Path]::GetTempPath()) "linq2graphql-baseline-$([guid]::NewGuid())" +New-Item -ItemType Directory $extracted | Out-Null +try { + Write-Host "==> Copying the test clients of $Version" -ForegroundColor Cyan + $archive = Join-Path $extracted 'clients.tar' + git -C $repoRoot archive --format=tar -o $archive $Version -- @($clients | ForEach-Object { "test/$_" }) + if ($LASTEXITCODE -ne 0) { throw 'git archive failed.' } + tar -xf $archive -C $extracted + if ($LASTEXITCODE -ne 0) { throw 'Extracting the test clients failed.' } + + Remove-Item $frozenClients -Recurse -Force -ErrorAction Ignore + foreach ($client in $clients) { + $source = Join-Path $extracted "test/$client" + Get-ChildItem $source -Recurse -File -Filter '*.cs' | ForEach-Object { + $target = Join-Path $frozenClients $client ([System.IO.Path]::GetRelativePath($source, $_.FullName)) + New-Item -ItemType Directory -Force (Split-Path $target) | Out-Null + Copy-Item $_.FullName $target + } + } +} +finally { + Remove-Item $extracted -Recurse -Force -ErrorAction Ignore +} + +Write-Host "==> Setting Linq2GraphQLBaselineVersion to $Version" -ForegroundColor Cyan +$props = Join-Path $repoRoot 'Directory.Build.props' +$content = [System.IO.File]::ReadAllText($props) +$updated = [regex]::Replace($content, '[^<]*', + "$Version") +if ($updated -eq $content -and $content -notmatch [regex]::Escape(">$Version<")) { + throw "Linq2GraphQLBaselineVersion was not found in $props." +} +[System.IO.File]::WriteAllText($props, $updated) + +Write-Host '==> Clearing the accepted differences' -ForegroundColor Cyan +[System.IO.File]::WriteAllText((Join-Path $compatRoot 'Tests/accepted-differences.json'), "{}`n") + +Write-Host '==> Refreshing the baseline runner lock file' -ForegroundColor Cyan +dotnet restore (Join-Path $compatRoot 'Baseline/Linq2GraphQL.Compat.Baseline.csproj') --nologo +if ($LASTEXITCODE -ne 0) { throw 'Restore failed.' } + +Write-Host '==> Done. Review and commit the result.' -ForegroundColor Green diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index a2cf7569..d5c7e740 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,11 +1,11 @@ true - 1.0.67-prerelease + $(Linq2GraphQLBaselineVersion) diff --git a/test/Linq2GraphQL.Compat/Baseline/BaselineRunner.cs b/test/Linq2GraphQL.Compat/Baseline/BaselineRunner.cs new file mode 100644 index 00000000..5a252aa0 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Baseline/BaselineRunner.cs @@ -0,0 +1,19 @@ +using System.Text.Json; + +namespace Linq2GraphQL.Compat; + +internal static class BaselineRunner +{ + public static async Task Main(string[] args) + { + if (args.Length != 1) + { + await Console.Error.WriteLineAsync("Usage: Linq2GraphQL.Compat.Baseline "); + return 2; + } + + var records = await CompatRunner.RunAllAsync(); + await File.WriteAllTextAsync(args[0], JsonSerializer.Serialize(records)); + return 0; + } +} diff --git a/test/Linq2GraphQL.Compat/Baseline/Linq2GraphQL.Compat.Baseline.csproj b/test/Linq2GraphQL.Compat/Baseline/Linq2GraphQL.Compat.Baseline.csproj new file mode 100644 index 00000000..a388a162 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Baseline/Linq2GraphQL.Compat.Baseline.csproj @@ -0,0 +1,17 @@ + + + + + + Exe + + + + + + + + diff --git a/test/Linq2GraphQL.Compat/Baseline/packages.lock.json b/test/Linq2GraphQL.Compat/Baseline/packages.lock.json new file mode 100644 index 00000000..64eacb47 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Baseline/packages.lock.json @@ -0,0 +1,929 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Linq2GraphQL.Client": { + "type": "Direct", + "requested": "[1.0.67-prerelease, )", + "resolved": "1.0.67-prerelease", + "contentHash": "8vhtW8EabV4U3w+z/9YOYBoD9jyV3MMrK6V3iCqw0YinOSznq5/rl/5T9wl6kBKD2Wzdq+2Sl9kCJXEnkhtK9Q==", + "dependencies": { + "Microsoft.Extensions.Caching.Memory": "10.0.11", + "Microsoft.Extensions.Http": "10.0.11" + } + }, + "Linq2GraphQL.Client.Subscriptions": { + "type": "Direct", + "requested": "[1.0.67-prerelease, )", + "resolved": "1.0.67-prerelease", + "contentHash": "Qnk4NRUu+tU3eFU5E6FOU7+MpL77beUqSlsGu9iOWCpE+X8qDkJrrsgk7dLtYV6M2+g/hZwSrJvESZMqhmaGag==", + "dependencies": { + "Linq2GraphQL.Client": "1.0.67-prerelease", + "Websocket.Client": "5.3.0" + } + }, + "Microsoft.AspNetCore.Mvc.Testing": { + "type": "Direct", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "BJi3rpYETlh0wd14Lg5Is9MWvEf55TAGd7yo+xGHuEZp7ololyvftbQZ1i7ZuITA7DgNPJED6EMhFSWycq7SBg==", + "dependencies": { + "Microsoft.AspNetCore.TestHost": "10.0.11", + "Microsoft.Extensions.DependencyModel": "10.0.11", + "Microsoft.Extensions.Hosting": "10.0.11" + } + }, + "Nerdbank.GitVersioning": { + "type": "Direct", + "requested": "[3.8.118, )", + "resolved": "3.8.118", + "contentHash": "cRaG+ICcECG+CzbtQyUV2WftH7yl2B02AjYGGNScXx8TwYavZYwhCewBTiC0qTcsac7m6AzBUYna5xzBWmTGYw==" + }, + "ChilliCream.Nitro.App": { + "type": "Transitive", + "resolved": "32.0.2", + "contentHash": "wSD2dFFraVpIsQDiy31k1vkGWYAGdzNVXOhtOIujMt/ADAzfkEbJUsPyF4qoktFspepN4VrAN7DMS8QRqkEhTg==", + "dependencies": { + "Yarp.ReverseProxy": "2.3.0" + } + }, + "GreenDonut": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "nzv5xP1krDEqhq4GekXWdKlvGPb0NM8JF3B0WpEqIS/tVG7U3sBaQuGCMSNJ02kvrtcde+YEPYtcTh7Y0SJ+CA==", + "dependencies": { + "GreenDonut.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0", + "Microsoft.Extensions.ObjectPool": "10.0.0" + } + }, + "GreenDonut.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "egSQAz8BbFmLqOWtX0s/xlaqz/43fHUzdu/9TjpZ3s4F8FIVgO4rBfKNFWt2nsba9tvT1AW2WbAaf+3pY6IN0w==" + }, + "GreenDonut.Data": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "kYYLxAEPJl0/vdWF2i5pNs6pndGbuiz8OFAyUovfsu2Guo3dSomkU91PC0kpOeToXoQyRDdjz3GUKNBFnT9PQw==", + "dependencies": { + "GreenDonut": "16.6.4", + "GreenDonut.Data.Abstractions": "16.6.4" + } + }, + "GreenDonut.Data.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "Ao8i3nm86+vRKlpctKoWvZ4OdjSLPAQmWp3VMFmCuMVF3rbsVR8TxLRcAG/2/B6VdbGQyOO8tJUGSAooncu28g==", + "dependencies": { + "GreenDonut.Abstractions": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4" + } + }, + "GreenDonut.Data.Primitives": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "p3185VDDm5xV6ZQrkJWkmYaPCVE2BIg6up6R6DrQKnCwIMv3VDzFgNLnVu2eNqoj3iEplBZJBdk1OzvYZO3Xdg==" + }, + "HotChocolate": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "bvEKPvyd0OhZd5usrPxWcGToM860SOlupW+edNobvZiyltlcxnZkfZ7u8Vx8MNtA0OswLyjaL1RI3+JashlE/g==", + "dependencies": { + "HotChocolate.Authorization": "16.6.4", + "HotChocolate.CostAnalysis": "16.6.4", + "HotChocolate.Execution.Projections": "16.6.4", + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.CursorPagination": "16.6.4", + "HotChocolate.Types.CursorPagination.Extensions": "16.6.4", + "HotChocolate.Types.Mutations": "16.6.4", + "HotChocolate.Types.Queries": "16.6.4", + "HotChocolate.Validation": "16.6.4" + } + }, + "HotChocolate.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "1ELetbKeMEJXK1D/G9kR55XGF4FkaYS8zvLkWIl/3s75BWPTk97vzC/EBgTEC5Q/Wj7zmBDUwdA7a9noezeoFw==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Language": "16.6.4", + "HotChocolate.Primitives": "16.6.4" + } + }, + "HotChocolate.AspNetCore.Pipeline": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "j3T4SnePMXVbrOyniu9SFvA7jOfHlcVjEeyvEh60UD/xaPIP1+L5WofDpP1088JwwvLlpYCWdyEmXhNoFy8Q+g==", + "dependencies": { + "ChilliCream.Nitro.App": "32.0.2", + "HotChocolate.Caching.Memory": "16.6.4", + "HotChocolate.PersistedOperations.Abstractions": "16.6.4", + "HotChocolate.Transport.Formatters": "16.6.4", + "HotChocolate.Transport.Sockets": "16.6.4" + } + }, + "HotChocolate.Authorization": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "2TIXgq49SYmfC+NMV+poOq83JeScz0ZkEhHSgv91lNDTZINz06DlxcCrlsf2q+ns8fIS3rbnnHJswBzobE+qUA==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Caching.Memory": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oEOWL5+6wVG7HQHil5EydXcCdV296ZSuUO27mZYAxq5wMx9aX9D/ZkUOWU3To1vo75w767tqrr7+OEGWjPxuiA==" + }, + "HotChocolate.CostAnalysis": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "LcrorDRmMdWjRyCOxnYbqIuDB/qdP5oFXBw4gkgNdnjov0C7BGz5z0M074OvgdzsnqQYb7iDWcaPPtZq6zCVxA==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Execution.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "pmaAsn6q4C/elx0SVnTGYWZxy3AqY5V7FYf/3CR8fq7i4rMKH/hHe/qfIoAzC6Phbg1tacHlT2YBeOAssQ3GoA==", + "dependencies": { + "HotChocolate.Features": "16.6.4", + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Language.Web": "16.6.4", + "HotChocolate.Primitives": "16.6.4", + "HotChocolate.Text.Json": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4", + "HotChocolate.Utilities.Tasks": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Execution.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "OP16Y71IuSuBhGuTNo3gujdBF5HP1WmZYtNV6bUpCv/r4r7dG8rKQYxd2nlnPfTeiFQsvZyqGNKQLxATwxOiCQ==", + "dependencies": { + "HotChocolate.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Execution.Operation.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "yfXI/ps/VYFyVtj3Z29ImoSLxGfn5OTRXmhkpQtKhQLTiFA8DbxU8/swXRx8bTJL8YS3AOAdPn5qiZBD6rz93Q==", + "dependencies": { + "HotChocolate.Features": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4" + } + }, + "HotChocolate.Execution.Pipeline": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "ZaJ48M13jKTsVphND7rK+JvWkxM3oDmYLL/JDNj0zjMqMH77PQSLVALK/OOKSI0HxhDbKWdVSvUMKg7MoXrJ5A==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Validation": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Execution.Projections": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "9cqrsEdbY8JfKgLgRGvM3rBfrC7fvb6rl+kORlXVMOvxDTbL75vrvmKyTHC1HmlJdQ56wTUq33Y6ycEJdoCwNw==", + "dependencies": { + "GreenDonut.Data": "16.6.4", + "GreenDonut.Data.Abstractions": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4", + "HotChocolate.Caching.Memory": "16.6.4", + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Features": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "0SGN2IDkopXsaxaN0qT+Ww5d/Y+yV4ZvG+xCKU0CvWlTnrq6JrpgeZcJF594EwJnXB4Zja3Wn1piKFEh0ewPDw==" + }, + "HotChocolate.Fusion.Language": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "euXggAJYrOhpd0OpDXLZOQ49AocNkIYUCVEoU6403EDTN46PnaDz2ltGnhcYk8bI1qMq0nm+ZbcmREcdRJfonQ==" + }, + "HotChocolate.Fusion.Utilities": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "HDz/NdyIDNCfUx2JvInVbsr4F3f9a8jyXlnM5mbGV0caZv8Hr1ozyY9NOyltZtkomdk0TKXVN8YaxBWnfwMBLA==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Fusion.Language": "16.6.4", + "HotChocolate.Language": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4" + } + }, + "HotChocolate.Language": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oLEo6gvXVcKN/sDOSKxB0pFYBId1OSdKB+yxVRzg88M3q8N2uq89Q0P7fnpwUuiobay511gvXXihYaBxNt3xVA==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Language.Utf8": "16.6.4", + "HotChocolate.Language.Visitors": "16.6.4", + "HotChocolate.Language.Web": "16.6.4" + } + }, + "HotChocolate.Language.SyntaxTree": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "BDsJMdv6LjYEfGVQiAVhSf50xbAIrigoZUzjUoncbXGXzrfAJaVsGkZs6mR1z0UcTWrlSNoFRosxbtY07iPnCg==", + "dependencies": { + "HotChocolate.Utilities.Buffers": "16.6.4", + "Microsoft.Extensions.ObjectPool": "10.0.0" + } + }, + "HotChocolate.Language.Utf8": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "Ria0zRrpy4nXVvuczx14Vbe+8jdVPPryUlKjfUVUZCmU9Ntif/XhaFmVYo3HtS+FVkFHSRA1o0DeTXEoDnzX9Q==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Language.Utf8.SyntaxTree": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4" + } + }, + "HotChocolate.Language.Utf8.SyntaxTree": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "2nnk9e2GT4N8HlVXvtYYOEJysPUiZMQnjtSnLSltW9YC1VW/E4IGnxxJ2Gt7Mj+4yUSlQ+61DnzOD+UtSF09Kg==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4" + } + }, + "HotChocolate.Language.Visitors": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "MWHB8709Ho2bQkIXuzTGKw91L9z675poWJ1lg6BGmdg3/ZnfsXGAv8cdP/cA4UzB1rOtYJTqrh2YP7xywHvwCQ==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4" + } + }, + "HotChocolate.Language.Web": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "7GWlN019RYlbGJ88j9gw34exwD562PsiJ49zs8RALAzJnmC000KgH5vHikUbPVU5eeO8nUunyCEQafdgypY68A==", + "dependencies": { + "HotChocolate.Language.Utf8": "16.6.4", + "HotChocolate.Language.Visitors": "16.6.4" + } + }, + "HotChocolate.PersistedOperations.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oUpPCiwIfrlk7Cswh+c9J+iRnmNIbRlA7EmGeL/nOR93xSMiCd9zgrkAtBggP4SdyESY9dD628lQZb8AkqXZdw==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4" + } + }, + "HotChocolate.PersistedOperations.Pipeline": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "h1VeBRoKQVg5BZnhLHwUHhGApOa8Rk31s64PNG1darAqUnX9v8ZNd/oiv+cQ6CabraQHmbvvvR2DfE/XGsygcA==", + "dependencies": { + "HotChocolate.PersistedOperations.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Primitives": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "u4FkIs8tKYWJ3I0vTEDPXaPhy4zfhFNZNWqef3tRPGpnQe1rg+7FdM+V1bNs6j94ucY8fX5DTNDJy9OGVe4e3g==", + "dependencies": { + "HotChocolate.Language": "16.6.4" + } + }, + "HotChocolate.Subscriptions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "L9CzlWy1cHZFixMWyZmtbI5pmqlfwHjGBjF0+pVnbJJaYQv2eSc4Q/8kdQjkhdGuhewPtC44OAMki1br9/Azpw==", + "dependencies": { + "HotChocolate.Abstractions": "16.6.4", + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Utilities": "16.6.4" + } + }, + "HotChocolate.Subscriptions.InMemory": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "/3Tm/h3jw+nrv5CHtszE3iAnG3n3odP842QrTid7mxrEmaMEqE74RA00wTmFaO/bbepCnmymXLxox31nC30TAQ==", + "dependencies": { + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Subscriptions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Text.Json": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "sBxtzPsvDjsw9V9VKy/NomlPE1ruprKHU5iTuHJUZ2i20Ihvq4ouxff0O7yCD1iA32NCaLNL3zvNJagZNV/nTQ==" + }, + "HotChocolate.Transport.Formatters": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "fl16wIiX4FAbSs2TSUM7yorg3awV2cUDNBMN9LU/mPcEN9yzgNN7FsIKQdl1TiqiXSAz5/ihVtBqLJBliws8uw==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4", + "HotChocolate.Utilities.Tasks": "16.6.4" + } + }, + "HotChocolate.Transport.Sockets": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "g67fURnanTGuLJwWxRG4E5PJfl+K6TZx8afNc6u+flbbwmTR+7TKEx7b/ZrlzqxCSqASA4H+KN3h4/3nILT+gQ==" + }, + "HotChocolate.Types": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "UEpl+u8WuvQOK1vdlq+2uucLPQpuNXbzt27ij8xcEwOfZAimYC8dGep4MIb1ItdNk2X7PaOegGPQXWoh+oxSiQ==", + "dependencies": { + "GreenDonut": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4", + "HotChocolate.Abstractions": "16.6.4", + "HotChocolate.Caching.Memory": "16.6.4", + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Execution.Operation.Abstractions": "16.6.4", + "HotChocolate.Execution.Pipeline": "16.6.4", + "HotChocolate.Features": "16.6.4", + "HotChocolate.Fusion.Language": "16.6.4", + "HotChocolate.Fusion.Utilities": "16.6.4", + "HotChocolate.PersistedOperations.Abstractions": "16.6.4", + "HotChocolate.PersistedOperations.Pipeline": "16.6.4", + "HotChocolate.Text.Json": "16.6.4", + "HotChocolate.Transport.Formatters": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4", + "HotChocolate.Utilities": "16.6.4", + "HotChocolate.Utilities.Base36": "16.6.4", + "HotChocolate.Utilities.DependencyInjection": "16.6.4", + "Microsoft.Extensions.DependencyInjection": "10.0.0", + "Microsoft.Extensions.ObjectPool": "10.0.0", + "Microsoft.Extensions.Options": "10.0.0" + } + }, + "HotChocolate.Types.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "KrftIDiSImZmhQv+Johy6cGOzIKizZS4TbsJwzlSINrUtj/L8G7RVvFaUTl/iYXYIdganPopITsSCu+fs3UIVA==", + "dependencies": { + "HotChocolate.Features": "16.6.4", + "HotChocolate.Primitives": "16.6.4" + } + }, + "HotChocolate.Types.CursorPagination": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "hNoVzFKkZGzTofL0nPtMeqFpv6+zy2jqY9Ef3vnJuzSwCjD08g4SJNt947ViksDoqMUVPtH3xjZMiOS2vN9Z6w==", + "dependencies": { + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Types.CursorPagination.Extensions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "uaWfK7+/WpYF/zOoeLF+QutSVHP3hQEW+MKHRc76Fg4tuhDxSw6c7rW3wEbOys7W1kAgnKfeVWtYkQCj4ifBBg==", + "dependencies": { + "GreenDonut.Data": "16.6.4", + "HotChocolate.Types.CursorPagination": "16.6.4" + } + }, + "HotChocolate.Types.Errors": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "S9KNljhZe94L/OQse+VsVwwIUunoyjBv4IvTfjCPy/6IWvc96q6Pkw5wC9C42X32PrCPqTsXL6vsc7G8mQLh3A==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Types.Mutations": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "l5umZs2JyB3wq8giyucXLKmKkaFEZxidzhaiZ2DsxXq969v0OlgZiGxdU5puMUJ1XNrWtQUocnURgo8tqOg/pg==", + "dependencies": { + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.Errors": "16.6.4" + } + }, + "HotChocolate.Types.Queries": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "WiMtlmgToK8/GLFR5zdUT9YdSmpU2kkDTd7l+56r1TB934+2Qp2hzl0zd6THCPx4Hd9BocwMjrUggSCgnDuDng==", + "dependencies": { + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.Errors": "16.6.4" + } + }, + "HotChocolate.Types.Scalars.Upload": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "GWkhJth8tpx3zF8xXu7oxXB+aeTGclwDZR8/kA0CI/efsIRbAj5k13HxTN7WG9/b7/SdV+iJer6pRS1J1fWOYQ==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Utilities": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "8kg+EoA7eS0uIOR/06CzKcEaZprWAxecwUkHFS2cOys7uRkXaxjgVfzwz1wARkAXEHhaMhFEQvVjHghQGQodYA==", + "dependencies": { + "HotChocolate.Utilities.Buffers": "16.6.4", + "HotChocolate.Utilities.Tasks": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Utilities.Base36": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "i0zQoDkaSXR07627r1l7SQ0psF9zOa7CUsmR7vrSmwhBItYe2AVR6z4M58JDo1MoHR5Nt6Mp8Y0dgrOL6OM6zg==" + }, + "HotChocolate.Utilities.Buffers": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oeadDwUfn3oF97oNwF3QD3gEoOPOxl/sKwFGKj9BXNwgQnm9ho4DRFZrY0v4Gk78sGEsSxzfK8YlUz7pl5aAXA==" + }, + "HotChocolate.Utilities.DependencyInjection": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "1mw7EmE6mF/Ui+LGW1cyVPm0Rvko+szyU5q3AsH5NmiT+9iEEReLm3h716nF9f4RsYGnuNdXuUt1+eE6tfs/AQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "10.0.0" + } + }, + "HotChocolate.Utilities.Tasks": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "/zsN3ARuQe39QWMEMlaQCV4Td4kSa4Ppzh979YeXATB7S039QyDyExgtzsPw2gu0WamuH+hqPsGdo3hSRqqUIQ==" + }, + "HotChocolate.Validation": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "H104wO+jzcY8OhZE9QEKWs5NGtC4Kj04oJOsgJ+do3KI2go9fKNtrHKfJLFfuR6HaREn6SDqswYViiR4BGItSg==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "Microsoft.AspNetCore.TestHost": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "IVGNbZVxLuL80y7cmXYfhIFoTGneHkp4D7xXarYe6V/wjo8/2qiSLUwWax1/h2eHtJ3Y5cuqmtpOyWMnXIsUMA==" + }, + "Microsoft.Extensions.Caching.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "vUl798SmruTqqlt/xH2gDk3tJlhk6k3HdOXAHirlRfbNKDym4g/kRpUL9S4sl6F6FsOTOMW+ZsDapqlZMOOiEw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "fVi053xdpda9Em7vSkmgVxO/PtgC2m78ekReKWsgcyskqY0U82Bz/MONwxpGzI0hElYKJfw+fupqMVeKW3fSaA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "rFn8RuszZn3qquPVkDytMUlPc2+rXl9MCoygwc1XmAgC5vg5/oXJ8hkOosOrLoBLsqdTy4lFwP6iQdPS9uSYOA==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.CommandLine": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "1KHr/1L56llwQ/yI0tAisEA31UpPsn8aasjASIwELOaN4JIUcbjuQBMdFOIzfNBBeULoUa0XfBe5QDtRRUY+fg==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "/a1aJz4m7ylhEDf25ugQChLQoN5XwoGjWw/BoR/ZWWKsO1v4DdJElS1uyngahz4B/eOzjFk1KNTkarRLE5wsIg==" + }, + "Microsoft.Extensions.DependencyModel": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "PJPtFYsZ+r+uz9qqXWUTEyKeJ1EiBGIJtqavkg9ZXijjGSFAk4Fgi5sqIxj+uAyLZwEKgexDUQXhWhvU6l3+og==" + }, + "Microsoft.Extensions.Diagnostics": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "HT70uGPxMLqqnOzKMcnQtDmeV4r0KHr4qVCLhP7SXil9jMEm8sQXwcybxVVFGXZJ1V44xV0mLqQ54aZbcR2OiQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.11", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.11" + } + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "se7Kx8QpJEt+nf26L4qIVAofGTDr1wbexxsh/Fm3Xc04xUkqUXK06KUS7FLwSQYSjqb7q9n+T7MEcXYBhI1Y5g==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "JOjac6SQQgZmdmB8WGEw61/7siqMZoWJMkmq2p1goJGxqI59lO6oB4bOl0jNsbaPBdYy5Mlkb+6U7T4+CjnD8Q==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.FileProviders.Physical": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "Tq/UqMaczePv9yWwSsJZRgKtgA46djVR5xHj/lZBCueQ3ag8f9v5mu0EdhrNx7tXxNk+Y9OurG2oKuSKINjr0A==", + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileSystemGlobbing": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.FileSystemGlobbing": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "2i6rtW/B5rCnWCnhdmWWEmaM9O0HD0zsPY9eRqa++y4tclI3Uw8zvGbBvhY/LjAdtf8gUHhUPcAWj3DRlWMXmQ==" + }, + "Microsoft.Extensions.Hosting": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "eIDa/Rl+93aj17gMlFsJJx+LhBvb3CP0Mu1PeVYkDp2Y3S4Jock8UynfGQEcx7lrlq+gKW+ECQJHbro/LTPDEQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Binder": "10.0.11", + "Microsoft.Extensions.Configuration.CommandLine": "10.0.11", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "10.0.11", + "Microsoft.Extensions.Configuration.FileExtensions": "10.0.11", + "Microsoft.Extensions.Configuration.Json": "10.0.11", + "Microsoft.Extensions.Configuration.UserSecrets": "10.0.11", + "Microsoft.Extensions.DependencyInjection": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Diagnostics": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Physical": "10.0.11", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Configuration": "10.0.11", + "Microsoft.Extensions.Logging.Console": "10.0.11", + "Microsoft.Extensions.Logging.Debug": "10.0.11", + "Microsoft.Extensions.Logging.EventLog": "10.0.11", + "Microsoft.Extensions.Logging.EventSource": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.Hosting.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "pwtpF7iF/NNaOBcX+pvMZ7y2+JAVbH5KkNrH9uMZtuVxVJsFTDiWiCR7Tk3HVptsAijaetipUZVRVK2LLq+nvA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "Ljd0Uxoq5XpScD2Bg0nM/r3mwx7Ao5Uq24eo2ARxbGvqJ7Zht6rt2cJtwVRH4Cv+1ZVMdXz6TB43KbpmsxRrvQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Configuration": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "S7LvLeVHKNPaY2NMyxW7c2TBGsLgxoSUBCV5Ev5iN8kgC7EPR2UB7eW7vHsElGMcIUDwRmoxLfvGDynCn3q6EA==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Binder": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Debug": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "wr+j1bjdFXhc8lKTLoq+RbwFM8M+orcMS9xrcqLmDGOxJcXpKizEeE5h6v/GKwCZV02FmhaA7OlNjoq072jZpQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.EventLog": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "Eck9GpCCpvZ3f6L7IUlN+mPtRVefnf7PsiIG5vi61QawPtLNCEAv2TPD/M3SojcU0PFaef+BxiVGPOShFHtDog==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "System.Diagnostics.EventLog": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.EventSource": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "hs6QWECLLohi2VKqUvSGRUvrg7eXR1DqKL95Jrtz3cdD2g2nBA+yJPdRQLZ7SLmnTZWycxfMDK2s0ho+rfst5w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "10.0.0", + "contentHash": "bpeCq0IYmVLACyEUMzFIOQX+zZUElG1t+nu1lSxthe7B+1oNYking7b91305+jNB6iwojp9fqTY9O+Nh7ULQxg==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "eY1GAKcTfD2maP27J84X9IovT3yjHJ2dVDzPmDg6/XqYvt3jMzJhtfQCLjG9pVsZGAd+8DQ2QrjaDcs2+VQLGw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "syEhXQ/sEaSBFaqzlp9gDGHX/nk6gkQkh1sIUpBO1mlBj3Phu1rmb4ML1uCiyPW9N6Kxfxv3y5FGObC+bV01Qw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Binder": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "SXcz+kF+4Oo9b1+55zntpJFYfwb1jw66ioxptyNOOTDc8g2FHnBFWjZpsWfCvZIhzr0x+4e2trVTs4OKwQfBtw==" + }, + "Microsoft.IO.RecyclableMemoryStream": { + "type": "Transitive", + "resolved": "3.0.0", + "contentHash": "irv0HuqoH8Ig5i2fO+8dmDNdFdsrO+DoQcedwIlb810qpZHBNQHZLW7C/AHBQDgLLpw2T96vmMAy/aE4Yj55Sg==" + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "QTXEoQBzz00SFWbo7nAg1Ogd4f99lwqcO9uAJ7MYSLEUR28f6As32QktrqG2Fr9cfAfd1GjLyGYspE7Ipj7P6w==" + }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "ne1843evDugl0md7Fjzy6QjJrzsjh46ZKbhf8GwBXb5f/gw97J4bxMs0NQKifDuThh/f0bZ0e62NPl1jzTuRqA==" + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "31kfaW4ZupZzPsI5PVe77VhnvFF55qgma7KZr/E0iFTs6fmdhhG8j0mgEx620iLTey1EynOkEfnyTjtNEpJzGw==" + }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.3.0", + "contentHash": "gxtkN3a+9biu9V9Zd5NaTO6VZWXAnS2mhQ0R/VXmSPoTuiQNZsakKikrKpDtKxrL5nUYzbRsHtl40WNq+ZBKKg==", + "dependencies": { + "System.IO.Hashing": "8.0.0" + } + }, + "linq2graphql.testserver": { + "type": "Project", + "dependencies": { + "HotChocolate.AspNetCore": "[16.6.4, )", + "HotChocolate.Data": "[16.6.4, )", + "HotChocolate.Types.Analyzers": "[16.6.4, )", + "Linq2GraphQL.TestServer.Shared": "[1.0.0, )" + } + }, + "linq2graphql.testserver.shared": { + "type": "Project", + "dependencies": { + "HotChocolate.AspNetCore": "[16.6.4, )", + "HotChocolate.Data": "[16.6.4, )" + } + }, + "linq2graphql.testservernullable": { + "type": "Project", + "dependencies": { + "HotChocolate.AspNetCore": "[16.6.4, )", + "HotChocolate.Data": "[16.6.4, )", + "HotChocolate.Types.Analyzers": "[16.6.4, )", + "HotChocolate.Types.Scalars": "[16.6.4, )", + "Linq2GraphQL.TestServer.Shared": "[1.0.0, )" + } + }, + "HotChocolate.AspNetCore": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "sxqZ+B2asfW/vAznKNl+xP+sf8eR3h4lRKYrmDtJPTAbJ4Z8+rWW6DNqbFyoU1LAl1teTbRwPaGPxEqYKumA2Q==", + "dependencies": { + "ChilliCream.Nitro.App": "32.0.2", + "HotChocolate": "16.6.4", + "HotChocolate.AspNetCore.Pipeline": "16.6.4", + "HotChocolate.Subscriptions.InMemory": "16.6.4", + "HotChocolate.Transport.Formatters": "16.6.4", + "HotChocolate.Transport.Sockets": "16.6.4", + "HotChocolate.Types.Scalars.Upload": "16.6.4", + "HotChocolate.Utilities.DependencyInjection": "16.6.4" + } + }, + "HotChocolate.Data": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "ruKaYosX4yTOAVeDEQfHFSjuIhmCeQpq3ritskH8i74wn8hKhPRsFA9iFPom3qpiZkCJxsCIPQZumGJGf6xpkQ==", + "dependencies": { + "GreenDonut.Data": "16.6.4", + "GreenDonut.Data.Abstractions": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4", + "HotChocolate.Execution.Operation.Abstractions": "16.6.4", + "HotChocolate.Execution.Projections": "16.6.4", + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.CursorPagination.Extensions": "16.6.4" + } + }, + "HotChocolate.Types.Analyzers": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "bigjWuAkEQvxoQCrUzAvowiqS7YrTciape6++hB9YpA2cFH5RQnG+xyTo/MvWCN5jSvnW4izvdae9mhxtfhZZA==" + }, + "HotChocolate.Types.Scalars": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "WlNLZQRjpwbkV3gYUetD3w6xFwx5yN0l3lUXbyRihy+jB/6LnXgTGCGLphZy1e5nPl0nbeDwMdx0OLyBe6/hyQ==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "Microsoft.Extensions.Caching.Memory": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "el1g0mBEbDBGY2bT9mcSfrTWO8QlPdq2nOCnvQugioOFwHV+bVBMeiakoI0dNOdj8d6Hi9K6HY2xzRUWJiDR3w==", + "dependencies": { + "Microsoft.Extensions.Caching.Abstractions": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "wlhRqZW8LcJPa+vk2oLAc/REXDItHtkFQdf/QcXYGZbZOO13izcsKY1pCvuFQYwUiZD+hwSZwsKASjqT+BNaVg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.EnvironmentVariables": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "KICyU3eVi5jvloKm01EXV69L97H/zkhISVtV98cIuzuFOxNx3xTUVcXqvWTz3aq7OvUuDB/MFlPFjmxRaKF7/A==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.FileExtensions": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "mDW7KVFB05M6jiRUyaZiOMWhS31n5HlSZwoYctHAZAucD4sMDJ70IxOmkGDt6RpstchD+keWBjhdzcMpSkWvWQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Physical": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.Json": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "nSPrT8U/cNoB4coqkmnanAMK9PsL7lsjG+LLUKEwHRFwS6E78b8S1wdv/y88EOxBhasWov1rLd7RTHmmsYPOLg==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.FileExtensions": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.UserSecrets": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "BRliLdUowglV8GS+J1G/QsSofCJYYFg3U8QZx0ACRn+a91az/Qnpy+h6PyHS94WgV2TSazX5D/cuuk6wnCJatw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Json": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Physical": "10.0.11" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "PSmotV19c7E3lKed++uYo1kSiXFI+uTl37CBSrhq+CfLC3FCHjG7R91+xPnNehQfHS1b0Tzo/CCLPWH3qaEheg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Http": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "ujx8RvcKzkxPFBguwgiygbwWVHVK0P7HFlNJ6I0JBRb28tzwe42jixBoA+dGmqG9IHepPVcm04vv2IDnU93ekA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Diagnostics": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "nUOJwgFkSiLHiVGFpU22pIJtuWYewuSYQ3JVuP/gdK8ASMT807Px+TYQiRWs6uSsOmoyFTaVCwKXTasczV6BpA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Console": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "dFc0yDudyD1iIg6z9XT7ofsT3hVO7Y4ylrxGHIVRR0GaZ4CUk4ujOrMoy7wWEdNHZhvJooySg6hZpOxyS8zEVA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Configuration": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Websocket.Client": { + "type": "CentralTransitive", + "requested": "[5.3.0, )", + "resolved": "5.3.0", + "contentHash": "uhdDM+gruCEhHRCKCoyali1HJp0wSS/HBs5X9XZwULNKM2y5ML188TsvcEgWEFOx0NOaHfGNtfoC0cd1p2NOIg==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.IO.RecyclableMemoryStream": "3.0.0", + "System.Reactive": "6.0.0" + } + } + } + } +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/Compat.props b/test/Linq2GraphQL.Compat/Compat.props new file mode 100644 index 00000000..bb64f0fd --- /dev/null +++ b/test/Linq2GraphQL.Compat/Compat.props @@ -0,0 +1,25 @@ + + + + net10.0 + enable + + annotations + false + $(NoWarn);CS0618 + + + + + + + + + + + + + + + + diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs new file mode 100644 index 00000000..97af698e --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/MutationMethods.cs @@ -0,0 +1,60 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +/// +/// Implementation of MutationMethods GraphQL operations +/// +public class MutationMethods : IMutationMethods +{ + private readonly GraphClient client; + + /// + /// Initializes a new instance of the MutationMethods class + /// + /// The GraphQL client instance + public MutationMethods(GraphClient client) + { + this.client = client ?? throw new ArgumentNullException(nameof(client)); + } + + /// + /// Executes setName GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery SetName(string name = null) + { + var arguments = new List + { + new("name", "String", name), + }; + + return new GraphQuery(client, "setName", OperationType.Mutation, arguments); + } + + /// + /// Executes addCustomer GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery AddCustomer(CustomerInput customer = null) + { + var arguments = new List + { + new("customer", "CustomerInput", customer), + }; + + return new GraphQuery(client, "addCustomer", OperationType.Mutation, arguments); + } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs new file mode 100644 index 00000000..c2140e2e --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/QueryMethods.cs @@ -0,0 +1,200 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +/// +/// Implementation of QueryMethods GraphQL operations +/// +public class QueryMethods : IQueryMethods +{ + private readonly GraphClient client; + + /// + /// Initializes a new instance of the QueryMethods class + /// + /// The GraphQL client instance + public QueryMethods(GraphClient client) + { + this.client = client ?? throw new ArgumentNullException(nameof(client)); + } + + /// + /// Executes hello GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery Hello(string name = null) + { + var arguments = new List + { + new("name", "String", name), + }; + + return new GraphQuery(client, "hello", OperationType.Query, arguments); + } + + /// + /// Executes raiseError GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery RaiseError(string message = null) + { + var arguments = new List + { + new("message", "String", message), + }; + + return new GraphQuery(client, "raiseError", OperationType.Query, arguments); + } + + /// + /// Executes raiseAuthError GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery RaiseAuthError() + { + var arguments = new List + { + }; + + return new GraphQuery(client, "raiseAuthError", OperationType.Query, arguments); + } + + /// + /// Executes customerReturnNull GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery CustomerReturnNull() + { + var arguments = new List + { + }; + + return new GraphQuery(client, "customerReturnNull", OperationType.Query, arguments); + } + + /// + /// Executes customers GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery> + public GraphQuery> Customers() + { + var arguments = new List + { + }; + + return new GraphQuery>(client, "customers", OperationType.Query, arguments); + } + + /// + /// Executes ordersNoBackwardPagination GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery OrdersNoBackwardPagination([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, OrderFilterInput where = null, List order = null) + { + var arguments = new List + { + new("first", "Int", first), + new("after", "String", after), + new("where", "OrderFilterInput", where), + new("order", "[OrderSortInput!]", order), + }; + + return new GraphQuery(client, "ordersNoBackwardPagination", OperationType.Query, arguments); + } + + /// + /// Executes ordersNoTotalCount GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + public GraphCursorQuery OrdersNoTotalCount([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, OrderFilterInput where = null, List order = null) + { + var arguments = new List + { + new("first", "Int", first), + new("after", "String", after), + new("last", "Int", last), + new("before", "String", before), + new("where", "OrderFilterInput", where), + new("order", "[OrderSortInput!]", order), + }; + + return new GraphCursorQuery(client, "ordersNoTotalCount", OperationType.Query, arguments); + } + + /// + /// Executes orders GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + public GraphCursorQuery Orders([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, OrderFilterInput where = null, List order = null) + { + var arguments = new List + { + new("first", "Int", first), + new("after", "String", after), + new("last", "Int", last), + new("before", "String", before), + new("where", "OrderFilterInput", where), + new("order", "[OrderSortInput!]", order), + }; + + return new GraphCursorQuery(client, "orders", OperationType.Query, arguments); + } + + /// + /// Executes animals GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + public GraphCursorQuery Animals([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, IAnimalFilterInput where = null, List order = null) + { + var arguments = new List + { + new("first", "Int", first), + new("after", "String", after), + new("last", "Int", last), + new("before", "String", before), + new("where", "IAnimalFilterInput", where), + new("order", "[IAnimalSortInput!]", order), + }; + + return new GraphCursorQuery(client, "animals", OperationType.Query, arguments); + } + + /// + /// Executes ordersOffsetPaging GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + public GraphCursorQuery OrdersOffsetPaging([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, OrderFilterInput where = null, List order = null) + { + var arguments = new List + { + new("first", "Int", first), + new("after", "String", after), + new("last", "Int", last), + new("before", "String", before), + new("where", "OrderFilterInput", where), + new("order", "[OrderSortInput!]", order), + }; + + return new GraphCursorQuery(client, "ordersOffsetPaging", OperationType.Query, arguments); + } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs new file mode 100644 index 00000000..a5548d7f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClient.cs @@ -0,0 +1,101 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Linq2GraphQL.TestClient; + +/// +/// GraphQL client for SampleClient operations +/// +/// +/// Provides strongly-typed access to GraphQL queries, mutations, and subscriptions. +/// Supports dependency injection for better testability and flexibility. +/// +public class SampleClient : ISampleClient, IGraphClientSource, IGraphSchemaSource +{ + private readonly GraphClient client; + + /// + /// Constructor with dependency injection support + /// + /// HTTP client for GraphQL requests + /// GraphQL client configuration options + /// Service provider for dependency resolution + /// Optional query methods implementation (uses default if null) + /// Optional mutation methods implementation (uses default if null) + /// Optional subscription methods implementation (uses default if null) + public SampleClient( + HttpClient httpClient, + [FromKeyedServices("SampleClient")] IOptions options, + IServiceProvider provider, + IQueryMethods queryMethods = null, + IMutationMethods mutationMethods = null, + ISubscriptionMethods subscriptionMethods = null) + { + client = new GraphClient(httpClient, options, provider, true); + Query = queryMethods ?? new QueryMethods(client); + Mutation = mutationMethods ?? new MutationMethods(client); + Subscription = subscriptionMethods ?? new SubscriptionMethods(client); + } + + private SampleClient(GraphClient client) + { + this.client = client; + Query = new QueryMethods(client); + Mutation = new MutationMethods(client); + Subscription = new SubscriptionMethods(client); + } + + /// + /// A client that shares this client's connection and settings, and also runs + /// on every request it sends. Use it for per-user or + /// per-conversation headers such as an access token. This client is not changed. + /// + /// + /// The new client uses the generated operation implementations, not ones passed to the constructor. + /// + public SampleClient WithRequestConfiguration(Func configureRequest) + { + return new SampleClient(client.WithRequestConfiguration(configureRequest)); + } + + /// + /// A client that sends Authorization: Bearer <token> on every request, asking + /// for the token each time. This client is not changed. + /// + public SampleClient WithAccessToken(Func> getAccessToken) + { + return WithRequestConfiguration(RequestConfigurations.BearerToken(getAccessToken)); + } + + /// + /// The underlying client, for example to execute a query written as GraphQL text with + /// . + /// + public GraphClient GraphClient => client; + + /// + /// The schema this client was generated from, as SDL. + /// + public static string Sdl => SampleClientSchema.Sdl; + + /// + /// Gets the query methods for this GraphQL client + /// + public IQueryMethods Query { get; private set; } + /// + /// Gets the mutation methods for this GraphQL client + /// + public IMutationMethods Mutation { get; private set; } + /// + /// Gets the subscription methods for this GraphQL client + /// + public ISubscriptionMethods Subscription { get; private set; } +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs new file mode 100644 index 00000000..81049d4a --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClientExtensions.cs @@ -0,0 +1,40 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Linq2GraphQL.TestClient; + +public static class SampleClientExtensions +{ + private const string ClientName = "SampleClient"; + + public static IGraphClientBuilder AddSampleClient(this IServiceCollection services) + { + var graphClientOptions = new GraphClientOptions(); + return GraphClientBuilder(services, graphClientOptions); + } + + public static IGraphClientBuilder AddSampleClient(this IServiceCollection services, Action opts) + { + var graphClientOptions = new GraphClientOptions(); + opts(graphClientOptions); + + return GraphClientBuilder(services, graphClientOptions); + } + + private static IGraphClientBuilder GraphClientBuilder(IServiceCollection services, + GraphClientOptions graphClientOptions) + { + var opts = Options.Create(graphClientOptions); + services.AddKeyedSingleton(ClientName, opts); + services.AddMemoryCache(); + return new ClientBuilder(ClientName, services); + } +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClientSchema.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClientSchema.cs new file mode 100644 index 00000000..4ab8bfdf --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SampleClientSchema.cs @@ -0,0 +1,588 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +namespace Linq2GraphQL.TestClient; + +/// +/// The schema SampleClient was generated from, as SDL. +/// +public static partial class SampleClientSchema +{ + public const string Sdl = """ + type Query { + hello(name: String = "World"): String + raiseError(message: String = "Test error"): String + raiseAuthError: String + customerReturnNull: Customer + customers: [Customer] + ordersNoBackwardPagination( + "Returns the first _n_ elements from the list." + first: Int, + "Returns the elements in the list that come after the specified cursor." + after: String, + where: OrderFilterInput, + order: [OrderSortInput!]): OrdersNoBackwardPaginationConnection + ordersNoTotalCount( + "Returns the first _n_ elements from the list." + first: Int, + "Returns the elements in the list that come after the specified cursor." + after: String, + "Returns the last _n_ elements from the list." + last: Int, + "Returns the elements in the list that come before the specified cursor." + before: String, + where: OrderFilterInput, + order: [OrderSortInput!]): OrdersNoTotalCountConnection + orders( + "Returns the first _n_ elements from the list." + first: Int, + "Returns the elements in the list that come after the specified cursor." + after: String, + "Returns the last _n_ elements from the list." + last: Int, + "Returns the elements in the list that come before the specified cursor." + before: String, + where: OrderFilterInput, + order: [OrderSortInput!]): OrdersConnection + animals( + "Returns the first _n_ elements from the list." + first: Int, + "Returns the elements in the list that come after the specified cursor." + after: String, + "Returns the last _n_ elements from the list." + last: Int, + "Returns the elements in the list that come before the specified cursor." + before: String, + where: IAnimalFilterInput, + order: [IAnimalSortInput!]): AnimalsConnection + ordersOffsetPaging( + "Returns the first _n_ elements from the list." + first: Int, + "Returns the elements in the list that come after the specified cursor." + after: String, + "Returns the last _n_ elements from the list." + last: Int, + "Returns the elements in the list that come before the specified cursor." + before: String, + where: OrderFilterInput, + order: [OrderSortInput!]): OrdersOffsetPagingConnection + } + + type Mutation { + setName(name: String): String + addCustomer(customer: CustomerInput): Customer + } + + type Subscription { + customerAdded: Customer + customerNameAdded(name: String): Customer + } + + type Pig implements IAnimal { + spices: String! + name: String! + numberOfLegs: Int! + speed: Int! + } + + type Spider implements IAnimal { + poisonous: Boolean! + name: String! + numberOfLegs: Int! + speed: Int! + } + + input OrderFilterInput { + and: [OrderFilterInput!] + or: [OrderFilterInput!] + orderId: UuidOperationFilterInput + customer: CustomerFilterInput + address: AddressFilterInput + orderDate: DateTimeOperationFilterInput + orderDateTime: DateTimeOperationFilterInput + orderDay: LocalDateOperationFilterInput + lines: ListFilterInputTypeOfOrderLineFilterInput + entryTime: LocalTimeOperationFilterInput + grade: StringOperationFilterInput @deprecated(reason: "This propery is obsolete and should not be used!") + } + + input OrderSortInput { + orderId: SortEnumType + customer: CustomerSortInput + address: AddressSortInput + orderDate: SortEnumType + orderDateTime: SortEnumType + orderDay: SortEnumType + entryTime: SortEnumType + grade: SortEnumType @deprecated(reason: "This propery is obsolete and should not be used!") + } + + input IAnimalFilterInput { + and: [IAnimalFilterInput!] + or: [IAnimalFilterInput!] + name: StringOperationFilterInput + numberOfLegs: IntOperationFilterInput + } + + input IAnimalSortInput { + name: SortEnumType + numberOfLegs: SortEnumType + } + + "A connection to a list of items." + type OrdersNoBackwardPaginationConnection { + "Information to aid in pagination." + pageInfo: PageInfo! + "A list of edges." + edges: [OrdersNoBackwardPaginationEdge!] + "A flattened list of the nodes." + nodes: [Order] + "Identifies the total count of items in the connection." + totalCount: Int! + } + + "A connection to a list of items." + type OrdersNoTotalCountConnection { + "Information to aid in pagination." + pageInfo: PageInfo! + "A list of edges." + edges: [OrdersNoTotalCountEdge!] + "A flattened list of the nodes." + nodes: [Order] + } + + "A connection to a list of items." + type OrdersConnection { + "Information to aid in pagination." + pageInfo: PageInfo! + "A list of edges." + edges: [OrdersEdge!] + "A flattened list of the nodes." + nodes: [Order] + "Identifies the total count of items in the connection." + totalCount: Int! + } + + "A connection to a list of items." + type AnimalsConnection { + "Information to aid in pagination." + pageInfo: PageInfo! + "A list of edges." + edges: [AnimalsEdge!] + "A flattened list of the nodes." + nodes: [IAnimal] + "Identifies the total count of items in the connection." + totalCount: Int! + } + + "A connection to a list of items." + type OrdersOffsetPagingConnection { + "Information to aid in pagination." + pageInfo: PageInfo! + "A list of edges." + edges: [OrdersOffsetPagingEdge!] + "A flattened list of the nodes." + nodes: [Order] + } + + input UuidOperationFilterInput { + eq: UUID + neq: UUID + in: [UUID] + nin: [UUID] + gt: UUID + ngt: UUID + gte: UUID + ngte: UUID + lt: UUID + nlt: UUID + lte: UUID + nlte: UUID + } + + input CustomerFilterInput { + and: [CustomerFilterInput!] + or: [CustomerFilterInput!] + customerId: UuidOperationFilterInput + customerName: StringOperationFilterInput + status: CustomerStatusOperationFilterInput + orders: ListFilterInputTypeOfOrderFilterInput + address: AddressFilterInput + created: DateTimeOperationFilterInput + } + + input AddressFilterInput { + and: [AddressFilterInput!] + or: [AddressFilterInput!] + name: StringOperationFilterInput + street: StringOperationFilterInput + postalCode: StringOperationFilterInput + createdDate: LocalDateOperationFilterInput + } + + input DateTimeOperationFilterInput { + eq: DateTime + neq: DateTime + in: [DateTime] + nin: [DateTime] + gt: DateTime + ngt: DateTime + gte: DateTime + ngte: DateTime + lt: DateTime + nlt: DateTime + lte: DateTime + nlte: DateTime + } + + input LocalDateOperationFilterInput { + eq: LocalDate + neq: LocalDate + in: [LocalDate] + nin: [LocalDate] + gt: LocalDate + ngt: LocalDate + gte: LocalDate + ngte: LocalDate + lt: LocalDate + nlt: LocalDate + lte: LocalDate + nlte: LocalDate + } + + input ListFilterInputTypeOfOrderLineFilterInput { + all: OrderLineFilterInput + none: OrderLineFilterInput + some: OrderLineFilterInput + any: Boolean + } + + input LocalTimeOperationFilterInput { + eq: LocalTime + neq: LocalTime + in: [LocalTime] + nin: [LocalTime] + gt: LocalTime + ngt: LocalTime + gte: LocalTime + ngte: LocalTime + lt: LocalTime + nlt: LocalTime + lte: LocalTime + nlte: LocalTime + } + + input StringOperationFilterInput { + and: [StringOperationFilterInput!] + or: [StringOperationFilterInput!] + eq: String + neq: String + contains: String + ncontains: String + in: [String] + nin: [String] + startsWith: String + nstartsWith: String + endsWith: String + nendsWith: String + } + + enum SortEnumType { + ASC + DESC + } + + input CustomerSortInput { + customerId: SortEnumType + customerName: SortEnumType + status: SortEnumType + address: AddressSortInput + created: SortEnumType + } + + input AddressSortInput { + name: SortEnumType + street: SortEnumType + postalCode: SortEnumType + createdDate: SortEnumType + } + + input IntOperationFilterInput { + eq: Int + neq: Int + in: [Int] + nin: [Int] + gt: Int + ngt: Int + gte: Int + ngte: Int + lt: Int + nlt: Int + lte: Int + nlte: Int + } + + "Information about pagination in a connection." + type PageInfo { + "Indicates whether more edges exist following the set defined by the clients arguments." + hasNextPage: Boolean! + "Indicates whether more edges exist prior the set defined by the clients arguments." + hasPreviousPage: Boolean! + "When paginating backwards, the cursor to continue." + startCursor: String + "When paginating forwards, the cursor to continue." + endCursor: String + } + + "An edge in a connection." + type OrdersNoBackwardPaginationEdge { + "A cursor for use in pagination." + cursor: String! + "The item at the end of the edge." + node: Order + } + + "An edge in a connection." + type OrdersNoTotalCountEdge { + "A cursor for use in pagination." + cursor: String! + "The item at the end of the edge." + node: Order + } + + "An edge in a connection." + type OrdersEdge { + "A cursor for use in pagination." + cursor: String! + "The item at the end of the edge." + node: Order + } + + "An edge in a connection." + type AnimalsEdge { + "A cursor for use in pagination." + cursor: String! + "The item at the end of the edge." + node: IAnimal + } + + "An edge in a connection." + type OrdersOffsetPagingEdge { + "A cursor for use in pagination." + cursor: String! + "The item at the end of the edge." + node: Order + } + + "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562." + scalar UUID + + input CustomerStatusOperationFilterInput { + eq: CustomerStatus + neq: CustomerStatus + in: [CustomerStatus!] + nin: [CustomerStatus!] + } + + input ListFilterInputTypeOfOrderFilterInput { + all: OrderFilterInput + none: OrderFilterInput + some: OrderFilterInput + any: Boolean + } + + "The `DateTime` scalar type represents a date and time with time zone offset information." + scalar DateTime + + "The `LocalDate` scalar type represents a date without time or time zone information." + scalar LocalDate + + input OrderLineFilterInput { + and: [OrderLineFilterInput!] + or: [OrderLineFilterInput!] + lineNumber: IntOperationFilterInput + order: OrderFilterInput + item: ItemFilterInput + price: DecimalOperationFilterInput + quantity: FloatOperationFilterInput + } + + "The `LocalTime` scalar type represents a time of day without date or time zone information." + scalar LocalTime + + input ItemFilterInput { + and: [ItemFilterInput!] + or: [ItemFilterInput!] + itemId: StringOperationFilterInput + itemName: StringOperationFilterInput + data: ListUnsignedByteOperationFilterInput + } + + input DecimalOperationFilterInput { + eq: Decimal + neq: Decimal + in: [Decimal] + nin: [Decimal] + gt: Decimal + ngt: Decimal + gte: Decimal + ngte: Decimal + lt: Decimal + nlt: Decimal + lte: Decimal + nlte: Decimal + } + + input FloatOperationFilterInput { + eq: Float + neq: Float + in: [Float] + nin: [Float] + gt: Float + ngt: Float + gte: Float + ngte: Float + lt: Float + nlt: Float + lte: Float + nlte: Float + } + + input ListUnsignedByteOperationFilterInput { + all: UnsignedByteOperationFilterInput + none: UnsignedByteOperationFilterInput + some: UnsignedByteOperationFilterInput + any: Boolean + } + + "The `Decimal` scalar type represents a decimal floating-point number with high precision." + scalar Decimal + + input UnsignedByteOperationFilterInput { + eq: UnsignedByte + neq: UnsignedByte + in: [UnsignedByte] + nin: [UnsignedByte] + gt: UnsignedByte + ngt: UnsignedByte + gte: UnsignedByte + ngte: UnsignedByte + lt: UnsignedByte + nlt: UnsignedByte + lte: UnsignedByte + nlte: UnsignedByte + } + + "The `UnsignedByte` scalar type represents an unsigned 8-bit integer." + scalar UnsignedByte + + enum CustomerStatus { + ACTIVE + DISABLED + IN_TRANSIT @deprecated(reason: "No longer in use, please use enum value Active instead") + } + + interface IAnimal { + name: String! + numberOfLegs: Int! + } + + type Order { + myGradeMethod(name: String!): String @deprecated(reason: "This method should not be used anymore") + orderHello(name: String!, first: Int! = 0): String! + orderAddress(addressType: AddressType!): Address! + orderId: UUID! + customer: Customer! + address: Address + orderDate: DateTime! + orderDateTime: DateTime! + orderDay: LocalDate! + lines: [OrderLine!]! + entryTime: LocalTime + grade: String @deprecated(reason: "This propery is obsolete and should not be used!") + } + + input CustomerInput { + customerId: UUID! + customerName: String! + status: CustomerStatus! + orders: [OrderInput!]! + address: AddressInput + created: DateTime + } + + type Customer { + customerId: UUID! + customerName: String! + status: CustomerStatus! + orders: [Order!]! + address: Address + created: DateTime + relatedCustomers(relationType: Int!): [Customer] + relatedCustomer(relationType: Int!): Customer + } + + input OrderInput { + orderId: UUID! + customer: CustomerInput! + address: AddressInput + orderDate: DateTime! + orderDateTime: DateTime! + orderDay: LocalDate! + lines: [OrderLineInput!]! + entryTime: LocalTime + grade: String @deprecated(reason: "This propery is obsolete and should not be used!") + } + + type OrderLine { + lineNumber: Int! + order: Order! + item: Item + price: Decimal! + quantity: Float! + } + + enum AddressType { + DELIVERY + INVOICE + } + + type Address { + name: String! + street: String! + postalCode: String! + createdDate: LocalDate! + } + + input AddressInput { + name: String! + street: String! + postalCode: String! + createdDate: LocalDate! + } + + type Item { + itemId: String! + itemName: String! + data: [UnsignedByte!] + } + + input OrderLineInput { + lineNumber: Int! + order: OrderInput! + item: ItemInput + price: Decimal! + quantity: Float! + } + + input ItemInput { + itemId: String! + itemName: String! + data: [UnsignedByte!] + } + """; +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs new file mode 100644 index 00000000..d4d9bb59 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Client/SubscriptionMethods.cs @@ -0,0 +1,60 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Subscriptions; + +namespace Linq2GraphQL.TestClient; + +/// +/// Implementation of SubscriptionMethods GraphQL operations +/// +public class SubscriptionMethods : ISubscriptionMethods +{ + private readonly GraphClient client; + + /// + /// Initializes a new instance of the SubscriptionMethods class + /// + /// The GraphQL client instance + public SubscriptionMethods(GraphClient client) + { + this.client = client ?? throw new ArgumentNullException(nameof(client)); + } + + /// + /// Executes customerAdded GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphSubscription + public GraphSubscription CustomerAdded() + { + var arguments = new List + { + }; + + return new GraphSubscription(client, "customerAdded", OperationType.Subscription, arguments); + } + + /// + /// Executes customerNameAdded GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphSubscription + public GraphSubscription CustomerNameAdded(string name = null) + { + var arguments = new List + { + new("name", "String", name), + }; + + return new GraphSubscription(client, "customerNameAdded", OperationType.Subscription, arguments); + } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs new file mode 100644 index 00000000..9bf1a67f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/AddressType.cs @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using System.ComponentModel; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(JsonStringEnumMemberConverter))] +public enum AddressType +{ + [EnumMember(Value = "DELIVERY")] + Delivery, + [EnumMember(Value = "INVOICE")] + Invoice, +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs new file mode 100644 index 00000000..a9b3263f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/CustomerStatus.cs @@ -0,0 +1,25 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using System.ComponentModel; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(JsonStringEnumMemberConverter))] +public enum CustomerStatus +{ + [EnumMember(Value = "ACTIVE")] + Active, + [EnumMember(Value = "DISABLED")] + Disabled, + [Obsolete("No longer in use, please use enum value Active instead")] + [EnumMember(Value = "IN_TRANSIT")] + InTransit, +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs new file mode 100644 index 00000000..48154d61 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Enums/SortEnumType.cs @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using System.ComponentModel; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(JsonStringEnumMemberConverter))] +public enum SortEnumType +{ + [EnumMember(Value = "ASC")] + Asc, + [EnumMember(Value = "DESC")] + Desc, +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs new file mode 100644 index 00000000..641e2c55 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressFilterInput.cs @@ -0,0 +1,66 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class AddressFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("name")] + [JsonPropertyName("name")] + public StringOperationFilterInput Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("street")] + [JsonPropertyName("street")] + public StringOperationFilterInput Street + { + get => GetValue("street"); + set => SetValue("street", value); + } + + [GraphQLMember("postalCode")] + [JsonPropertyName("postalCode")] + public StringOperationFilterInput PostalCode + { + get => GetValue("postalCode"); + set => SetValue("postalCode", value); + } + + [GraphQLMember("createdDate")] + [JsonPropertyName("createdDate")] + public LocalDateOperationFilterInput CreatedDate + { + get => GetValue("createdDate"); + set => SetValue("createdDate", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs new file mode 100644 index 00000000..9bf1c329 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class AddressInput : GraphInputBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public string Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("street")] + [JsonPropertyName("street")] + public string Street + { + get => GetValue("street"); + set => SetValue("street", value); + } + + [GraphQLMember("postalCode")] + [JsonPropertyName("postalCode")] + public string PostalCode + { + get => GetValue("postalCode"); + set => SetValue("postalCode", value); + } + + [GraphQLMember("createdDate")] + [JsonPropertyName("createdDate")] + public DateOnly CreatedDate + { + get => GetValue("createdDate"); + set => SetValue("createdDate", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs new file mode 100644 index 00000000..d8370d42 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/AddressSortInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class AddressSortInput : GraphInputBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public SortEnumType? Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("street")] + [JsonPropertyName("street")] + public SortEnumType? Street + { + get => GetValue("street"); + set => SetValue("street", value); + } + + [GraphQLMember("postalCode")] + [JsonPropertyName("postalCode")] + public SortEnumType? PostalCode + { + get => GetValue("postalCode"); + set => SetValue("postalCode", value); + } + + [GraphQLMember("createdDate")] + [JsonPropertyName("createdDate")] + public SortEnumType? CreatedDate + { + get => GetValue("createdDate"); + set => SetValue("createdDate", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs new file mode 100644 index 00000000..23f9d8ec --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerFilterInput.cs @@ -0,0 +1,82 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class CustomerFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("customerId")] + [JsonPropertyName("customerId")] + public UuidOperationFilterInput CustomerId + { + get => GetValue("customerId"); + set => SetValue("customerId", value); + } + + [GraphQLMember("customerName")] + [JsonPropertyName("customerName")] + public StringOperationFilterInput CustomerName + { + get => GetValue("customerName"); + set => SetValue("customerName", value); + } + + [GraphQLMember("status")] + [JsonPropertyName("status")] + public CustomerStatusOperationFilterInput Status + { + get => GetValue("status"); + set => SetValue("status", value); + } + + [GraphQLMember("orders")] + [JsonPropertyName("orders")] + public ListFilterInputTypeOfOrderFilterInput Orders + { + get => GetValue("orders"); + set => SetValue("orders", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressFilterInput Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("created")] + [JsonPropertyName("created")] + public DateTimeOperationFilterInput Created + { + get => GetValue("created"); + set => SetValue("created", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs new file mode 100644 index 00000000..b619e7ea --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerInput.cs @@ -0,0 +1,66 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class CustomerInput : GraphInputBase +{ + [GraphQLMember("customerId")] + [JsonPropertyName("customerId")] + public Guid CustomerId + { + get => GetValue("customerId"); + set => SetValue("customerId", value); + } + + [GraphQLMember("customerName")] + [JsonPropertyName("customerName")] + public string CustomerName + { + get => GetValue("customerName"); + set => SetValue("customerName", value); + } + + [GraphQLMember("status")] + [JsonPropertyName("status")] + public CustomerStatus Status + { + get => GetValue("status"); + set => SetValue("status", value); + } + + [GraphQLMember("orders")] + [JsonPropertyName("orders")] + public List Orders + { + get => GetValue>("orders"); + set => SetValue("orders", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressInput Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("created")] + [JsonPropertyName("created")] + public DateTimeOffset? Created + { + get => GetValue("created"); + set => SetValue("created", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs new file mode 100644 index 00000000..4d25c4a2 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerSortInput.cs @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class CustomerSortInput : GraphInputBase +{ + [GraphQLMember("customerId")] + [JsonPropertyName("customerId")] + public SortEnumType? CustomerId + { + get => GetValue("customerId"); + set => SetValue("customerId", value); + } + + [GraphQLMember("customerName")] + [JsonPropertyName("customerName")] + public SortEnumType? CustomerName + { + get => GetValue("customerName"); + set => SetValue("customerName", value); + } + + [GraphQLMember("status")] + [JsonPropertyName("status")] + public SortEnumType? Status + { + get => GetValue("status"); + set => SetValue("status", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressSortInput Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("created")] + [JsonPropertyName("created")] + public SortEnumType? Created + { + get => GetValue("created"); + set => SetValue("created", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs new file mode 100644 index 00000000..33c1137c --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/CustomerStatusOperationFilterInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class CustomerStatusOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public CustomerStatus? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public CustomerStatus? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs new file mode 100644 index 00000000..4a2d5362 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/DateTimeOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class DateTimeOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public DateTimeOffset? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public DateTimeOffset? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public DateTimeOffset? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public DateTimeOffset? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public DateTimeOffset? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public DateTimeOffset? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public DateTimeOffset? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public DateTimeOffset? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public DateTimeOffset? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public DateTimeOffset? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs new file mode 100644 index 00000000..2acf9c18 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/DecimalOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class DecimalOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public decimal? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public decimal? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public decimal? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public decimal? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public decimal? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public decimal? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public decimal? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public decimal? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public decimal? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public decimal? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs new file mode 100644 index 00000000..554a0f6d --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/FloatOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class FloatOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public double? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public double? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public double? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public double? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public double? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public double? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public double? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public double? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public double? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public double? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs new file mode 100644 index 00000000..e5bfaec4 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalFilterInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class IAnimalFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("name")] + [JsonPropertyName("name")] + public StringOperationFilterInput Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("numberOfLegs")] + [JsonPropertyName("numberOfLegs")] + public IntOperationFilterInput NumberOfLegs + { + get => GetValue("numberOfLegs"); + set => SetValue("numberOfLegs", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs new file mode 100644 index 00000000..211e80ee --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IAnimalSortInput.cs @@ -0,0 +1,34 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class IAnimalSortInput : GraphInputBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public SortEnumType? Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("numberOfLegs")] + [JsonPropertyName("numberOfLegs")] + public SortEnumType? NumberOfLegs + { + get => GetValue("numberOfLegs"); + set => SetValue("numberOfLegs", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs new file mode 100644 index 00000000..4ab671d7 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/InputFactory.cs @@ -0,0 +1,1847 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +public static class IF +{ + public static AddressFilterInput AddressFilter() + { + return new AddressFilterInput(); + } + public static AddressInput Address() + { + return new AddressInput(); + } + public static AddressSortInput AddressSort() + { + return new AddressSortInput(); + } + public static CustomerFilterInput CustomerFilter() + { + return new CustomerFilterInput(); + } + public static CustomerInput Customer() + { + return new CustomerInput(); + } + public static CustomerSortInput CustomerSort() + { + return new CustomerSortInput(); + } + public static CustomerStatusOperationFilterInput CustomerStatusOperationFilter() + { + return new CustomerStatusOperationFilterInput(); + } + public static DateTimeOperationFilterInput DateTimeOperationFilter() + { + return new DateTimeOperationFilterInput(); + } + public static DecimalOperationFilterInput DecimalOperationFilter() + { + return new DecimalOperationFilterInput(); + } + public static FloatOperationFilterInput FloatOperationFilter() + { + return new FloatOperationFilterInput(); + } + public static IAnimalFilterInput IAnimalFilter() + { + return new IAnimalFilterInput(); + } + public static IAnimalSortInput IAnimalSort() + { + return new IAnimalSortInput(); + } + public static IntOperationFilterInput IntOperationFilter() + { + return new IntOperationFilterInput(); + } + public static ItemFilterInput ItemFilter() + { + return new ItemFilterInput(); + } + public static ItemInput Item() + { + return new ItemInput(); + } + public static ListFilterInputTypeOfOrderFilterInput ListFilterInputTypeOfOrderFilter() + { + return new ListFilterInputTypeOfOrderFilterInput(); + } + public static ListFilterInputTypeOfOrderLineFilterInput ListFilterInputTypeOfOrderLineFilter() + { + return new ListFilterInputTypeOfOrderLineFilterInput(); + } + public static ListUnsignedByteOperationFilterInput ListUnsignedByteOperationFilter() + { + return new ListUnsignedByteOperationFilterInput(); + } + public static LocalDateOperationFilterInput LocalDateOperationFilter() + { + return new LocalDateOperationFilterInput(); + } + public static LocalTimeOperationFilterInput LocalTimeOperationFilter() + { + return new LocalTimeOperationFilterInput(); + } + public static OrderFilterInput OrderFilter() + { + return new OrderFilterInput(); + } + public static OrderInput Order() + { + return new OrderInput(); + } + public static OrderLineFilterInput OrderLineFilter() + { + return new OrderLineFilterInput(); + } + public static OrderLineInput OrderLine() + { + return new OrderLineInput(); + } + public static OrderSortInput OrderSort() + { + return new OrderSortInput(); + } + public static StringOperationFilterInput StringOperationFilter() + { + return new StringOperationFilterInput(); + } + public static UnsignedByteOperationFilterInput UnsignedByteOperationFilter() + { + return new UnsignedByteOperationFilterInput(); + } + public static UuidOperationFilterInput UuidOperationFilter() + { + return new UuidOperationFilterInput(); + } +} + + + +public static class AddressFilterInputExtensions +{ + public static AddressFilterInput And(this AddressFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static AddressFilterInput Or(this AddressFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + public static AddressFilterInput Name(this AddressFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Name = filter; + return input; + } + + public static AddressFilterInput Street(this AddressFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Street = filter; + return input; + } + + public static AddressFilterInput PostalCode(this AddressFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.PostalCode = filter; + return input; + } + + public static AddressFilterInput CreatedDate(this AddressFilterInput input, Action mod) + { + var filter = new LocalDateOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.CreatedDate = filter; + return input; + } + +} + +public static class AddressInputExtensions +{ + + public static AddressInput Name(this AddressInput input, string val) + { + input.Name = val; + return input; + } + + + public static AddressInput Street(this AddressInput input, string val) + { + input.Street = val; + return input; + } + + + public static AddressInput PostalCode(this AddressInput input, string val) + { + input.PostalCode = val; + return input; + } + + + public static AddressInput CreatedDate(this AddressInput input, DateOnly val) + { + input.CreatedDate = val; + return input; + } + +} + +public static class AddressSortInputExtensions +{ + + public static AddressSortInput Name(this AddressSortInput input, SortEnumType? val) + { + input.Name = val; + return input; + } + + + public static AddressSortInput Street(this AddressSortInput input, SortEnumType? val) + { + input.Street = val; + return input; + } + + + public static AddressSortInput PostalCode(this AddressSortInput input, SortEnumType? val) + { + input.PostalCode = val; + return input; + } + + + public static AddressSortInput CreatedDate(this AddressSortInput input, SortEnumType? val) + { + input.CreatedDate = val; + return input; + } + +} + +public static class CustomerFilterInputExtensions +{ + public static CustomerFilterInput And(this CustomerFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static CustomerFilterInput Or(this CustomerFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + public static CustomerFilterInput CustomerId(this CustomerFilterInput input, Action mod) + { + var filter = new UuidOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.CustomerId = filter; + return input; + } + + public static CustomerFilterInput CustomerName(this CustomerFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.CustomerName = filter; + return input; + } + + public static CustomerFilterInput Status(this CustomerFilterInput input, Action mod) + { + var filter = new CustomerStatusOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Status = filter; + return input; + } + + public static CustomerFilterInput Orders(this CustomerFilterInput input, Action mod) + { + var filter = new ListFilterInputTypeOfOrderFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Orders = filter; + return input; + } + + public static CustomerFilterInput Address(this CustomerFilterInput input, Action mod) + { + var filter = new AddressFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Address = filter; + return input; + } + + public static CustomerFilterInput Created(this CustomerFilterInput input, Action mod) + { + var filter = new DateTimeOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Created = filter; + return input; + } + +} + +public static class CustomerInputExtensions +{ + + public static CustomerInput CustomerId(this CustomerInput input, Guid val) + { + input.CustomerId = val; + return input; + } + + + public static CustomerInput CustomerName(this CustomerInput input, string val) + { + input.CustomerName = val; + return input; + } + + + public static CustomerInput Status(this CustomerInput input, CustomerStatus val) + { + input.Status = val; + return input; + } + + public static CustomerInput Orders(this CustomerInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Orders = filter; + return input; + } + + public static CustomerInput Address(this CustomerInput input, Action mod) + { + var filter = new AddressInput(); + mod ??= _ => { }; + mod(filter); + input.Address = filter; + return input; + } + + + public static CustomerInput Created(this CustomerInput input, DateTimeOffset? val) + { + input.Created = val; + return input; + } + +} + +public static class CustomerSortInputExtensions +{ + + public static CustomerSortInput CustomerId(this CustomerSortInput input, SortEnumType? val) + { + input.CustomerId = val; + return input; + } + + + public static CustomerSortInput CustomerName(this CustomerSortInput input, SortEnumType? val) + { + input.CustomerName = val; + return input; + } + + + public static CustomerSortInput Status(this CustomerSortInput input, SortEnumType? val) + { + input.Status = val; + return input; + } + + public static CustomerSortInput Address(this CustomerSortInput input, Action mod) + { + var filter = new AddressSortInput(); + mod ??= _ => { }; + mod(filter); + input.Address = filter; + return input; + } + + + public static CustomerSortInput Created(this CustomerSortInput input, SortEnumType? val) + { + input.Created = val; + return input; + } + +} + +public static class CustomerStatusOperationFilterInputExtensions +{ + + public static CustomerStatusOperationFilterInput Eq(this CustomerStatusOperationFilterInput input, CustomerStatus? val) + { + input.Eq = val; + return input; + } + + + public static CustomerStatusOperationFilterInput Neq(this CustomerStatusOperationFilterInput input, CustomerStatus? val) + { + input.Neq = val; + return input; + } + + + public static CustomerStatusOperationFilterInput In(this CustomerStatusOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static CustomerStatusOperationFilterInput Nin(this CustomerStatusOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + +} + +public static class DateTimeOperationFilterInputExtensions +{ + + public static DateTimeOperationFilterInput Eq(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Eq = val; + return input; + } + + + public static DateTimeOperationFilterInput Neq(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Neq = val; + return input; + } + + + public static DateTimeOperationFilterInput In(this DateTimeOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static DateTimeOperationFilterInput Nin(this DateTimeOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static DateTimeOperationFilterInput Gt(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Gt = val; + return input; + } + + + public static DateTimeOperationFilterInput Ngt(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Ngt = val; + return input; + } + + + public static DateTimeOperationFilterInput Gte(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Gte = val; + return input; + } + + + public static DateTimeOperationFilterInput Ngte(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Ngte = val; + return input; + } + + + public static DateTimeOperationFilterInput Lt(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Lt = val; + return input; + } + + + public static DateTimeOperationFilterInput Nlt(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Nlt = val; + return input; + } + + + public static DateTimeOperationFilterInput Lte(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Lte = val; + return input; + } + + + public static DateTimeOperationFilterInput Nlte(this DateTimeOperationFilterInput input, DateTimeOffset? val) + { + input.Nlte = val; + return input; + } + +} + +public static class DecimalOperationFilterInputExtensions +{ + + public static DecimalOperationFilterInput Eq(this DecimalOperationFilterInput input, decimal? val) + { + input.Eq = val; + return input; + } + + + public static DecimalOperationFilterInput Neq(this DecimalOperationFilterInput input, decimal? val) + { + input.Neq = val; + return input; + } + + + public static DecimalOperationFilterInput In(this DecimalOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static DecimalOperationFilterInput Nin(this DecimalOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static DecimalOperationFilterInput Gt(this DecimalOperationFilterInput input, decimal? val) + { + input.Gt = val; + return input; + } + + + public static DecimalOperationFilterInput Ngt(this DecimalOperationFilterInput input, decimal? val) + { + input.Ngt = val; + return input; + } + + + public static DecimalOperationFilterInput Gte(this DecimalOperationFilterInput input, decimal? val) + { + input.Gte = val; + return input; + } + + + public static DecimalOperationFilterInput Ngte(this DecimalOperationFilterInput input, decimal? val) + { + input.Ngte = val; + return input; + } + + + public static DecimalOperationFilterInput Lt(this DecimalOperationFilterInput input, decimal? val) + { + input.Lt = val; + return input; + } + + + public static DecimalOperationFilterInput Nlt(this DecimalOperationFilterInput input, decimal? val) + { + input.Nlt = val; + return input; + } + + + public static DecimalOperationFilterInput Lte(this DecimalOperationFilterInput input, decimal? val) + { + input.Lte = val; + return input; + } + + + public static DecimalOperationFilterInput Nlte(this DecimalOperationFilterInput input, decimal? val) + { + input.Nlte = val; + return input; + } + +} + +public static class FloatOperationFilterInputExtensions +{ + + public static FloatOperationFilterInput Eq(this FloatOperationFilterInput input, double? val) + { + input.Eq = val; + return input; + } + + + public static FloatOperationFilterInput Neq(this FloatOperationFilterInput input, double? val) + { + input.Neq = val; + return input; + } + + + public static FloatOperationFilterInput In(this FloatOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static FloatOperationFilterInput Nin(this FloatOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static FloatOperationFilterInput Gt(this FloatOperationFilterInput input, double? val) + { + input.Gt = val; + return input; + } + + + public static FloatOperationFilterInput Ngt(this FloatOperationFilterInput input, double? val) + { + input.Ngt = val; + return input; + } + + + public static FloatOperationFilterInput Gte(this FloatOperationFilterInput input, double? val) + { + input.Gte = val; + return input; + } + + + public static FloatOperationFilterInput Ngte(this FloatOperationFilterInput input, double? val) + { + input.Ngte = val; + return input; + } + + + public static FloatOperationFilterInput Lt(this FloatOperationFilterInput input, double? val) + { + input.Lt = val; + return input; + } + + + public static FloatOperationFilterInput Nlt(this FloatOperationFilterInput input, double? val) + { + input.Nlt = val; + return input; + } + + + public static FloatOperationFilterInput Lte(this FloatOperationFilterInput input, double? val) + { + input.Lte = val; + return input; + } + + + public static FloatOperationFilterInput Nlte(this FloatOperationFilterInput input, double? val) + { + input.Nlte = val; + return input; + } + +} + +public static class IAnimalFilterInputExtensions +{ + public static IAnimalFilterInput And(this IAnimalFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static IAnimalFilterInput Or(this IAnimalFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + public static IAnimalFilterInput Name(this IAnimalFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Name = filter; + return input; + } + + public static IAnimalFilterInput NumberOfLegs(this IAnimalFilterInput input, Action mod) + { + var filter = new IntOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.NumberOfLegs = filter; + return input; + } + +} + +public static class IAnimalSortInputExtensions +{ + + public static IAnimalSortInput Name(this IAnimalSortInput input, SortEnumType? val) + { + input.Name = val; + return input; + } + + + public static IAnimalSortInput NumberOfLegs(this IAnimalSortInput input, SortEnumType? val) + { + input.NumberOfLegs = val; + return input; + } + +} + +public static class IntOperationFilterInputExtensions +{ + + public static IntOperationFilterInput Eq(this IntOperationFilterInput input, int? val) + { + input.Eq = val; + return input; + } + + + public static IntOperationFilterInput Neq(this IntOperationFilterInput input, int? val) + { + input.Neq = val; + return input; + } + + + public static IntOperationFilterInput In(this IntOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static IntOperationFilterInput Nin(this IntOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static IntOperationFilterInput Gt(this IntOperationFilterInput input, int? val) + { + input.Gt = val; + return input; + } + + + public static IntOperationFilterInput Ngt(this IntOperationFilterInput input, int? val) + { + input.Ngt = val; + return input; + } + + + public static IntOperationFilterInput Gte(this IntOperationFilterInput input, int? val) + { + input.Gte = val; + return input; + } + + + public static IntOperationFilterInput Ngte(this IntOperationFilterInput input, int? val) + { + input.Ngte = val; + return input; + } + + + public static IntOperationFilterInput Lt(this IntOperationFilterInput input, int? val) + { + input.Lt = val; + return input; + } + + + public static IntOperationFilterInput Nlt(this IntOperationFilterInput input, int? val) + { + input.Nlt = val; + return input; + } + + + public static IntOperationFilterInput Lte(this IntOperationFilterInput input, int? val) + { + input.Lte = val; + return input; + } + + + public static IntOperationFilterInput Nlte(this IntOperationFilterInput input, int? val) + { + input.Nlte = val; + return input; + } + +} + +public static class ItemFilterInputExtensions +{ + public static ItemFilterInput And(this ItemFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static ItemFilterInput Or(this ItemFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + public static ItemFilterInput ItemId(this ItemFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.ItemId = filter; + return input; + } + + public static ItemFilterInput ItemName(this ItemFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.ItemName = filter; + return input; + } + + public static ItemFilterInput Data(this ItemFilterInput input, Action mod) + { + var filter = new ListUnsignedByteOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Data = filter; + return input; + } + +} + +public static class ItemInputExtensions +{ + + public static ItemInput ItemId(this ItemInput input, string val) + { + input.ItemId = val; + return input; + } + + + public static ItemInput ItemName(this ItemInput input, string val) + { + input.ItemName = val; + return input; + } + + + public static ItemInput Data(this ItemInput input, List val) + { + input.Data = val; + return input; + } + +} + +public static class ListFilterInputTypeOfOrderFilterInputExtensions +{ + public static ListFilterInputTypeOfOrderFilterInput All(this ListFilterInputTypeOfOrderFilterInput input, Action mod) + { + var filter = new OrderFilterInput(); + mod ??= _ => { }; + mod(filter); + input.All = filter; + return input; + } + + public static ListFilterInputTypeOfOrderFilterInput None(this ListFilterInputTypeOfOrderFilterInput input, Action mod) + { + var filter = new OrderFilterInput(); + mod ??= _ => { }; + mod(filter); + input.None = filter; + return input; + } + + public static ListFilterInputTypeOfOrderFilterInput Some(this ListFilterInputTypeOfOrderFilterInput input, Action mod) + { + var filter = new OrderFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Some = filter; + return input; + } + + + public static ListFilterInputTypeOfOrderFilterInput Any(this ListFilterInputTypeOfOrderFilterInput input, bool? val) + { + input.Any = val; + return input; + } + +} + +public static class ListFilterInputTypeOfOrderLineFilterInputExtensions +{ + public static ListFilterInputTypeOfOrderLineFilterInput All(this ListFilterInputTypeOfOrderLineFilterInput input, Action mod) + { + var filter = new OrderLineFilterInput(); + mod ??= _ => { }; + mod(filter); + input.All = filter; + return input; + } + + public static ListFilterInputTypeOfOrderLineFilterInput None(this ListFilterInputTypeOfOrderLineFilterInput input, Action mod) + { + var filter = new OrderLineFilterInput(); + mod ??= _ => { }; + mod(filter); + input.None = filter; + return input; + } + + public static ListFilterInputTypeOfOrderLineFilterInput Some(this ListFilterInputTypeOfOrderLineFilterInput input, Action mod) + { + var filter = new OrderLineFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Some = filter; + return input; + } + + + public static ListFilterInputTypeOfOrderLineFilterInput Any(this ListFilterInputTypeOfOrderLineFilterInput input, bool? val) + { + input.Any = val; + return input; + } + +} + +public static class ListUnsignedByteOperationFilterInputExtensions +{ + public static ListUnsignedByteOperationFilterInput All(this ListUnsignedByteOperationFilterInput input, Action mod) + { + var filter = new UnsignedByteOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.All = filter; + return input; + } + + public static ListUnsignedByteOperationFilterInput None(this ListUnsignedByteOperationFilterInput input, Action mod) + { + var filter = new UnsignedByteOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.None = filter; + return input; + } + + public static ListUnsignedByteOperationFilterInput Some(this ListUnsignedByteOperationFilterInput input, Action mod) + { + var filter = new UnsignedByteOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Some = filter; + return input; + } + + + public static ListUnsignedByteOperationFilterInput Any(this ListUnsignedByteOperationFilterInput input, bool? val) + { + input.Any = val; + return input; + } + +} + +public static class LocalDateOperationFilterInputExtensions +{ + + public static LocalDateOperationFilterInput Eq(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Eq = val; + return input; + } + + + public static LocalDateOperationFilterInput Neq(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Neq = val; + return input; + } + + + public static LocalDateOperationFilterInput In(this LocalDateOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static LocalDateOperationFilterInput Nin(this LocalDateOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static LocalDateOperationFilterInput Gt(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Gt = val; + return input; + } + + + public static LocalDateOperationFilterInput Ngt(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Ngt = val; + return input; + } + + + public static LocalDateOperationFilterInput Gte(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Gte = val; + return input; + } + + + public static LocalDateOperationFilterInput Ngte(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Ngte = val; + return input; + } + + + public static LocalDateOperationFilterInput Lt(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Lt = val; + return input; + } + + + public static LocalDateOperationFilterInput Nlt(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Nlt = val; + return input; + } + + + public static LocalDateOperationFilterInput Lte(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Lte = val; + return input; + } + + + public static LocalDateOperationFilterInput Nlte(this LocalDateOperationFilterInput input, DateOnly? val) + { + input.Nlte = val; + return input; + } + +} + +public static class LocalTimeOperationFilterInputExtensions +{ + + public static LocalTimeOperationFilterInput Eq(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Eq = val; + return input; + } + + + public static LocalTimeOperationFilterInput Neq(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Neq = val; + return input; + } + + + public static LocalTimeOperationFilterInput In(this LocalTimeOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static LocalTimeOperationFilterInput Nin(this LocalTimeOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static LocalTimeOperationFilterInput Gt(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Gt = val; + return input; + } + + + public static LocalTimeOperationFilterInput Ngt(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Ngt = val; + return input; + } + + + public static LocalTimeOperationFilterInput Gte(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Gte = val; + return input; + } + + + public static LocalTimeOperationFilterInput Ngte(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Ngte = val; + return input; + } + + + public static LocalTimeOperationFilterInput Lt(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Lt = val; + return input; + } + + + public static LocalTimeOperationFilterInput Nlt(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Nlt = val; + return input; + } + + + public static LocalTimeOperationFilterInput Lte(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Lte = val; + return input; + } + + + public static LocalTimeOperationFilterInput Nlte(this LocalTimeOperationFilterInput input, TimeOnly? val) + { + input.Nlte = val; + return input; + } + +} + +public static class OrderFilterInputExtensions +{ + public static OrderFilterInput And(this OrderFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static OrderFilterInput Or(this OrderFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + public static OrderFilterInput OrderId(this OrderFilterInput input, Action mod) + { + var filter = new UuidOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.OrderId = filter; + return input; + } + + public static OrderFilterInput Customer(this OrderFilterInput input, Action mod) + { + var filter = new CustomerFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Customer = filter; + return input; + } + + public static OrderFilterInput Address(this OrderFilterInput input, Action mod) + { + var filter = new AddressFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Address = filter; + return input; + } + + public static OrderFilterInput OrderDate(this OrderFilterInput input, Action mod) + { + var filter = new DateTimeOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.OrderDate = filter; + return input; + } + + public static OrderFilterInput OrderDateTime(this OrderFilterInput input, Action mod) + { + var filter = new DateTimeOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.OrderDateTime = filter; + return input; + } + + public static OrderFilterInput OrderDay(this OrderFilterInput input, Action mod) + { + var filter = new LocalDateOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.OrderDay = filter; + return input; + } + + public static OrderFilterInput Lines(this OrderFilterInput input, Action mod) + { + var filter = new ListFilterInputTypeOfOrderLineFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Lines = filter; + return input; + } + + public static OrderFilterInput EntryTime(this OrderFilterInput input, Action mod) + { + var filter = new LocalTimeOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.EntryTime = filter; + return input; + } + + [Obsolete("This propery is obsolete and should not be used!")] + public static OrderFilterInput Grade(this OrderFilterInput input, Action mod) + { + var filter = new StringOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Grade = filter; + return input; + } + +} + +public static class OrderInputExtensions +{ + + public static OrderInput OrderId(this OrderInput input, Guid val) + { + input.OrderId = val; + return input; + } + + public static OrderInput Customer(this OrderInput input, Action mod) + { + var filter = new CustomerInput(); + mod ??= _ => { }; + mod(filter); + input.Customer = filter; + return input; + } + + public static OrderInput Address(this OrderInput input, Action mod) + { + var filter = new AddressInput(); + mod ??= _ => { }; + mod(filter); + input.Address = filter; + return input; + } + + + public static OrderInput OrderDate(this OrderInput input, DateTimeOffset val) + { + input.OrderDate = val; + return input; + } + + + public static OrderInput OrderDateTime(this OrderInput input, DateTimeOffset val) + { + input.OrderDateTime = val; + return input; + } + + + public static OrderInput OrderDay(this OrderInput input, DateOnly val) + { + input.OrderDay = val; + return input; + } + + public static OrderInput Lines(this OrderInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Lines = filter; + return input; + } + + + public static OrderInput EntryTime(this OrderInput input, TimeOnly? val) + { + input.EntryTime = val; + return input; + } + + + [Obsolete("This propery is obsolete and should not be used!")] + public static OrderInput Grade(this OrderInput input, string val) + { + input.Grade = val; + return input; + } + +} + +public static class OrderLineFilterInputExtensions +{ + public static OrderLineFilterInput And(this OrderLineFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static OrderLineFilterInput Or(this OrderLineFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + public static OrderLineFilterInput LineNumber(this OrderLineFilterInput input, Action mod) + { + var filter = new IntOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.LineNumber = filter; + return input; + } + + public static OrderLineFilterInput Order(this OrderLineFilterInput input, Action mod) + { + var filter = new OrderFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Order = filter; + return input; + } + + public static OrderLineFilterInput Item(this OrderLineFilterInput input, Action mod) + { + var filter = new ItemFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Item = filter; + return input; + } + + public static OrderLineFilterInput Price(this OrderLineFilterInput input, Action mod) + { + var filter = new DecimalOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Price = filter; + return input; + } + + public static OrderLineFilterInput Quantity(this OrderLineFilterInput input, Action mod) + { + var filter = new FloatOperationFilterInput(); + mod ??= _ => { }; + mod(filter); + input.Quantity = filter; + return input; + } + +} + +public static class OrderLineInputExtensions +{ + + public static OrderLineInput LineNumber(this OrderLineInput input, int val) + { + input.LineNumber = val; + return input; + } + + public static OrderLineInput Order(this OrderLineInput input, Action mod) + { + var filter = new OrderInput(); + mod ??= _ => { }; + mod(filter); + input.Order = filter; + return input; + } + + public static OrderLineInput Item(this OrderLineInput input, Action mod) + { + var filter = new ItemInput(); + mod ??= _ => { }; + mod(filter); + input.Item = filter; + return input; + } + + + public static OrderLineInput Price(this OrderLineInput input, decimal val) + { + input.Price = val; + return input; + } + + + public static OrderLineInput Quantity(this OrderLineInput input, double val) + { + input.Quantity = val; + return input; + } + +} + +public static class OrderSortInputExtensions +{ + + public static OrderSortInput OrderId(this OrderSortInput input, SortEnumType? val) + { + input.OrderId = val; + return input; + } + + public static OrderSortInput Customer(this OrderSortInput input, Action mod) + { + var filter = new CustomerSortInput(); + mod ??= _ => { }; + mod(filter); + input.Customer = filter; + return input; + } + + public static OrderSortInput Address(this OrderSortInput input, Action mod) + { + var filter = new AddressSortInput(); + mod ??= _ => { }; + mod(filter); + input.Address = filter; + return input; + } + + + public static OrderSortInput OrderDate(this OrderSortInput input, SortEnumType? val) + { + input.OrderDate = val; + return input; + } + + + public static OrderSortInput OrderDateTime(this OrderSortInput input, SortEnumType? val) + { + input.OrderDateTime = val; + return input; + } + + + public static OrderSortInput OrderDay(this OrderSortInput input, SortEnumType? val) + { + input.OrderDay = val; + return input; + } + + + public static OrderSortInput EntryTime(this OrderSortInput input, SortEnumType? val) + { + input.EntryTime = val; + return input; + } + + + [Obsolete("This propery is obsolete and should not be used!")] + public static OrderSortInput Grade(this OrderSortInput input, SortEnumType? val) + { + input.Grade = val; + return input; + } + +} + +public static class StringOperationFilterInputExtensions +{ + public static StringOperationFilterInput And(this StringOperationFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.And = filter; + return input; + } + + public static StringOperationFilterInput Or(this StringOperationFilterInput input, Action> mod) + { + var filter = new List(); + mod ??= _ => { }; + mod(filter); + input.Or = filter; + return input; + } + + + public static StringOperationFilterInput Eq(this StringOperationFilterInput input, string val) + { + input.Eq = val; + return input; + } + + + public static StringOperationFilterInput Neq(this StringOperationFilterInput input, string val) + { + input.Neq = val; + return input; + } + + + public static StringOperationFilterInput Contains(this StringOperationFilterInput input, string val) + { + input.Contains = val; + return input; + } + + + public static StringOperationFilterInput Ncontains(this StringOperationFilterInput input, string val) + { + input.Ncontains = val; + return input; + } + + + public static StringOperationFilterInput In(this StringOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static StringOperationFilterInput Nin(this StringOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static StringOperationFilterInput StartsWith(this StringOperationFilterInput input, string val) + { + input.StartsWith = val; + return input; + } + + + public static StringOperationFilterInput NstartsWith(this StringOperationFilterInput input, string val) + { + input.NstartsWith = val; + return input; + } + + + public static StringOperationFilterInput EndsWith(this StringOperationFilterInput input, string val) + { + input.EndsWith = val; + return input; + } + + + public static StringOperationFilterInput NendsWith(this StringOperationFilterInput input, string val) + { + input.NendsWith = val; + return input; + } + +} + +public static class UnsignedByteOperationFilterInputExtensions +{ + + public static UnsignedByteOperationFilterInput Eq(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Eq = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Neq(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Neq = val; + return input; + } + + + public static UnsignedByteOperationFilterInput In(this UnsignedByteOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Nin(this UnsignedByteOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Gt(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Gt = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Ngt(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Ngt = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Gte(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Gte = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Ngte(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Ngte = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Lt(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Lt = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Nlt(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Nlt = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Lte(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Lte = val; + return input; + } + + + public static UnsignedByteOperationFilterInput Nlte(this UnsignedByteOperationFilterInput input, byte? val) + { + input.Nlte = val; + return input; + } + +} + +public static class UuidOperationFilterInputExtensions +{ + + public static UuidOperationFilterInput Eq(this UuidOperationFilterInput input, Guid? val) + { + input.Eq = val; + return input; + } + + + public static UuidOperationFilterInput Neq(this UuidOperationFilterInput input, Guid? val) + { + input.Neq = val; + return input; + } + + + public static UuidOperationFilterInput In(this UuidOperationFilterInput input, List val) + { + input.In = val; + return input; + } + + + public static UuidOperationFilterInput Nin(this UuidOperationFilterInput input, List val) + { + input.Nin = val; + return input; + } + + + public static UuidOperationFilterInput Gt(this UuidOperationFilterInput input, Guid? val) + { + input.Gt = val; + return input; + } + + + public static UuidOperationFilterInput Ngt(this UuidOperationFilterInput input, Guid? val) + { + input.Ngt = val; + return input; + } + + + public static UuidOperationFilterInput Gte(this UuidOperationFilterInput input, Guid? val) + { + input.Gte = val; + return input; + } + + + public static UuidOperationFilterInput Ngte(this UuidOperationFilterInput input, Guid? val) + { + input.Ngte = val; + return input; + } + + + public static UuidOperationFilterInput Lt(this UuidOperationFilterInput input, Guid? val) + { + input.Lt = val; + return input; + } + + + public static UuidOperationFilterInput Nlt(this UuidOperationFilterInput input, Guid? val) + { + input.Nlt = val; + return input; + } + + + public static UuidOperationFilterInput Lte(this UuidOperationFilterInput input, Guid? val) + { + input.Lte = val; + return input; + } + + + public static UuidOperationFilterInput Nlte(this UuidOperationFilterInput input, Guid? val) + { + input.Nlte = val; + return input; + } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs new file mode 100644 index 00000000..ec93fd6f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/IntOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class IntOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public int? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public int? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public int? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public int? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public int? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public int? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public int? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public int? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public int? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public int? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs new file mode 100644 index 00000000..b6182344 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ItemFilterInput.cs @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class ItemFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("itemId")] + [JsonPropertyName("itemId")] + public StringOperationFilterInput ItemId + { + get => GetValue("itemId"); + set => SetValue("itemId", value); + } + + [GraphQLMember("itemName")] + [JsonPropertyName("itemName")] + public StringOperationFilterInput ItemName + { + get => GetValue("itemName"); + set => SetValue("itemName", value); + } + + [GraphQLMember("data")] + [JsonPropertyName("data")] + public ListUnsignedByteOperationFilterInput Data + { + get => GetValue("data"); + set => SetValue("data", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs new file mode 100644 index 00000000..aa030c07 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ItemInput.cs @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class ItemInput : GraphInputBase +{ + [GraphQLMember("itemId")] + [JsonPropertyName("itemId")] + public string ItemId + { + get => GetValue("itemId"); + set => SetValue("itemId", value); + } + + [GraphQLMember("itemName")] + [JsonPropertyName("itemName")] + public string ItemName + { + get => GetValue("itemName"); + set => SetValue("itemName", value); + } + + [GraphQLMember("data")] + [JsonPropertyName("data")] + public List Data + { + get => GetValue>("data"); + set => SetValue("data", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs new file mode 100644 index 00000000..56aca507 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderFilterInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class ListFilterInputTypeOfOrderFilterInput : GraphInputBase +{ + [GraphQLMember("all")] + [JsonPropertyName("all")] + public OrderFilterInput All + { + get => GetValue("all"); + set => SetValue("all", value); + } + + [GraphQLMember("none")] + [JsonPropertyName("none")] + public OrderFilterInput None + { + get => GetValue("none"); + set => SetValue("none", value); + } + + [GraphQLMember("some")] + [JsonPropertyName("some")] + public OrderFilterInput Some + { + get => GetValue("some"); + set => SetValue("some", value); + } + + [GraphQLMember("any")] + [JsonPropertyName("any")] + public bool? Any + { + get => GetValue("any"); + set => SetValue("any", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs new file mode 100644 index 00000000..25317e10 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListFilterInputTypeOfOrderLineFilterInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class ListFilterInputTypeOfOrderLineFilterInput : GraphInputBase +{ + [GraphQLMember("all")] + [JsonPropertyName("all")] + public OrderLineFilterInput All + { + get => GetValue("all"); + set => SetValue("all", value); + } + + [GraphQLMember("none")] + [JsonPropertyName("none")] + public OrderLineFilterInput None + { + get => GetValue("none"); + set => SetValue("none", value); + } + + [GraphQLMember("some")] + [JsonPropertyName("some")] + public OrderLineFilterInput Some + { + get => GetValue("some"); + set => SetValue("some", value); + } + + [GraphQLMember("any")] + [JsonPropertyName("any")] + public bool? Any + { + get => GetValue("any"); + set => SetValue("any", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListUnsignedByteOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListUnsignedByteOperationFilterInput.cs new file mode 100644 index 00000000..250f3858 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/ListUnsignedByteOperationFilterInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class ListUnsignedByteOperationFilterInput : GraphInputBase +{ + [GraphQLMember("all")] + [JsonPropertyName("all")] + public UnsignedByteOperationFilterInput All + { + get => GetValue("all"); + set => SetValue("all", value); + } + + [GraphQLMember("none")] + [JsonPropertyName("none")] + public UnsignedByteOperationFilterInput None + { + get => GetValue("none"); + set => SetValue("none", value); + } + + [GraphQLMember("some")] + [JsonPropertyName("some")] + public UnsignedByteOperationFilterInput Some + { + get => GetValue("some"); + set => SetValue("some", value); + } + + [GraphQLMember("any")] + [JsonPropertyName("any")] + public bool? Any + { + get => GetValue("any"); + set => SetValue("any", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/LocalDateOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/LocalDateOperationFilterInput.cs new file mode 100644 index 00000000..ab3ba949 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/LocalDateOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class LocalDateOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public DateOnly? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public DateOnly? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public DateOnly? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public DateOnly? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public DateOnly? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public DateOnly? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public DateOnly? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public DateOnly? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public DateOnly? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public DateOnly? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/LocalTimeOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/LocalTimeOperationFilterInput.cs new file mode 100644 index 00000000..eb772833 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/LocalTimeOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class LocalTimeOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public TimeOnly? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public TimeOnly? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public TimeOnly? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public TimeOnly? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public TimeOnly? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public TimeOnly? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public TimeOnly? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public TimeOnly? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public TimeOnly? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public TimeOnly? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs new file mode 100644 index 00000000..0e064ad7 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderFilterInput.cs @@ -0,0 +1,107 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("orderId")] + [JsonPropertyName("orderId")] + public UuidOperationFilterInput OrderId + { + get => GetValue("orderId"); + set => SetValue("orderId", value); + } + + [GraphQLMember("customer")] + [JsonPropertyName("customer")] + public CustomerFilterInput Customer + { + get => GetValue("customer"); + set => SetValue("customer", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressFilterInput Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("orderDate")] + [JsonPropertyName("orderDate")] + public DateTimeOperationFilterInput OrderDate + { + get => GetValue("orderDate"); + set => SetValue("orderDate", value); + } + + [GraphQLMember("orderDateTime")] + [JsonPropertyName("orderDateTime")] + public DateTimeOperationFilterInput OrderDateTime + { + get => GetValue("orderDateTime"); + set => SetValue("orderDateTime", value); + } + + [GraphQLMember("orderDay")] + [JsonPropertyName("orderDay")] + public LocalDateOperationFilterInput OrderDay + { + get => GetValue("orderDay"); + set => SetValue("orderDay", value); + } + + [GraphQLMember("lines")] + [JsonPropertyName("lines")] + public ListFilterInputTypeOfOrderLineFilterInput Lines + { + get => GetValue("lines"); + set => SetValue("lines", value); + } + + [GraphQLMember("entryTime")] + [JsonPropertyName("entryTime")] + public LocalTimeOperationFilterInput EntryTime + { + get => GetValue("entryTime"); + set => SetValue("entryTime", value); + } + + [Obsolete("This propery is obsolete and should not be used!")] + [GraphQLMember("grade")] + [JsonPropertyName("grade")] + public StringOperationFilterInput Grade + { + get => GetValue("grade"); + set => SetValue("grade", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs new file mode 100644 index 00000000..6f4cfc5e --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderInput.cs @@ -0,0 +1,91 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderInput : GraphInputBase +{ + [GraphQLMember("orderId")] + [JsonPropertyName("orderId")] + public Guid OrderId + { + get => GetValue("orderId"); + set => SetValue("orderId", value); + } + + [GraphQLMember("customer")] + [JsonPropertyName("customer")] + public CustomerInput Customer + { + get => GetValue("customer"); + set => SetValue("customer", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressInput Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("orderDate")] + [JsonPropertyName("orderDate")] + public DateTimeOffset OrderDate + { + get => GetValue("orderDate"); + set => SetValue("orderDate", value); + } + + [GraphQLMember("orderDateTime")] + [JsonPropertyName("orderDateTime")] + public DateTimeOffset OrderDateTime + { + get => GetValue("orderDateTime"); + set => SetValue("orderDateTime", value); + } + + [GraphQLMember("orderDay")] + [JsonPropertyName("orderDay")] + public DateOnly OrderDay + { + get => GetValue("orderDay"); + set => SetValue("orderDay", value); + } + + [GraphQLMember("lines")] + [JsonPropertyName("lines")] + public List Lines + { + get => GetValue>("lines"); + set => SetValue("lines", value); + } + + [GraphQLMember("entryTime")] + [JsonPropertyName("entryTime")] + public TimeOnly? EntryTime + { + get => GetValue("entryTime"); + set => SetValue("entryTime", value); + } + + [Obsolete("This propery is obsolete and should not be used!")] + [GraphQLMember("grade")] + [JsonPropertyName("grade")] + public string Grade + { + get => GetValue("grade"); + set => SetValue("grade", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs new file mode 100644 index 00000000..1546b2e7 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineFilterInput.cs @@ -0,0 +1,74 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderLineFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("lineNumber")] + [JsonPropertyName("lineNumber")] + public IntOperationFilterInput LineNumber + { + get => GetValue("lineNumber"); + set => SetValue("lineNumber", value); + } + + [GraphQLMember("order")] + [JsonPropertyName("order")] + public OrderFilterInput Order + { + get => GetValue("order"); + set => SetValue("order", value); + } + + [GraphQLMember("item")] + [JsonPropertyName("item")] + public ItemFilterInput Item + { + get => GetValue("item"); + set => SetValue("item", value); + } + + [GraphQLMember("price")] + [JsonPropertyName("price")] + public DecimalOperationFilterInput Price + { + get => GetValue("price"); + set => SetValue("price", value); + } + + [GraphQLMember("quantity")] + [JsonPropertyName("quantity")] + public FloatOperationFilterInput Quantity + { + get => GetValue("quantity"); + set => SetValue("quantity", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs new file mode 100644 index 00000000..987936d0 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderLineInput.cs @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderLineInput : GraphInputBase +{ + [GraphQLMember("lineNumber")] + [JsonPropertyName("lineNumber")] + public int LineNumber + { + get => GetValue("lineNumber"); + set => SetValue("lineNumber", value); + } + + [GraphQLMember("order")] + [JsonPropertyName("order")] + public OrderInput Order + { + get => GetValue("order"); + set => SetValue("order", value); + } + + [GraphQLMember("item")] + [JsonPropertyName("item")] + public ItemInput Item + { + get => GetValue("item"); + set => SetValue("item", value); + } + + [GraphQLMember("price")] + [JsonPropertyName("price")] + public decimal Price + { + get => GetValue("price"); + set => SetValue("price", value); + } + + [GraphQLMember("quantity")] + [JsonPropertyName("quantity")] + public double Quantity + { + get => GetValue("quantity"); + set => SetValue("quantity", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs new file mode 100644 index 00000000..66aa787d --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/OrderSortInput.cs @@ -0,0 +1,83 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderSortInput : GraphInputBase +{ + [GraphQLMember("orderId")] + [JsonPropertyName("orderId")] + public SortEnumType? OrderId + { + get => GetValue("orderId"); + set => SetValue("orderId", value); + } + + [GraphQLMember("customer")] + [JsonPropertyName("customer")] + public CustomerSortInput Customer + { + get => GetValue("customer"); + set => SetValue("customer", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressSortInput Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("orderDate")] + [JsonPropertyName("orderDate")] + public SortEnumType? OrderDate + { + get => GetValue("orderDate"); + set => SetValue("orderDate", value); + } + + [GraphQLMember("orderDateTime")] + [JsonPropertyName("orderDateTime")] + public SortEnumType? OrderDateTime + { + get => GetValue("orderDateTime"); + set => SetValue("orderDateTime", value); + } + + [GraphQLMember("orderDay")] + [JsonPropertyName("orderDay")] + public SortEnumType? OrderDay + { + get => GetValue("orderDay"); + set => SetValue("orderDay", value); + } + + [GraphQLMember("entryTime")] + [JsonPropertyName("entryTime")] + public SortEnumType? EntryTime + { + get => GetValue("entryTime"); + set => SetValue("entryTime", value); + } + + [Obsolete("This propery is obsolete and should not be used!")] + [GraphQLMember("grade")] + [JsonPropertyName("grade")] + public SortEnumType? Grade + { + get => GetValue("grade"); + set => SetValue("grade", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs new file mode 100644 index 00000000..77e0c538 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/StringOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class StringOperationFilterInput : GraphInputBase +{ + [GraphQLMember("and")] + [JsonPropertyName("and")] + public List And + { + get => GetValue>("and"); + set => SetValue("and", value); + } + + [GraphQLMember("or")] + [JsonPropertyName("or")] + public List Or + { + get => GetValue>("or"); + set => SetValue("or", value); + } + + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public string Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public string Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("contains")] + [JsonPropertyName("contains")] + public string Contains + { + get => GetValue("contains"); + set => SetValue("contains", value); + } + + [GraphQLMember("ncontains")] + [JsonPropertyName("ncontains")] + public string Ncontains + { + get => GetValue("ncontains"); + set => SetValue("ncontains", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("startsWith")] + [JsonPropertyName("startsWith")] + public string StartsWith + { + get => GetValue("startsWith"); + set => SetValue("startsWith", value); + } + + [GraphQLMember("nstartsWith")] + [JsonPropertyName("nstartsWith")] + public string NstartsWith + { + get => GetValue("nstartsWith"); + set => SetValue("nstartsWith", value); + } + + [GraphQLMember("endsWith")] + [JsonPropertyName("endsWith")] + public string EndsWith + { + get => GetValue("endsWith"); + set => SetValue("endsWith", value); + } + + [GraphQLMember("nendsWith")] + [JsonPropertyName("nendsWith")] + public string NendsWith + { + get => GetValue("nendsWith"); + set => SetValue("nendsWith", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/UnsignedByteOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/UnsignedByteOperationFilterInput.cs new file mode 100644 index 00000000..6d0a73a2 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/UnsignedByteOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class UnsignedByteOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public byte? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public byte? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public byte? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public byte? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public byte? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public byte? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public byte? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public byte? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public byte? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public byte? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs new file mode 100644 index 00000000..87814ffe --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Inputs/UuidOperationFilterInput.cs @@ -0,0 +1,114 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class UuidOperationFilterInput : GraphInputBase +{ + [GraphQLMember("eq")] + [JsonPropertyName("eq")] + public Guid? Eq + { + get => GetValue("eq"); + set => SetValue("eq", value); + } + + [GraphQLMember("neq")] + [JsonPropertyName("neq")] + public Guid? Neq + { + get => GetValue("neq"); + set => SetValue("neq", value); + } + + [GraphQLMember("in")] + [JsonPropertyName("in")] + public List In + { + get => GetValue>("in"); + set => SetValue("in", value); + } + + [GraphQLMember("nin")] + [JsonPropertyName("nin")] + public List Nin + { + get => GetValue>("nin"); + set => SetValue("nin", value); + } + + [GraphQLMember("gt")] + [JsonPropertyName("gt")] + public Guid? Gt + { + get => GetValue("gt"); + set => SetValue("gt", value); + } + + [GraphQLMember("ngt")] + [JsonPropertyName("ngt")] + public Guid? Ngt + { + get => GetValue("ngt"); + set => SetValue("ngt", value); + } + + [GraphQLMember("gte")] + [JsonPropertyName("gte")] + public Guid? Gte + { + get => GetValue("gte"); + set => SetValue("gte", value); + } + + [GraphQLMember("ngte")] + [JsonPropertyName("ngte")] + public Guid? Ngte + { + get => GetValue("ngte"); + set => SetValue("ngte", value); + } + + [GraphQLMember("lt")] + [JsonPropertyName("lt")] + public Guid? Lt + { + get => GetValue("lt"); + set => SetValue("lt", value); + } + + [GraphQLMember("nlt")] + [JsonPropertyName("nlt")] + public Guid? Nlt + { + get => GetValue("nlt"); + set => SetValue("nlt", value); + } + + [GraphQLMember("lte")] + [JsonPropertyName("lte")] + public Guid? Lte + { + get => GetValue("lte"); + set => SetValue("lte", value); + } + + [GraphQLMember("nlte")] + [JsonPropertyName("nlte")] + public Guid? Nlte + { + get => GetValue("nlte"); + set => SetValue("nlte", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs new file mode 100644 index 00000000..4b30ae70 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IAnimal.cs @@ -0,0 +1,120 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Converters; + +namespace Linq2GraphQL.TestClient; + +/// +/// Extension methods for IAnimal interface type casting +/// +public static class IAnimalExtensions +{ + /// + /// Casts IAnimal to Pig if the runtime type matches + /// + /// The interface value to cast + /// Pig instance or null if type doesn't match + [GraphQLMember("Pig", true)] + public static Pig Pig(this IAnimal value) + { + if (value.__TypeName == "Pig") + { + return (Pig)value; + } + return null; + } + + /// + /// Casts IAnimal to Spider if the runtime type matches + /// + /// The interface value to cast + /// Spider instance or null if type doesn't match + [GraphQLMember("Spider", true)] + public static Spider Spider(this IAnimal value) + { + if (value.__TypeName == "Spider") + { + return (Spider)value; + } + return null; + } + +} + +/// +/// JSON converter for IAnimal interface deserialization +/// +internal class IAnimalConverter : InterfaceJsonConverter +{ + /// + /// Deserializes JSON to the appropriate concrete type based on __typename + /// + /// The GraphQL type name from __typename field + /// The JSON object to deserialize + /// Deserialized instance of the appropriate concrete type + public override IAnimal Deserialize(string typeName, JsonObject json) => typeName switch + { + "Pig" => json.Deserialize(), + "Spider" => json.Deserialize(), + _ => json.Deserialize() + }; +} + +/// +/// GraphQL interface IAnimal with all common fields +/// +[JsonConverter(typeof(IAnimalConverter))] +public interface IAnimal +{ + /// + /// name field from GraphQL schema + /// + [GraphQLMember("name")] + string Name { get; set; } + + /// + /// numberOfLegs field from GraphQL schema + /// + [GraphQLMember("numberOfLegs")] + int NumberOfLegs { get; set; } + + /// + /// GraphQL __typename field for runtime type resolution + /// + [GraphQLMember("__typename")] + string __TypeName { get; set; } +} + +/// +/// Concrete implementation of IAnimal interface for fallback deserialization +/// +internal class IAnimal__Concrete : IAnimal +{ + /// + /// name field from GraphQL schema + /// + [GraphQLMember("name")] + public string Name { get; set; } + + /// + /// numberOfLegs field from GraphQL schema + /// + [GraphQLMember("numberOfLegs")] + public int NumberOfLegs { get; set; } + + /// + /// GraphQL __typename field for runtime type resolution + /// + [GraphQLMember("__typename")] + public string __TypeName { get; set; } +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IMutationMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IMutationMethods.cs new file mode 100644 index 00000000..b255d2d6 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IMutationMethods.cs @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +/// +/// Interface for MutationMethods GraphQL operations +/// +public interface IMutationMethods +{ + /// + /// Executes setName GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery SetName(string name = null); + + /// + /// Executes addCustomer GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery AddCustomer(CustomerInput customer = null); + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IQueryMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IQueryMethods.cs new file mode 100644 index 00000000..55885c82 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/IQueryMethods.cs @@ -0,0 +1,89 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +/// +/// Interface for QueryMethods GraphQL operations +/// +public interface IQueryMethods +{ + /// + /// Executes hello GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery Hello(string name = null); + + /// + /// Executes raiseError GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery RaiseError(string message = null); + + /// + /// Executes raiseAuthError GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery RaiseAuthError(); + + /// + /// Executes customerReturnNull GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery CustomerReturnNull(); + + /// + /// Executes customers GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery> + GraphQuery> Customers(); + + /// + /// Executes ordersNoBackwardPagination GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery OrdersNoBackwardPagination([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, OrderFilterInput where = null, List order = null); + + /// + /// Executes ordersNoTotalCount GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + GraphCursorQuery OrdersNoTotalCount([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, OrderFilterInput where = null, List order = null); + + /// + /// Executes orders GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + GraphCursorQuery Orders([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, OrderFilterInput where = null, List order = null); + + /// + /// Executes animals GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + GraphCursorQuery Animals([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, IAnimalFilterInput where = null, List order = null); + + /// + /// Executes ordersOffsetPaging GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphCursorQuery + GraphCursorQuery OrdersOffsetPaging([global::System.ComponentModel.Description("Returns the first _n_ elements from the list.")] int? first = null, [global::System.ComponentModel.Description("Returns the elements in the list that come after the specified cursor.")] string after = null, [global::System.ComponentModel.Description("Returns the last _n_ elements from the list.")] int? last = null, [global::System.ComponentModel.Description("Returns the elements in the list that come before the specified cursor.")] string before = null, OrderFilterInput where = null, List order = null); + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/ISampleClient.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/ISampleClient.cs new file mode 100644 index 00000000..155ce520 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/ISampleClient.cs @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClient; + +public interface ISampleClient +{ + IQueryMethods Query { get; } + IMutationMethods Mutation { get; } + ISubscriptionMethods Subscription { get; } +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/ISubscriptionMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/ISubscriptionMethods.cs new file mode 100644 index 00000000..3f0ff9ff --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Interfaces/ISubscriptionMethods.cs @@ -0,0 +1,34 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Subscriptions; + +namespace Linq2GraphQL.TestClient; + +/// +/// Interface for SubscriptionMethods GraphQL operations +/// +public interface ISubscriptionMethods +{ + /// + /// Executes customerAdded GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphSubscription + GraphSubscription CustomerAdded(); + + /// + /// Executes customerNameAdded GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphSubscription + GraphSubscription CustomerNameAdded(string name = null); + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Address.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Address.cs new file mode 100644 index 00000000..31df8309 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Address.cs @@ -0,0 +1,35 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public partial class Address : GraphQLTypeBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public string Name { get; set; } + + [GraphQLMember("street")] + [JsonPropertyName("street")] + public string Street { get; set; } + + [GraphQLMember("postalCode")] + [JsonPropertyName("postalCode")] + public string PostalCode { get; set; } + + [GraphQLMember("createdDate")] + [JsonPropertyName("createdDate")] + public DateOnly CreatedDate { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs new file mode 100644 index 00000000..3609f254 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/AnimalsConnection.cs @@ -0,0 +1,55 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// A connection to a list of items. +/// +[global::System.ComponentModel.Description("A connection to a list of items.")] +public partial class AnimalsConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging +{ + /// + /// Information to aid in pagination. + /// + [global::System.ComponentModel.Description("Information to aid in pagination.")] + [GraphQLMember("pageInfo")] + [JsonPropertyName("pageInfo")] + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + + /// + /// A list of edges. + /// + [global::System.ComponentModel.Description("A list of edges.")] + [GraphQLMember("edges")] + [JsonPropertyName("edges")] + public List Edges { get; set; } + + /// + /// A flattened list of the nodes. + /// + [global::System.ComponentModel.Description("A flattened list of the nodes.")] + [GraphQLMember("nodes")] + [JsonPropertyName("nodes")] + public List Nodes { get; set; } + + /// + /// Identifies the total count of items in the connection. + /// + [global::System.ComponentModel.Description("Identifies the total count of items in the connection.")] + [GraphQLMember("totalCount")] + [JsonPropertyName("totalCount")] + public int TotalCount { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs new file mode 100644 index 00000000..0df7321f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/AnimalsEdge.cs @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// An edge in a connection. +/// +[global::System.ComponentModel.Description("An edge in a connection.")] +public partial class AnimalsEdge : GraphQLTypeBase +{ + /// + /// A cursor for use in pagination. + /// + [global::System.ComponentModel.Description("A cursor for use in pagination.")] + [GraphQLMember("cursor")] + [JsonPropertyName("cursor")] + public string Cursor { get; set; } + + /// + /// The item at the end of the edge. + /// + [global::System.ComponentModel.Description("The item at the end of the edge.")] + [GraphQLMember("node")] + [JsonPropertyName("node")] + public IAnimal Node { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Customer.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Customer.cs new file mode 100644 index 00000000..e8175442 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Customer.cs @@ -0,0 +1,71 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public static class CustomerExtensions +{ + [GraphQLMember("relatedCustomers")] + public static List RelatedCustomers(this Customer customer, [GraphQLArgument("relationType", "Int!")] int relationType) + { + return customer.GetMethodValue>("relatedCustomers", relationType); + } + + [GraphQLMember("relatedCustomer")] + public static Customer RelatedCustomer(this Customer customer, [GraphQLArgument("relationType", "Int!")] int relationType) + { + return customer.GetMethodValue("relatedCustomer", relationType); + } + +} + +public partial class Customer : GraphQLTypeBase +{ + [GraphQLMember("customerId")] + [JsonPropertyName("customerId")] + public Guid CustomerId { get; set; } + + [GraphQLMember("customerName")] + [JsonPropertyName("customerName")] + public string CustomerName { get; set; } + + [GraphQLMember("status")] + [JsonPropertyName("status")] + public CustomerStatus Status { get; set; } + + [GraphQLMember("orders")] + [JsonPropertyName("orders")] + public List Orders { get; set; } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public Address Address { get; set; } + + [GraphQLMember("created")] + [JsonPropertyName("created")] + public DateTimeOffset? Created { get; set; } + + private LazyProperty> _relatedCustomers = new(); + /// + /// Do not use in Query, only to retrive result + /// + public List RelatedCustomers => _relatedCustomers.Value(() => GetFirstMethodValue>("relatedCustomers")); + + private LazyProperty _relatedCustomer = new(); + /// + /// Do not use in Query, only to retrive result + /// + public Customer RelatedCustomer => _relatedCustomer.Value(() => GetFirstMethodValue("relatedCustomer")); + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Item.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Item.cs new file mode 100644 index 00000000..5cc05426 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Item.cs @@ -0,0 +1,31 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public partial class Item : GraphQLTypeBase +{ + [GraphQLMember("itemId")] + [JsonPropertyName("itemId")] + public string ItemId { get; set; } + + [GraphQLMember("itemName")] + [JsonPropertyName("itemName")] + public string ItemName { get; set; } + + [GraphQLMember("data")] + [JsonPropertyName("data")] + public List Data { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Order.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Order.cs new file mode 100644 index 00000000..c986cad3 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Order.cs @@ -0,0 +1,98 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public static class OrderExtensions +{ + [GraphQLMember("myGradeMethod")] + [Obsolete("This method should not be used anymore")] + public static string MyGradeMethod(this Order order, [GraphQLArgument("name", "String!")] string name) + { + return order.GetMethodValue("myGradeMethod", name); + } + + [GraphQLMember("orderHello")] + public static string OrderHello(this Order order, [GraphQLArgument("name", "String!")] string name, [GraphQLArgument("first", "Int!")] int first) + { + return order.GetMethodValue("orderHello", name, first); + } + + [GraphQLMember("orderAddress")] + public static Address OrderAddress(this Order order, [GraphQLArgument("addressType", "AddressType!")] AddressType addressType) + { + return order.GetMethodValue
("orderAddress", addressType); + } + +} + +public partial class Order : GraphQLTypeBase +{ + private LazyProperty _myGradeMethod = new(); + /// + /// Do not use in Query, only to retrive result + /// + [Obsolete("This method should not be used anymore")] + public string MyGradeMethod => _myGradeMethod.Value(() => GetFirstMethodValue("myGradeMethod")); + + private LazyProperty _orderHello = new(); + /// + /// Do not use in Query, only to retrive result + /// + public string OrderHello => _orderHello.Value(() => GetFirstMethodValue("orderHello")); + + private LazyProperty
_orderAddress = new(); + /// + /// Do not use in Query, only to retrive result + /// + public Address OrderAddress => _orderAddress.Value(() => GetFirstMethodValue
("orderAddress")); + + [GraphQLMember("orderId")] + [JsonPropertyName("orderId")] + public Guid OrderId { get; set; } + + [GraphQLMember("customer")] + [JsonPropertyName("customer")] + public Customer Customer { get; set; } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public Address Address { get; set; } + + [GraphQLMember("orderDate")] + [JsonPropertyName("orderDate")] + public DateTimeOffset OrderDate { get; set; } + + [GraphQLMember("orderDateTime")] + [JsonPropertyName("orderDateTime")] + public DateTimeOffset OrderDateTime { get; set; } + + [GraphQLMember("orderDay")] + [JsonPropertyName("orderDay")] + public DateOnly OrderDay { get; set; } + + [GraphQLMember("lines")] + [JsonPropertyName("lines")] + public List Lines { get; set; } + + [GraphQLMember("entryTime")] + [JsonPropertyName("entryTime")] + public TimeOnly? EntryTime { get; set; } + + [Obsolete("This propery is obsolete and should not be used!")] + [GraphQLMember("grade")] + [JsonPropertyName("grade")] + public string Grade { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs new file mode 100644 index 00000000..60f6014e --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrderLine.cs @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public partial class OrderLine : GraphQLTypeBase +{ + [GraphQLMember("lineNumber")] + [JsonPropertyName("lineNumber")] + public int LineNumber { get; set; } + + [GraphQLMember("order")] + [JsonPropertyName("order")] + public Order Order { get; set; } + + [GraphQLMember("item")] + [JsonPropertyName("item")] + public Item Item { get; set; } + + [GraphQLMember("price")] + [JsonPropertyName("price")] + public decimal Price { get; set; } + + [GraphQLMember("quantity")] + [JsonPropertyName("quantity")] + public double Quantity { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs new file mode 100644 index 00000000..760cb62d --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersConnection.cs @@ -0,0 +1,55 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// A connection to a list of items. +/// +[global::System.ComponentModel.Description("A connection to a list of items.")] +public partial class OrdersConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging +{ + /// + /// Information to aid in pagination. + /// + [global::System.ComponentModel.Description("Information to aid in pagination.")] + [GraphQLMember("pageInfo")] + [JsonPropertyName("pageInfo")] + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + + /// + /// A list of edges. + /// + [global::System.ComponentModel.Description("A list of edges.")] + [GraphQLMember("edges")] + [JsonPropertyName("edges")] + public List Edges { get; set; } + + /// + /// A flattened list of the nodes. + /// + [global::System.ComponentModel.Description("A flattened list of the nodes.")] + [GraphQLMember("nodes")] + [JsonPropertyName("nodes")] + public List Nodes { get; set; } + + /// + /// Identifies the total count of items in the connection. + /// + [global::System.ComponentModel.Description("Identifies the total count of items in the connection.")] + [GraphQLMember("totalCount")] + [JsonPropertyName("totalCount")] + public int TotalCount { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs new file mode 100644 index 00000000..7b50886b --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersEdge.cs @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// An edge in a connection. +/// +[global::System.ComponentModel.Description("An edge in a connection.")] +public partial class OrdersEdge : GraphQLTypeBase +{ + /// + /// A cursor for use in pagination. + /// + [global::System.ComponentModel.Description("A cursor for use in pagination.")] + [GraphQLMember("cursor")] + [JsonPropertyName("cursor")] + public string Cursor { get; set; } + + /// + /// The item at the end of the edge. + /// + [global::System.ComponentModel.Description("The item at the end of the edge.")] + [GraphQLMember("node")] + [JsonPropertyName("node")] + public Order Node { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs new file mode 100644 index 00000000..2137b9c6 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationConnection.cs @@ -0,0 +1,55 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// A connection to a list of items. +/// +[global::System.ComponentModel.Description("A connection to a list of items.")] +public partial class OrdersNoBackwardPaginationConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging +{ + /// + /// Information to aid in pagination. + /// + [global::System.ComponentModel.Description("Information to aid in pagination.")] + [GraphQLMember("pageInfo")] + [JsonPropertyName("pageInfo")] + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + + /// + /// A list of edges. + /// + [global::System.ComponentModel.Description("A list of edges.")] + [GraphQLMember("edges")] + [JsonPropertyName("edges")] + public List Edges { get; set; } + + /// + /// A flattened list of the nodes. + /// + [global::System.ComponentModel.Description("A flattened list of the nodes.")] + [GraphQLMember("nodes")] + [JsonPropertyName("nodes")] + public List Nodes { get; set; } + + /// + /// Identifies the total count of items in the connection. + /// + [global::System.ComponentModel.Description("Identifies the total count of items in the connection.")] + [GraphQLMember("totalCount")] + [JsonPropertyName("totalCount")] + public int TotalCount { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs new file mode 100644 index 00000000..af77c44e --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoBackwardPaginationEdge.cs @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// An edge in a connection. +/// +[global::System.ComponentModel.Description("An edge in a connection.")] +public partial class OrdersNoBackwardPaginationEdge : GraphQLTypeBase +{ + /// + /// A cursor for use in pagination. + /// + [global::System.ComponentModel.Description("A cursor for use in pagination.")] + [GraphQLMember("cursor")] + [JsonPropertyName("cursor")] + public string Cursor { get; set; } + + /// + /// The item at the end of the edge. + /// + [global::System.ComponentModel.Description("The item at the end of the edge.")] + [GraphQLMember("node")] + [JsonPropertyName("node")] + public Order Node { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs new file mode 100644 index 00000000..8b1db36a --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountConnection.cs @@ -0,0 +1,47 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// A connection to a list of items. +/// +[global::System.ComponentModel.Description("A connection to a list of items.")] +public partial class OrdersNoTotalCountConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging +{ + /// + /// Information to aid in pagination. + /// + [global::System.ComponentModel.Description("Information to aid in pagination.")] + [GraphQLMember("pageInfo")] + [JsonPropertyName("pageInfo")] + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + + /// + /// A list of edges. + /// + [global::System.ComponentModel.Description("A list of edges.")] + [GraphQLMember("edges")] + [JsonPropertyName("edges")] + public List Edges { get; set; } + + /// + /// A flattened list of the nodes. + /// + [global::System.ComponentModel.Description("A flattened list of the nodes.")] + [GraphQLMember("nodes")] + [JsonPropertyName("nodes")] + public List Nodes { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs new file mode 100644 index 00000000..0a115cfb --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersNoTotalCountEdge.cs @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// An edge in a connection. +/// +[global::System.ComponentModel.Description("An edge in a connection.")] +public partial class OrdersNoTotalCountEdge : GraphQLTypeBase +{ + /// + /// A cursor for use in pagination. + /// + [global::System.ComponentModel.Description("A cursor for use in pagination.")] + [GraphQLMember("cursor")] + [JsonPropertyName("cursor")] + public string Cursor { get; set; } + + /// + /// The item at the end of the edge. + /// + [global::System.ComponentModel.Description("The item at the end of the edge.")] + [GraphQLMember("node")] + [JsonPropertyName("node")] + public Order Node { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingConnection.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingConnection.cs new file mode 100644 index 00000000..fdacfbf1 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingConnection.cs @@ -0,0 +1,47 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// A connection to a list of items. +/// +[global::System.ComponentModel.Description("A connection to a list of items.")] +public partial class OrdersOffsetPagingConnection : GraphQLTypeBase, Linq2GraphQL.Client.Common.ICursorPaging +{ + /// + /// Information to aid in pagination. + /// + [global::System.ComponentModel.Description("Information to aid in pagination.")] + [GraphQLMember("pageInfo")] + [JsonPropertyName("pageInfo")] + public Linq2GraphQL.Client.Common.PageInfo PageInfo { get; set; } + + /// + /// A list of edges. + /// + [global::System.ComponentModel.Description("A list of edges.")] + [GraphQLMember("edges")] + [JsonPropertyName("edges")] + public List Edges { get; set; } + + /// + /// A flattened list of the nodes. + /// + [global::System.ComponentModel.Description("A flattened list of the nodes.")] + [GraphQLMember("nodes")] + [JsonPropertyName("nodes")] + public List Nodes { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingEdge.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingEdge.cs new file mode 100644 index 00000000..db12fd9f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/OrdersOffsetPagingEdge.cs @@ -0,0 +1,39 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +/// +/// An edge in a connection. +/// +[global::System.ComponentModel.Description("An edge in a connection.")] +public partial class OrdersOffsetPagingEdge : GraphQLTypeBase +{ + /// + /// A cursor for use in pagination. + /// + [global::System.ComponentModel.Description("A cursor for use in pagination.")] + [GraphQLMember("cursor")] + [JsonPropertyName("cursor")] + public string Cursor { get; set; } + + /// + /// The item at the end of the edge. + /// + [global::System.ComponentModel.Description("The item at the end of the edge.")] + [GraphQLMember("node")] + [JsonPropertyName("node")] + public Order Node { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Pig.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Pig.cs new file mode 100644 index 00000000..f3e2acf7 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Pig.cs @@ -0,0 +1,38 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public partial class Pig : GraphQLTypeBase, IAnimal +{ + [GraphQLMember("spices")] + [JsonPropertyName("spices")] + public string Spices { get; set; } + + [GraphQLMember("name")] + [JsonPropertyName("name")] + public string Name { get; set; } + + [GraphQLMember("numberOfLegs")] + [JsonPropertyName("numberOfLegs")] + public int NumberOfLegs { get; set; } + + [GraphQLMember("speed")] + [JsonPropertyName("speed")] + public int Speed { get; set; } + + [GraphQLMember("__typename")] + [JsonPropertyName("__typename")] + public string __TypeName { get; set; } +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Spider.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Spider.cs new file mode 100644 index 00000000..20d273d0 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClient/Generated/Types/Spider.cs @@ -0,0 +1,38 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClient; + + +public partial class Spider : GraphQLTypeBase, IAnimal +{ + [GraphQLMember("poisonous")] + [JsonPropertyName("poisonous")] + public bool Poisonous { get; set; } + + [GraphQLMember("name")] + [JsonPropertyName("name")] + public string Name { get; set; } + + [GraphQLMember("numberOfLegs")] + [JsonPropertyName("numberOfLegs")] + public int NumberOfLegs { get; set; } + + [GraphQLMember("speed")] + [JsonPropertyName("speed")] + public int Speed { get; set; } + + [GraphQLMember("__typename")] + [JsonPropertyName("__typename")] + public string __TypeName { get; set; } +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/ExtendedScalars/MacAddress.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/ExtendedScalars/MacAddress.cs new file mode 100644 index 00000000..1831ff18 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/ExtendedScalars/MacAddress.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Linq2GraphQL.TestClientNullable +{ + public partial class MacAddress + { + + public MacAddress() { } + + public MacAddress(string value) + { + Value = value; + } + + + + + public override object Value + { + get + { + //Custom Code + + return base.Value; + } + set + { + //Custom code + + base.Value = value; + } + } + + + + } +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/MutationMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/MutationMethods.cs new file mode 100644 index 00000000..89ac2339 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/MutationMethods.cs @@ -0,0 +1,60 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +/// +/// Implementation of MutationMethods GraphQL operations +/// +public class MutationMethods : IMutationMethods +{ + private readonly GraphClient client; + + /// + /// Initializes a new instance of the MutationMethods class + /// + /// The GraphQL client instance + public MutationMethods(GraphClient client) + { + this.client = client ?? throw new ArgumentNullException(nameof(client)); + } + + /// + /// Executes updateCustomer GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery UpdateCustomer(CustomerInput customer) + { + var arguments = new List + { + new("customer", "CustomerInput!", customer), + }; + + return new GraphQuery(client, "updateCustomer", OperationType.Mutation, arguments); + } + + /// + /// Executes updatePerson GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery UpdatePerson(PersonInput person) + { + var arguments = new List + { + new("person", "PersonInput!", person), + }; + + return new GraphQuery(client, "updatePerson", OperationType.Mutation, arguments); + } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/QueryMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/QueryMethods.cs new file mode 100644 index 00000000..bbec1f75 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/QueryMethods.cs @@ -0,0 +1,146 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +/// +/// Implementation of QueryMethods GraphQL operations +/// +public class QueryMethods : IQueryMethods +{ + private readonly GraphClient client; + + /// + /// Initializes a new instance of the QueryMethods class + /// + /// The GraphQL client instance + public QueryMethods(GraphClient client) + { + this.client = client ?? throw new ArgumentNullException(nameof(client)); + } + + /// + /// Executes item GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery Item() + { + var arguments = new List + { + }; + + return new GraphQuery(client, "item", OperationType.Query, arguments); + } + + /// + /// Executes itemDraft GraphQL operation + /// + /// + /// This operation is deprecated: This is an really old method! please d not use it!! + /// + [Obsolete("This is an really old method! please d not use it!!")] + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery ItemDraft() + { + var arguments = new List + { + }; + + return new GraphQuery(client, "itemDraft", OperationType.Query, arguments); + } + + /// + /// Executes customerList GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery> + public GraphQuery> CustomerList() + { + var arguments = new List + { + }; + + return new GraphQuery>(client, "customerList", OperationType.Query, arguments); + } + + /// + /// Executes customerNullable GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery CustomerNullable() + { + var arguments = new List + { + }; + + return new GraphQuery(client, "customerNullable", OperationType.Query, arguments); + } + + /// + /// Executes customerListAllNullable GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery?> + public GraphQuery?> CustomerListAllNullable() + { + var arguments = new List + { + }; + + return new GraphQuery?>(client, "customerListAllNullable", OperationType.Query, arguments); + } + + /// + /// Executes customerListNullable GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery?> + public GraphQuery?> CustomerListNullable() + { + var arguments = new List + { + }; + + return new GraphQuery?>(client, "customerListNullable", OperationType.Query, arguments); + } + + /// + /// Executes customerListInList GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery>> + public GraphQuery>> CustomerListInList() + { + var arguments = new List + { + }; + + return new GraphQuery>>(client, "customerListInList", OperationType.Query, arguments); + } + + /// + /// Executes person GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + public GraphQuery Person() + { + var arguments = new List + { + }; + + return new GraphQuery(client, "person", OperationType.Query, arguments); + } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClient.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClient.cs new file mode 100644 index 00000000..d463ca94 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClient.cs @@ -0,0 +1,93 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Linq2GraphQL.TestClientNullable; + +/// +/// GraphQL client for SampleNullableClient operations +/// +/// +/// Provides strongly-typed access to GraphQL queries, mutations, and subscriptions. +/// Supports dependency injection for better testability and flexibility. +/// +public class SampleNullableClient : ISampleNullableClient, IGraphClientSource, IGraphSchemaSource +{ + private readonly GraphClient client; + + /// + /// Constructor with dependency injection support + /// + /// HTTP client for GraphQL requests + /// GraphQL client configuration options + /// Service provider for dependency resolution + /// Optional query methods implementation (uses default if null) + /// Optional mutation methods implementation (uses default if null) + public SampleNullableClient( + HttpClient httpClient, + [FromKeyedServices("SampleNullableClient")] IOptions options, + IServiceProvider provider, + IQueryMethods? queryMethods = null, + IMutationMethods? mutationMethods = null) + { + client = new GraphClient(httpClient, options, provider, true); + Query = queryMethods ?? new QueryMethods(client); + Mutation = mutationMethods ?? new MutationMethods(client); + } + + private SampleNullableClient(GraphClient client) + { + this.client = client; + Query = new QueryMethods(client); + Mutation = new MutationMethods(client); + } + + /// + /// A client that shares this client's connection and settings, and also runs + /// on every request it sends. Use it for per-user or + /// per-conversation headers such as an access token. This client is not changed. + /// + /// + /// The new client uses the generated operation implementations, not ones passed to the constructor. + /// + public SampleNullableClient WithRequestConfiguration(Func configureRequest) + { + return new SampleNullableClient(client.WithRequestConfiguration(configureRequest)); + } + + /// + /// A client that sends Authorization: Bearer <token> on every request, asking + /// for the token each time. This client is not changed. + /// + public SampleNullableClient WithAccessToken(Func> getAccessToken) + { + return WithRequestConfiguration(RequestConfigurations.BearerToken(getAccessToken)); + } + + /// + /// The underlying client, for example to execute a query written as GraphQL text with + /// . + /// + public GraphClient GraphClient => client; + + /// + /// The schema this client was generated from, as SDL. + /// + public static string Sdl => SampleNullableClientSchema.Sdl; + + /// + /// Gets the query methods for this GraphQL client + /// + public IQueryMethods Query { get; private set; } + /// + /// Gets the mutation methods for this GraphQL client + /// + public IMutationMethods Mutation { get; private set; } +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClientExtensions.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClientExtensions.cs new file mode 100644 index 00000000..12a94ceb --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClientExtensions.cs @@ -0,0 +1,40 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Linq2GraphQL.TestClientNullable; + +public static class SampleNullableClientExtensions +{ + private const string ClientName = "SampleNullableClient"; + + public static IGraphClientBuilder AddSampleNullableClient(this IServiceCollection services) + { + var graphClientOptions = new GraphClientOptions(); + return GraphClientBuilder(services, graphClientOptions); + } + + public static IGraphClientBuilder AddSampleNullableClient(this IServiceCollection services, Action opts) + { + var graphClientOptions = new GraphClientOptions(); + opts(graphClientOptions); + + return GraphClientBuilder(services, graphClientOptions); + } + + private static IGraphClientBuilder GraphClientBuilder(IServiceCollection services, + GraphClientOptions graphClientOptions) + { + var opts = Options.Create(graphClientOptions); + services.AddKeyedSingleton(ClientName, opts); + services.AddMemoryCache(); + return new ClientBuilder(ClientName, services); + } +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClientSchema.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClientSchema.cs new file mode 100644 index 00000000..bb1a9d4f --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Client/SampleNullableClientSchema.cs @@ -0,0 +1,166 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +namespace Linq2GraphQL.TestClientNullable; + +/// +/// The schema SampleNullableClient was generated from, as SDL. +/// +public static partial class SampleNullableClientSchema +{ + public const string Sdl = """ + type Query { + item: Item! + itemDraft: Item! @deprecated(reason: "This is an really old method! please d not use it!!") + customerList: [Customer!]! + customerNullable: Customer + customerListAllNullable: [Customer] + customerListNullable: [Customer!] + customerListInList: [[Customer!]!]! + person: Person! + } + + type Mutation { + updateCustomer(customer: CustomerInput!): Customer! + updatePerson(person: PersonInput!): Person! + } + + type Person { + name: String! + macAddress: MacAddress + longitude: Longitude + } + + input CustomerInput { + customerId: UUID! + customerName: String! + status: CustomerStatus! + orders: [OrderInput!]! + address: AddressInput + created: DateTime + } + + type Customer { + customerId: UUID! + customerName: String! + status: CustomerStatus! + orders: [Order!]! + address: Address + created: DateTime + } + + input PersonInput { + name: String! + macAddress: MacAddress + longitude: Longitude + } + + type Item { + itemId: String! + itemName: String! + data: [UnsignedByte!] + } + + "The `MacAddress` scalar type represents an IEEE 802 48-bit or 64-bit Mac address, represented as UTF-8 character sequences. The scalar follows the specifications defined in RFC7042 and RFC7043 respectively." + scalar MacAddress + + "The Longitude scalar type is a valid decimal degrees longitude number." + scalar Longitude + + "The `DateTime` scalar type represents a date and time with time zone offset information." + scalar DateTime + + input AddressInput { + name: String! + street: String! + postalCode: String! + createdDate: LocalDate! + } + + input OrderInput { + orderId: UUID! + customer: CustomerInput! + address: AddressInput + orderDate: DateTime! + orderDateTime: DateTime! + orderDay: LocalDate! + lines: [OrderLineInput!]! + entryTime: LocalTime + grade: String @deprecated(reason: "This propery is obsolete and should not be used!") + } + + enum CustomerStatus { + ACTIVE + DISABLED + IN_TRANSIT @deprecated(reason: "No longer in use, please use enum value Active instead") + } + + "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562." + scalar UUID + + type Order { + myGradeMethod(name: String!): String @deprecated(reason: "This method should not be used anymore") + orderHello(name: String!, first: Int! = 0): String! + orderAddress(addressType: AddressType!): Address! + orderId: UUID! + customer: Customer! + address: Address + orderDate: DateTime! + orderDateTime: DateTime! + orderDay: LocalDate! + lines: [OrderLine!]! + entryTime: LocalTime + grade: String @deprecated(reason: "This propery is obsolete and should not be used!") + } + + type Address { + name: String! + street: String! + postalCode: String! + createdDate: LocalDate! + } + + "The `UnsignedByte` scalar type represents an unsigned 8-bit integer." + scalar UnsignedByte + + "The `LocalTime` scalar type represents a time of day without date or time zone information." + scalar LocalTime + + type OrderLine { + lineNumber: Int! + order: Order! + item: Item + price: Decimal! + quantity: Float! + } + + "The `LocalDate` scalar type represents a date without time or time zone information." + scalar LocalDate + + enum AddressType { + DELIVERY + INVOICE + } + + input OrderLineInput { + lineNumber: Int! + order: OrderInput! + item: ItemInput + price: Decimal! + quantity: Float! + } + + "The `Decimal` scalar type represents a decimal floating-point number with high precision." + scalar Decimal + + input ItemInput { + itemId: String! + itemName: String! + data: [UnsignedByte!] + } + """; +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Enums/AddressType.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Enums/AddressType.cs new file mode 100644 index 00000000..57015012 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Enums/AddressType.cs @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using System.ComponentModel; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(JsonStringEnumMemberConverter))] +public enum AddressType +{ + [EnumMember(Value = "DELIVERY")] + Delivery, + [EnumMember(Value = "INVOICE")] + Invoice, +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Enums/CustomerStatus.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Enums/CustomerStatus.cs new file mode 100644 index 00000000..4a32861d --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Enums/CustomerStatus.cs @@ -0,0 +1,25 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; +using System.ComponentModel; +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(JsonStringEnumMemberConverter))] +public enum CustomerStatus +{ + [EnumMember(Value = "ACTIVE")] + Active, + [EnumMember(Value = "DISABLED")] + Disabled, + [Obsolete("No longer in use, please use enum value Active instead")] + [EnumMember(Value = "IN_TRANSIT")] + InTransit, +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/AddressInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/AddressInput.cs new file mode 100644 index 00000000..21b23f07 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/AddressInput.cs @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class AddressInput : GraphInputBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public required string Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("street")] + [JsonPropertyName("street")] + public required string Street + { + get => GetValue("street"); + set => SetValue("street", value); + } + + [GraphQLMember("postalCode")] + [JsonPropertyName("postalCode")] + public required string PostalCode + { + get => GetValue("postalCode"); + set => SetValue("postalCode", value); + } + + [GraphQLMember("createdDate")] + [JsonPropertyName("createdDate")] + public required DateOnly CreatedDate + { + get => GetValue("createdDate"); + set => SetValue("createdDate", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/CustomerInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/CustomerInput.cs new file mode 100644 index 00000000..657c0712 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/CustomerInput.cs @@ -0,0 +1,66 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class CustomerInput : GraphInputBase +{ + [GraphQLMember("customerId")] + [JsonPropertyName("customerId")] + public required Guid CustomerId + { + get => GetValue("customerId"); + set => SetValue("customerId", value); + } + + [GraphQLMember("customerName")] + [JsonPropertyName("customerName")] + public required string CustomerName + { + get => GetValue("customerName"); + set => SetValue("customerName", value); + } + + [GraphQLMember("status")] + [JsonPropertyName("status")] + public required CustomerStatus Status + { + get => GetValue("status"); + set => SetValue("status", value); + } + + [GraphQLMember("orders")] + [JsonPropertyName("orders")] + public required List Orders + { + get => GetValue>("orders"); + set => SetValue("orders", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressInput? Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("created")] + [JsonPropertyName("created")] + public DateTimeOffset? Created + { + get => GetValue("created"); + set => SetValue("created", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/ItemInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/ItemInput.cs new file mode 100644 index 00000000..51d98fcf --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/ItemInput.cs @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class ItemInput : GraphInputBase +{ + [GraphQLMember("itemId")] + [JsonPropertyName("itemId")] + public required string ItemId + { + get => GetValue("itemId"); + set => SetValue("itemId", value); + } + + [GraphQLMember("itemName")] + [JsonPropertyName("itemName")] + public required string ItemName + { + get => GetValue("itemName"); + set => SetValue("itemName", value); + } + + [GraphQLMember("data")] + [JsonPropertyName("data")] + public List? Data + { + get => GetValue?>("data"); + set => SetValue("data", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/OrderInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/OrderInput.cs new file mode 100644 index 00000000..19246043 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/OrderInput.cs @@ -0,0 +1,91 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderInput : GraphInputBase +{ + [GraphQLMember("orderId")] + [JsonPropertyName("orderId")] + public required Guid OrderId + { + get => GetValue("orderId"); + set => SetValue("orderId", value); + } + + [GraphQLMember("customer")] + [JsonPropertyName("customer")] + public required CustomerInput Customer + { + get => GetValue("customer"); + set => SetValue("customer", value); + } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public AddressInput? Address + { + get => GetValue("address"); + set => SetValue("address", value); + } + + [GraphQLMember("orderDate")] + [JsonPropertyName("orderDate")] + public required DateTimeOffset OrderDate + { + get => GetValue("orderDate"); + set => SetValue("orderDate", value); + } + + [GraphQLMember("orderDateTime")] + [JsonPropertyName("orderDateTime")] + public required DateTimeOffset OrderDateTime + { + get => GetValue("orderDateTime"); + set => SetValue("orderDateTime", value); + } + + [GraphQLMember("orderDay")] + [JsonPropertyName("orderDay")] + public required DateOnly OrderDay + { + get => GetValue("orderDay"); + set => SetValue("orderDay", value); + } + + [GraphQLMember("lines")] + [JsonPropertyName("lines")] + public required List Lines + { + get => GetValue>("lines"); + set => SetValue("lines", value); + } + + [GraphQLMember("entryTime")] + [JsonPropertyName("entryTime")] + public TimeOnly? EntryTime + { + get => GetValue("entryTime"); + set => SetValue("entryTime", value); + } + + [Obsolete("This propery is obsolete and should not be used!")] + [GraphQLMember("grade")] + [JsonPropertyName("grade")] + public string? Grade + { + get => GetValue("grade"); + set => SetValue("grade", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/OrderLineInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/OrderLineInput.cs new file mode 100644 index 00000000..36f37750 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/OrderLineInput.cs @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class OrderLineInput : GraphInputBase +{ + [GraphQLMember("lineNumber")] + [JsonPropertyName("lineNumber")] + public required int LineNumber + { + get => GetValue("lineNumber"); + set => SetValue("lineNumber", value); + } + + [GraphQLMember("order")] + [JsonPropertyName("order")] + public required OrderInput Order + { + get => GetValue("order"); + set => SetValue("order", value); + } + + [GraphQLMember("item")] + [JsonPropertyName("item")] + public ItemInput? Item + { + get => GetValue("item"); + set => SetValue("item", value); + } + + [GraphQLMember("price")] + [JsonPropertyName("price")] + public required decimal Price + { + get => GetValue("price"); + set => SetValue("price", value); + } + + [GraphQLMember("quantity")] + [JsonPropertyName("quantity")] + public required double Quantity + { + get => GetValue("quantity"); + set => SetValue("quantity", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/PersonInput.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/PersonInput.cs new file mode 100644 index 00000000..30cdc141 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Inputs/PersonInput.cs @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +[JsonConverter(typeof(GraphInputConverter))] +public partial class PersonInput : GraphInputBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public required string Name + { + get => GetValue("name"); + set => SetValue("name", value); + } + + [GraphQLMember("macAddress")] + [JsonPropertyName("macAddress")] + public MacAddress? MacAddress + { + get => GetValue("macAddress"); + set => SetValue("macAddress", value); + } + + [GraphQLMember("longitude")] + [JsonPropertyName("longitude")] + public Longitude? Longitude + { + get => GetValue("longitude"); + set => SetValue("longitude", value); + } + +} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/IMutationMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/IMutationMethods.cs new file mode 100644 index 00000000..3d7fc280 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/IMutationMethods.cs @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +/// +/// Interface for MutationMethods GraphQL operations +/// +public interface IMutationMethods +{ + /// + /// Executes updateCustomer GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery UpdateCustomer(CustomerInput customer); + + /// + /// Executes updatePerson GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery UpdatePerson(PersonInput person); + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/IQueryMethods.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/IQueryMethods.cs new file mode 100644 index 00000000..06732c2d --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/IQueryMethods.cs @@ -0,0 +1,79 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +/// +/// Interface for QueryMethods GraphQL operations +/// +public interface IQueryMethods +{ + /// + /// Executes item GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery Item(); + + /// + /// Executes itemDraft GraphQL operation + /// + /// + /// This operation is deprecated: This is an really old method! please d not use it!! + /// + [Obsolete("This is an really old method! please d not use it!!")] + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery ItemDraft(); + + /// + /// Executes customerList GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery> + GraphQuery> CustomerList(); + + /// + /// Executes customerNullable GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery CustomerNullable(); + + /// + /// Executes customerListAllNullable GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery?> + GraphQuery?> CustomerListAllNullable(); + + /// + /// Executes customerListNullable GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery?> + GraphQuery?> CustomerListNullable(); + + /// + /// Executes customerListInList GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery>> + GraphQuery>> CustomerListInList(); + + /// + /// Executes person GraphQL operation + /// + /// The operation parameters + /// GraphQL query result of type GraphQuery + GraphQuery Person(); + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/ISampleNullableClient.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/ISampleNullableClient.cs new file mode 100644 index 00000000..3ecd5e33 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Interfaces/ISampleNullableClient.cs @@ -0,0 +1,16 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using Linq2GraphQL.Client; + +namespace Linq2GraphQL.TestClientNullable; + +public interface ISampleNullableClient +{ + IQueryMethods Query { get; } + IMutationMethods Mutation { get; } +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Scalars/Longitude.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Scalars/Longitude.cs new file mode 100644 index 00000000..cc4211af --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Scalars/Longitude.cs @@ -0,0 +1,18 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + + +using Linq2GraphQL.Client; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClientNullable; + + /// + /// The Longitude scalar type is a valid decimal degrees longitude number. + /// + [JsonConverter(typeof(CustomScalarConverter))] + public partial class Longitude : CustomScalar {} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Scalars/MacAddress.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Scalars/MacAddress.cs new file mode 100644 index 00000000..4588b9f2 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Scalars/MacAddress.cs @@ -0,0 +1,18 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + + +using Linq2GraphQL.Client; +using System.Text.Json.Serialization; + +namespace Linq2GraphQL.TestClientNullable; + + /// + /// The `MacAddress` scalar type represents an IEEE 802 48-bit or 64-bit Mac address, represented as UTF-8 character sequences. The scalar follows the specifications defined in RFC7042 and RFC7043 respectively. + /// + [JsonConverter(typeof(CustomScalarConverter))] + public partial class MacAddress : CustomScalar {} \ No newline at end of file diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Address.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Address.cs new file mode 100644 index 00000000..07ba9d92 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Address.cs @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClientNullable; + +#pragma warning disable CS8618 + +public partial class Address : GraphQLTypeBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public string Name { get; set; } + + [GraphQLMember("street")] + [JsonPropertyName("street")] + public string Street { get; set; } + + [GraphQLMember("postalCode")] + [JsonPropertyName("postalCode")] + public string PostalCode { get; set; } + + [GraphQLMember("createdDate")] + [JsonPropertyName("createdDate")] + public DateOnly CreatedDate { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Customer.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Customer.cs new file mode 100644 index 00000000..c711cf8c --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Customer.cs @@ -0,0 +1,44 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClientNullable; + +#pragma warning disable CS8618 + +public partial class Customer : GraphQLTypeBase +{ + [GraphQLMember("customerId")] + [JsonPropertyName("customerId")] + public Guid CustomerId { get; set; } + + [GraphQLMember("customerName")] + [JsonPropertyName("customerName")] + public string CustomerName { get; set; } + + [GraphQLMember("status")] + [JsonPropertyName("status")] + public CustomerStatus Status { get; set; } + + [GraphQLMember("orders")] + [JsonPropertyName("orders")] + public List Orders { get; set; } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public Address? Address { get; set; } + + [GraphQLMember("created")] + [JsonPropertyName("created")] + public DateTimeOffset? Created { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Item.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Item.cs new file mode 100644 index 00000000..f1b1dfcc --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Item.cs @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClientNullable; + +#pragma warning disable CS8618 + +public partial class Item : GraphQLTypeBase +{ + [GraphQLMember("itemId")] + [JsonPropertyName("itemId")] + public string ItemId { get; set; } + + [GraphQLMember("itemName")] + [JsonPropertyName("itemName")] + public string ItemName { get; set; } + + [GraphQLMember("data")] + [JsonPropertyName("data")] + public List? Data { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Order.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Order.cs new file mode 100644 index 00000000..ae03c884 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Order.cs @@ -0,0 +1,99 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClientNullable; + +#pragma warning disable CS8618 + +public static class OrderExtensions +{ + [GraphQLMember("myGradeMethod")] + [Obsolete("This method should not be used anymore")] + public static string? MyGradeMethod(this Order order, [GraphQLArgument("name", "String!")] string name) + { + return order.GetMethodValue("myGradeMethod", name); + } + + [GraphQLMember("orderHello")] + public static string OrderHello(this Order order, [GraphQLArgument("name", "String!")] string name, [GraphQLArgument("first", "Int!")] int first) + { + return order.GetMethodValue("orderHello", name, first); + } + + [GraphQLMember("orderAddress")] + public static Address OrderAddress(this Order order, [GraphQLArgument("addressType", "AddressType!")] AddressType addressType) + { + return order.GetMethodValue
("orderAddress", addressType); + } + +} + +public partial class Order : GraphQLTypeBase +{ + private LazyProperty _myGradeMethod = new(); + /// + /// Do not use in Query, only to retrive result + /// + [Obsolete("This method should not be used anymore")] + public string? MyGradeMethod => _myGradeMethod.Value(() => GetFirstMethodValue("myGradeMethod")); + + private LazyProperty _orderHello = new(); + /// + /// Do not use in Query, only to retrive result + /// + public string OrderHello => _orderHello.Value(() => GetFirstMethodValue("orderHello")); + + private LazyProperty
_orderAddress = new(); + /// + /// Do not use in Query, only to retrive result + /// + public Address OrderAddress => _orderAddress.Value(() => GetFirstMethodValue
("orderAddress")); + + [GraphQLMember("orderId")] + [JsonPropertyName("orderId")] + public Guid OrderId { get; set; } + + [GraphQLMember("customer")] + [JsonPropertyName("customer")] + public Customer Customer { get; set; } + + [GraphQLMember("address")] + [JsonPropertyName("address")] + public Address? Address { get; set; } + + [GraphQLMember("orderDate")] + [JsonPropertyName("orderDate")] + public DateTimeOffset OrderDate { get; set; } + + [GraphQLMember("orderDateTime")] + [JsonPropertyName("orderDateTime")] + public DateTimeOffset OrderDateTime { get; set; } + + [GraphQLMember("orderDay")] + [JsonPropertyName("orderDay")] + public DateOnly OrderDay { get; set; } + + [GraphQLMember("lines")] + [JsonPropertyName("lines")] + public List Lines { get; set; } + + [GraphQLMember("entryTime")] + [JsonPropertyName("entryTime")] + public TimeOnly? EntryTime { get; set; } + + [Obsolete("This propery is obsolete and should not be used!")] + [GraphQLMember("grade")] + [JsonPropertyName("grade")] + public string? Grade { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/OrderLine.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/OrderLine.cs new file mode 100644 index 00000000..a3abe7bb --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/OrderLine.cs @@ -0,0 +1,40 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClientNullable; + +#pragma warning disable CS8618 + +public partial class OrderLine : GraphQLTypeBase +{ + [GraphQLMember("lineNumber")] + [JsonPropertyName("lineNumber")] + public int LineNumber { get; set; } + + [GraphQLMember("order")] + [JsonPropertyName("order")] + public Order Order { get; set; } + + [GraphQLMember("item")] + [JsonPropertyName("item")] + public Item? Item { get; set; } + + [GraphQLMember("price")] + [JsonPropertyName("price")] + public decimal Price { get; set; } + + [GraphQLMember("quantity")] + [JsonPropertyName("quantity")] + public double Quantity { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Person.cs b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Person.cs new file mode 100644 index 00000000..8aa56407 --- /dev/null +++ b/test/Linq2GraphQL.Compat/FrozenClients/Linq2GraphQL.TestClientNullable/Generated/Types/Person.cs @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------- +// This code was automatically generated by Linq2GraphQL +// Please don't edit this file +// Github:https://github.com/linq2graphql/linq2graphql.client +// Url: https://linq2graphql.com +//--------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Linq2GraphQL.Client.Common; + +namespace Linq2GraphQL.TestClientNullable; + +#pragma warning disable CS8618 + +public partial class Person : GraphQLTypeBase +{ + [GraphQLMember("name")] + [JsonPropertyName("name")] + public string Name { get; set; } + + [GraphQLMember("macAddress")] + [JsonPropertyName("macAddress")] + public MacAddress? MacAddress { get; set; } + + [GraphQLMember("longitude")] + [JsonPropertyName("longitude")] + public Longitude? Longitude { get; set; } + +} diff --git a/test/Linq2GraphQL.Compat/Scenarios/CompatContext.cs b/test/Linq2GraphQL.Compat/Scenarios/CompatContext.cs new file mode 100644 index 00000000..ec9d3691 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Scenarios/CompatContext.cs @@ -0,0 +1,165 @@ +using System.Net; +using System.Text; +using System.Text.Json.Nodes; +using System.Text.RegularExpressions; +using Linq2GraphQL.Client; +using Linq2GraphQL.TestClient; +using Linq2GraphQL.TestClientNullable; +using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; + +namespace Linq2GraphQL.Compat; + +/// +/// What one scenario gets: clients over the in-memory test servers or over a canned response, each recording the +/// requests it sends. Every client has its own schema cache, so safe mode runs its introspection query each time. +/// +internal sealed partial class CompatContext( + WebApplicationFactory server, + WebApplicationFactory nullableServer) +{ + private static readonly Uri ServerAddress = new("https://localhost:7184/graphql/"); + private static readonly Uri NullableServerAddress = new("https://localhost:50741/graphql/"); + private static readonly Uri StubAddress = new("https://stub.local/graphql/"); + + private readonly List requests = []; + + public JsonArray Requests + { + get + { + lock (requests) + { + return new JsonArray(requests.Select(request => (JsonNode)request.DeepClone()).ToArray()); + } + } + } + + public SampleClient Client(GraphClientOptions options = null) + { + return new SampleClient(NewHttpClient(server.Server.CreateHandler(), ServerAddress), + Options.Create(options ?? new GraphClientOptions()), NewServices()); + } + + public SampleClient SafeModeClient() + { + return Client(new GraphClientOptions + { + UseSafeMode = true, SubscriptionProtocol = SubscriptionProtocol.ServerSentEvents + }); + } + + public SampleNullableClient NullableClient() + { + return new SampleNullableClient(NewHttpClient(nullableServer.Server.CreateHandler(), NullableServerAddress), + Options.Create(new GraphClientOptions()), NewServices()); + } + + /// A client registered with AddSampleClient, the way an app wires it up. + public SampleClient RegisteredClient() + { + var services = new ServiceCollection(); + services.AddSampleClient(options => options.UseSafeMode = true) + .WithHttpClient(client => client.BaseAddress = ServerAddress, + builder => builder.ConfigurePrimaryHttpMessageHandler(() => + new RecordingHandler(this) { InnerHandler = server.Server.CreateHandler() })); + return services.BuildServiceProvider().GetRequiredService(); + } + + /// A client whose every request gets this response. + public SampleClient StubClient(HttpStatusCode status, string body, string mediaType = "application/json") + { + return new SampleClient(NewHttpClient(new StubHandler(status, body, mediaType), StubAddress), + Options.Create(new GraphClientOptions()), NewServices()); + } + + /// + /// Sends a mutation past the recorder. Subscriptions use it to raise events without the retries, whose number + /// depends on timing, ending up in the record. + /// + public async Task SendUnrecordedAsync(string query) + { + using var client = server.CreateClient(new WebApplicationFactoryClientOptions { BaseAddress = ServerAddress }); + var body = new JsonObject { ["query"] = query }.ToJsonString(); + using var response = await client.PostAsync("", new StringContent(body, Encoding.UTF8, "application/json")); + response.EnsureSuccessStatusCode(); + } + + private HttpClient NewHttpClient(HttpMessageHandler handler, Uri baseAddress) + { + return new HttpClient(new RecordingHandler(this) { InnerHandler = handler }) { BaseAddress = baseAddress }; + } + + private static IServiceProvider NewServices() + { + return new ServiceCollection().AddMemoryCache().BuildServiceProvider(); + } + + private sealed partial class RecordingHandler(CompatContext context) : DelegatingHandler + { + protected override async Task SendAsync(HttpRequestMessage request, + CancellationToken cancellationToken) + { + string body = null; + if (request.Content != null) + { + // Without the token: the transport below, not the recorder, must be what reacts to cancellation. + await request.Content.LoadIntoBufferAsync(); + body = WithUnixLineBreaks(await request.Content.ReadAsStringAsync()); + } + + var headers = new JsonObject(); + var allHeaders = request.Headers.Concat(request.Content?.Headers ?? + Enumerable.Empty>>()); + foreach (var header in allHeaders.OrderBy(header => header.Key, StringComparer.OrdinalIgnoreCase)) + { + headers[header.Key] = WithoutLibraryVersion(string.Join(", ", header.Value)); + } + + var record = new JsonObject + { + ["method"] = request.Method.Method, + ["uri"] = request.RequestUri?.ToString(), + ["headers"] = headers, + ["body"] = body + }; + + lock (context.requests) + { + context.requests.Add(record); + } + + return await base.SendAsync(request, cancellationToken); + } + + /// + /// A package built on Windows sends CRLF wherever its query text spans source lines, one built elsewhere LF; + /// GraphQL reads both alike. + /// + private static string WithUnixLineBreaks(string body) + { + return body.Replace(@"\r\n", @"\n"); + } + + private static string WithoutLibraryVersion(string value) + { + return LibraryVersion().Replace(value, "Linq2GraphQL/{version}"); + } + + [GeneratedRegex(@"Linq2GraphQL/[^\s,]+")] + private static partial Regex LibraryVersion(); + } + + private sealed class StubHandler(HttpStatusCode status, string body, string mediaType) : HttpMessageHandler + { + protected override Task SendAsync(HttpRequestMessage request, + CancellationToken cancellationToken) + { + return Task.FromResult(new HttpResponseMessage(status) + { + Content = new StringContent(body, Encoding.UTF8, mediaType), RequestMessage = request + }); + } + } +} diff --git a/test/Linq2GraphQL.Compat/Scenarios/CompatRunner.cs b/test/Linq2GraphQL.Compat/Scenarios/CompatRunner.cs new file mode 100644 index 00000000..26b29984 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Scenarios/CompatRunner.cs @@ -0,0 +1,141 @@ +using System.Text.Encodings.Web; +using System.Text.Json; +using System.Text.Json.Nodes; +using System.Text.Json.Serialization; +using Linq2GraphQL.Client; +using Microsoft.AspNetCore.Mvc.Testing; + +namespace Linq2GraphQL.Compat; + +/// +/// Runs every scenario and records, as JSON text, the requests it sent and what it returned or threw. Two runs with +/// the same behavior give the same text. +/// +internal static class CompatRunner +{ + private static readonly TimeSpan ScenarioTimeout = TimeSpan.FromSeconds(30); + + private static readonly JsonSerializerOptions RecordOptions = new() + { + WriteIndented = true, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, + Converters = { new UndefinedJsonElementConverter() } + }; + + public static async Task> RunAllAsync() + { + await using var server = new WebApplicationFactory(); + await using var nullableServer = new WebApplicationFactory(); + + var records = new SortedDictionary(StringComparer.Ordinal); + foreach (var scenario in CompatScenarios.All) + { + records.Add(scenario.Name, await RunAsync(scenario, new CompatContext(server, nullableServer))); + } + + return records; + } + + /// The value returns, or a description of what it threw. + public static async Task AttemptAsync(Func> action) + { + try + { + return await action(); + } + catch (Exception exception) + { + return new JsonObject { ["threw"] = Describe(exception) }; + } + } + + private static async Task RunAsync(CompatScenario scenario, CompatContext context) + { + var record = new JsonObject(); + try + { + record["result"] = Describe(await scenario.Run(context).WaitAsync(ScenarioTimeout)); + } + catch (Exception exception) + { + record["threw"] = Describe(exception); + } + + record["requests"] = context.Requests; + return record.ToJsonString(RecordOptions); + } + + private static JsonNode Describe(object value) + { + try + { + return value switch + { + null => null, + JsonNode node => node.DeepClone(), + _ => JsonSerializer.SerializeToNode(value, value.GetType(), RecordOptions) + }; + } + catch (Exception exception) + { + return new JsonObject { ["serializationFailed"] = Describe(exception) }; + } + } + + private static JsonObject Describe(Exception exception) + { + var record = new JsonObject + { + ["type"] = exception.GetType().FullName, + ["message"] = exception.Message + }; + + switch (exception) + { + case GraphQueryExecutionException execution: + record["errors"] = Describe(execution.Errors); + record["query"] = execution.GraphQLQuery; + record["variables"] = Describe(execution.GraphQLVariables); + break; + case GraphQueryRequestException request: + record["query"] = request.GraphQLQuery; + record["variables"] = Describe(request.GraphQLVariables); + break; + case GraphQueryTranslationException translation: + record["memberName"] = translation.MemberName; + break; + } + + if (exception is AggregateException aggregate) + { + record["inner"] = new JsonArray(aggregate.InnerExceptions.Select(inner => (JsonNode)Describe(inner)) + .ToArray()); + } + else if (exception.InnerException != null) + { + record["inner"] = Describe(exception.InnerException); + } + + return record; + } + + /// GraphClient.ExecuteAsync returns an undefined JsonElement when there is no data. + private sealed class UndefinedJsonElementConverter : JsonConverter + { + public override JsonElement Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + throw new NotSupportedException(); + } + + public override void Write(Utf8JsonWriter writer, JsonElement value, JsonSerializerOptions options) + { + if (value.ValueKind == JsonValueKind.Undefined) + { + writer.WriteStringValue("(undefined)"); + return; + } + + value.WriteTo(writer); + } + } +} diff --git a/test/Linq2GraphQL.Compat/Scenarios/CompatScenarios.cs b/test/Linq2GraphQL.Compat/Scenarios/CompatScenarios.cs new file mode 100644 index 00000000..cdb9fab3 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Scenarios/CompatScenarios.cs @@ -0,0 +1,338 @@ +using System.Net; +using System.Net.Http.Headers; +using Linq2GraphQL.Client; +using Linq2GraphQL.TestClient; +using Nullable = Linq2GraphQL.TestClientNullable; + +namespace Linq2GraphQL.Compat; + +internal sealed record CompatScenario(string Name, Func> Run); + +/// +/// What an app does with a generated client. The code compiles against both the baseline packages and this code, so +/// it can only use API both have; a scenario that needs newer API belongs in Linq2GraphQL.Tests. +/// +internal static class CompatScenarios +{ + private static readonly Guid CustomerId = Guid.Parse("0190a4c2-7b3e-7c1a-9d2f-3e4b5a6c7d8e"); + + public static IReadOnlyList All { get; } = + [ + Query("Hello_Default", c => c.Client().Query.Hello().Select()), + Query("Hello_WithArgument", c => c.Client().Query.Hello("Magnus").Select()), + Query("Hello_SafeMode", c => c.SafeModeClient().Query.Hello("Magnus").Select()), + + Query("Customers_Default", c => c.SafeModeClient().Query.Customers().Select()), + Query("Customers_SafeModeOff", c => c.Client().Query.Customers().Select()), + Query("Customers_IncludeOrdersAndLines", c => c.SafeModeClient().Query.Customers() + .Include(e => e.Select(customer => customer.Orders.Select(order => order.Lines.Select(line => line.Item)))) + .Select()), + Query("Customers_Projection", c => c.SafeModeClient().Query.Customers() + .Select(e => e.Select(customer => new { customer.CustomerId, customer.CustomerName, customer.Status }))), + Query("Customers_SelectMany", c => c.SafeModeClient().Query.Customers() + .Select(e => e.SelectMany(customer => customer.Orders, + (customer, order) => new { customer.CustomerName, order.OrderId }))), + Query("Customers_ExtensionFieldWithArgument", c => c.SafeModeClient().Query.Customers() + .Select(e => e.Select(customer => new + { + customer.CustomerName, + Related = customer.RelatedCustomers(1).Select(related => related.CustomerName), + First = customer.RelatedCustomer(2).CustomerName + }))), + Query("Customer_ReturnsNull", c => c.SafeModeClient().Query.CustomerReturnNull().Select()), + + Query("Orders_TopLevelArgument", c => c.SafeModeClient().Query.Orders(1).Select(e => e.Nodes)), + Query("Orders_ArgumentOnNestedField", c => c.SafeModeClient().Query.Orders(2) + .Select(e => e.Nodes.Select(order => new + { + order.OrderId, Invoice = order.OrderAddress(AddressType.Invoice) + }))), + Query("Orders_SameFieldWithDifferentArguments", c => c.SafeModeClient().Query.Orders() + .Select(e => e.Nodes.Select(order => new + { + Jocke = order.OrderHello("Jocke", 22), Kalle = order.OrderHello("Kalle", 11) + }))), + Query("Orders_SameArgumentNameAtTwoLevels", c => c.SafeModeClient().Query.Orders(1) + .Include(e => e.Nodes.Select(order => order.OrderHello("Jocke", 2))) + .Include(e => e.Nodes.Select(order => order.OrderAddress(AddressType.Delivery))) + .Select(e => e.Nodes)), + Query("Orders_IncludeMultipleLevels", c => c.SafeModeClient().Query.Orders(1) + .Include(e => e.Nodes.Select(order => order.Customer)) + .Include(e => e.Nodes.Select(order => order.Customer.Orders)) + .Select(e => e.Nodes)), + Query("Orders_IncludeMultipleLevels_SafeModeOff", c => c.Client().Query.Orders(1) + .Include(e => e.Nodes.Select(order => order.Customer)) + .Select(e => e.Nodes)), + Query("Orders_LinqOperators", c => c.SafeModeClient().Query.Orders() + .Select(e => e.Nodes + .Where(order => order.OrderId != Guid.Empty) + .Select(order => new { order.OrderId, order.Customer.CustomerName, Lines = order.Lines.Count() }))), + Query("Orders_FilterAndSort", c => c.SafeModeClient().Query.Orders(first: 2, + where: new OrderFilterInput + { + Customer = new CustomerFilterInput + { + CustomerName = new StringOperationFilterInput { StartsWith = "Jocke" } + } + }, + order: [new OrderSortInput { OrderDate = SortEnumType.Desc }]) + .Include(e => e.TotalCount) + .Select(e => new { e.TotalCount, Orders = e.Nodes.Select(order => new { order.OrderId, order.OrderDate }) })), + Query("Orders_NoTotalCount", c => c.SafeModeClient().Query.OrdersNoTotalCount(3).Select(e => e.Nodes)), + Query("Animals_InterfaceSubtypes", c => c.SafeModeClient().Query.Animals() + .Include(e => e.Nodes.Select(animal => animal.Pig())) + .Include(e => e.Nodes.Select(animal => animal.Spider())) + .Select(e => e.Nodes.Select(animal => new + { + animal.__TypeName, animal.Name, Pig = animal.Pig(), Spider = animal.Spider() + }))), + + Query("Mutation_ScalarArgument", c => c.SafeModeClient().Mutation.SetName("Magnus").Select()), + Query("Mutation_InputObject", c => c.SafeModeClient().Mutation.AddCustomer(new CustomerInput + { + CustomerId = CustomerId, CustomerName = "New Customer", Orders = [], Status = CustomerStatus.Active + }) + .Select(e => new { e.CustomerId, e.CustomerName, e.Status })), + + Query("Errors_ResolverError", c => c.SafeModeClient().Query.RaiseError("boom").Select()), + Query("Errors_Authentication", c => c.Client().Query.RaiseAuthError().Select()), + new("Errors_UnsupportedExpression", c => Task.FromResult(c.Client().Query.Orders() + .Select(e => e.Nodes.Concat(e.Nodes)))), + new("Errors_CancelledBeforeSending", async c => + await c.Client().Query.Hello().Select().ExecuteAsync(new CancellationToken(true))), + + Raw("Raw_Query", c => c.Client().GraphClient.ExecuteAsync("query { hello(name: \"Jocke\") }")), + Raw("Raw_Variables", c => c.Client().GraphClient.ExecuteAsync("query($name: String) { hello(name: $name) }", + new Dictionary { ["name"] = "Magnus" })), + Raw("Raw_InvalidDocument", c => c.Client().GraphClient.ExecuteAsync("query { doesNotExist }")), + Raw("Raw_ResolverError", c => c.Client().GraphClient.ExecuteAsync("query { raiseError(message: \"boom\") }")), + Raw("Raw_Mutation", c => c.Client().GraphClient.ExecuteAsync("mutation { setName(name: \"Raw\") }")), + + new("Request_Text", async c => + { + var query = c.SafeModeClient().Query.Orders(1) + .Include(e => e.Nodes.Select(order => order.OrderAddress(AddressType.Invoice))) + .Select(e => e.Nodes); + var request = await query.GetRequestAsync(); + return new { request.Query, request.Variables, Json = await query.GetRequestAsJsonAsync() }; + }), + new("Request_ExecutedTwice", async c => + { + var query = c.SafeModeClient().Query.Hello("Twice").Select(); + return new { First = await query.ExecuteAsync(), Second = await query.ExecuteAsync() }; + }), + + new("Paging_Pager", async c => + { + var pager = c.SafeModeClient().Query.Orders(first: 1) + .Include(e => e.TotalCount) + .Select(e => e.Nodes.Select(order => new { order.OrderId })) + .AsPager(); + var first = await pager.NextPageAsync(); + var totalCount = pager.PagerResult.TotalCount; + var second = await pager.NextPageAsync(); + var back = await pager.PreviousPageAsync(); + return new { first, totalCount, second, back, pager.PagerResult.PageInfo }; + }), + new("Paging_AllPages", async c => + { + var pager = c.SafeModeClient().Query.Orders(first: 1) + .Select(e => e.Nodes.Select(order => order.OrderId)) + .AsPager(); + var pages = new List(); + await foreach (var page in pager.GetAllPagesWithResultAsync(maxPages: 3)) + { + pages.Add(new { page.Data, page.Errors, page.HasErrors }); + } + + return pages; + }), + new("Paging_Manual", async c => + { + var query = c.SafeModeClient().Query.OrdersNoBackwardPagination(2) + .Include(e => e.PageInfo) + .Include(e => e.TotalCount) + .Select(e => e.Nodes.Select(order => new { order.OrderId, order.OrderDate })); + await query.ExecuteBaseAsync(); + var first = query.ConvertResult(query.BaseResult); + query.QueryNode.SetArgumentValue("after", query.BaseResult.PageInfo.EndCursor); + var second = await query.ExecuteAsync(); + return new { first, second, query.BaseResult.TotalCount, query.BaseResult.PageInfo }; + }), + + new("Hooks_OptionsAndDerivedClients", async c => + { + var client = c.Client(new GraphClientOptions + { + ConfigureRequest = (request, _) => + { + request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "app-token"); + request.Headers.Add("X-Order", "options"); + return ValueTask.CompletedTask; + } + }); + var derived = client + .WithRequestConfiguration((request, _) => + { + request.Headers.Add("X-Order", "derived"); + return ValueTask.CompletedTask; + }) + .WithAccessToken(_ => ValueTask.FromResult("user-token")); + return new + { + Original = await client.Query.Hello("original").Select().ExecuteAsync(), + Derived = await derived.Query.Hello("derived").Select().ExecuteAsync(), + Raw = (await derived.GraphClient.ExecuteAsync("query { hello }")).Data + }; + }), + new("Hooks_SafeModeSchemaRequest", async c => + { + var client = c.SafeModeClient().WithAccessToken(_ => ValueTask.FromResult("user-token")); + return await client.Query.Hello().Select().ExecuteAsync(); + }), + new("DependencyInjection_RegisteredClient", async c => + await c.RegisteredClient().Query.Orders(1).Select(e => e.Nodes.Select(order => order.OrderId)) + .ExecuteAsync()), + + new("Subscription_Events", async c => + { + var client = c.SafeModeClient(); + var observable = await client.Subscription.CustomerAdded() + .Select(customer => new { customer.CustomerId, customer.CustomerName, customer.Status }) + .StartAsync(); + var received = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + using var subscription = observable.Subscribe(customer => received.TrySetResult(customer), + exception => received.TrySetException(exception)); + return await RaiseUntilReceivedAsync(c, received.Task, "Subscribed"); + }), + new("Subscription_EventsWithErrors", async c => + { + var client = c.SafeModeClient(); + var observable = await client.Subscription.CustomerNameAdded("Topic Customer").Select().StartWithErrorsAsync(); + var received = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + using var subscription = observable.Subscribe( + result => received.TrySetResult(new { result.Data, result.Errors, result.HasErrors }), + exception => received.TrySetException(exception)); + return await RaiseUntilReceivedAsync(c, received.Task, "Topic Customer"); + }), + + Stub("Response_ServerErrorPlainText", HttpStatusCode.InternalServerError, "Something broke", "text/plain"), + Stub("Response_UnauthorizedWithErrors", HttpStatusCode.Unauthorized, + """{"errors":[{"message":"Not authenticated","extensions":{"code":"UNAUTHENTICATED"}}]}"""), + Stub("Response_BadRequestWithErrors", HttpStatusCode.BadRequest, + """{"errors":[{"message":"Unknown field","locations":[{"line":1,"column":9}]}]}"""), + Stub("Response_EmptyBody", HttpStatusCode.OK, ""), + Stub("Response_NotJson", HttpStatusCode.OK, "Login", "text/html"), + Stub("Response_NoDataNoErrors", HttpStatusCode.OK, """{"extensions":{"traceId":"abc"}}"""), + Stub("Response_DataNullWithFieldError", HttpStatusCode.OK, + """{"data":null,"errors":[{"message":"Field failed","path":["hello"],"extensions":{"code":"BAD_USER_INPUT"}}]}"""), + Stub("Response_PartialData", HttpStatusCode.OK, + """{"data":{"hello":null},"errors":[{"message":"Field failed","path":["hello"]}]}"""), + Stub("Response_WithExtensions", HttpStatusCode.OK, + """{"data":{"hello":"Hi"},"extensions":{"cost":{"requestedQueryCost":1},"tags":["a","b"]}}"""), + Stub("Response_SiblingRootFields", HttpStatusCode.OK, + """{"extensions":{"first":true},"data":{"other":{"deep":[1,2,{"x":null}]},"hello":"Hi","last":0}}"""), + Stub("Response_ErrorsBeforeData", HttpStatusCode.OK, + """{"errors":[{"message":"Warning","path":["other"]}],"data":{"hello":"Hi"}}"""), + Stub("Response_EscapedStrings", HttpStatusCode.OK, + """{"data":{"hello":"Line\nbreak \"quoted\" åäö 😀"}}"""), + Stub("Response_TruncatedJson", HttpStatusCode.OK, """{"data":{"hello":"Hi"""), + + Query("Nullable_CustomerList", c => c.NullableClient().Query.CustomerList().Select()), + Query("Nullable_ItemWithBytes", c => c.NullableClient().Query.Item().Include(e => e.Data).Select()), + Query("Nullable_ObsoleteField", c => c.NullableClient().Query.ItemDraft().Select()), + Query("Nullable_NullObject", c => c.NullableClient().Query.CustomerNullable().Select()), + Query("Nullable_NullList", c => c.NullableClient().Query.CustomerListAllNullable().Select()), + Query("Nullable_NullListOfNonNull", c => c.NullableClient().Query.CustomerListNullable().Select()), + Query("Nullable_ListInList", c => c.NullableClient().Query.CustomerListInList().Select()), + Query("Nullable_CustomScalars", c => c.NullableClient().Query.Person().Select()), + Query("Nullable_CustomScalarInput", c => c.NullableClient().Mutation.UpdatePerson(new Nullable.PersonInput + { + Name = "Peter", + MacAddress = new Nullable.MacAddress("01-23-45-67-89-ab"), + Longitude = new Nullable.Longitude { Value = "14° 24' 0\" E" } + }).Select()), + Query("Nullable_InputObject", c => c.NullableClient().Mutation.UpdateCustomer(new Nullable.CustomerInput + { + CustomerId = CustomerId, + CustomerName = "Updated", + Status = Nullable.CustomerStatus.Disabled, + Orders = [], + Address = new Nullable.AddressInput + { + Name = "Home", Street = "Street 1", PostalCode = "12345", CreatedDate = new DateOnly(2024, 2, 29) + }, + Created = new DateTimeOffset(2024, 2, 29, 23, 59, 58, TimeSpan.FromHours(2)) + }).Select(e => new { e.CustomerId, e.CustomerName, e.Status, e.Address, e.Created })), + ]; + + /// Runs the query with ExecuteWithResultAsync and then ExecuteAsync, which can throw. + private static CompatScenario Query(string name, + Func> createQuery) + { + return new CompatScenario(name, async context => + { + var query = createQuery(context); + var withResult = await query.ExecuteWithResultAsync(); + return new + { + WithResult = new { withResult.Data, withResult.Errors, withResult.Extensions, withResult.HasErrors }, + Execute = await CompatRunner.AttemptAsync(async () => await query.ExecuteAsync()) + }; + }); + } + + private static CompatScenario Raw(string name, Func>> execute) + { + return new CompatScenario(name, async context => + { + var result = await execute(context); + return new { result.Data, result.Errors, result.Extensions, result.HasErrors, result.HasData }; + }); + } + + private static CompatScenario Stub(string name, HttpStatusCode status, string body, + string mediaType = "application/json") + { + return new CompatScenario(name, async context => + { + var query = context.StubClient(status, body, mediaType).Query.Hello().Select(); + return new + { + WithResult = await CompatRunner.AttemptAsync(async () => + { + var result = await query.ExecuteWithResultAsync(); + return new { result.Data, result.Errors, result.Extensions, result.HasErrors }; + }), + Execute = await CompatRunner.AttemptAsync(async () => await query.ExecuteAsync()), + Raw = await CompatRunner.AttemptAsync(async () => + { + var result = await context.StubClient(status, body, mediaType).GraphClient + .ExecuteAsync("query { hello }"); + return new { result.Data, result.Errors, result.Extensions, result.HasErrors }; + }) + }; + }); + } + + /// + /// Raises the event until the subscription delivers it: a subscription has no public signal for when the server + /// has registered it, and an event raised before that is lost. + /// + private static async Task RaiseUntilReceivedAsync(CompatContext context, Task received, + string customerName) + { + var mutation = $$""" + mutation { addCustomer(customer: { customerId: "{{CustomerId}}", customerName: "{{customerName}}", status: ACTIVE, orders: [] }) { customerId } } + """; + using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(10)); + while (!received.IsCompleted) + { + timeout.Token.ThrowIfCancellationRequested(); + await context.SendUnrecordedAsync(mutation); + await Task.WhenAny(received, Task.Delay(100, timeout.Token)); + } + + return await received; + } +} diff --git a/test/Linq2GraphQL.Compat/Tests/CompatibilityTests.cs b/test/Linq2GraphQL.Compat/Tests/CompatibilityTests.cs new file mode 100644 index 00000000..aa448b53 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Tests/CompatibilityTests.cs @@ -0,0 +1,128 @@ +using System.Diagnostics; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Text.Json; +using Xunit; + +namespace Linq2GraphQL.Compat; + +/// +/// An app that updates the runtime packages and keeps the client the baseline release generated must behave as +/// before: every scenario must send the same requests, and return or throw the same, as on the baseline packages. +/// A deliberate change goes into accepted-differences.json, keyed by scenario, with the reason. +/// +public class CompatibilityTests(CompatibilityRuns runs) : IClassFixture +{ + public static TheoryData Scenarios => new(CompatScenarios.All.Select(scenario => scenario.Name)); + + [Theory] + [MemberData(nameof(Scenarios))] + public void Scenario_BehavesAsOnTheBaseline(string scenario) + { + var baseline = runs.Baseline[scenario]; + var current = runs.Current[scenario]; + + if (runs.AcceptedDifferences.ContainsKey(scenario)) + { + Assert.True(baseline != current, + $"{scenario} is in accepted-differences.json but behaves as on the baseline again. Remove it."); + return; + } + + if (baseline != current) + { + Assert.Fail($""" + {scenario} behaves differently than on the baseline packages. If that is intended, add it to + accepted-differences.json with the reason. Every record is in {runs.OutputDirectory}. + + Baseline: + {baseline} + + Current: + {current} + """); + } + } + + [Fact] + public void AcceptedDifferences_AreScenarios() + { + Assert.Empty(runs.AcceptedDifferences.Keys.Except(runs.Current.Keys)); + } +} + +/// Runs the scenarios once on this code and once, in its own process, on the baseline packages. +public sealed class CompatibilityRuns : IAsyncLifetime +{ + private static readonly TimeSpan BaselineTimeout = TimeSpan.FromMinutes(5); + + public IReadOnlyDictionary Baseline { get; private set; } + + public IReadOnlyDictionary Current { get; private set; } + + public IReadOnlyDictionary AcceptedDifferences { get; } = ReadAcceptedDifferences(); + + public string OutputDirectory { get; } = AppContext.BaseDirectory; + + public async Task InitializeAsync() + { + var baseline = RunBaselineAsync(Path.Combine(OutputDirectory, "compat-baseline.json")); + Current = await CompatRunner.RunAllAsync(); + await File.WriteAllTextAsync(Path.Combine(OutputDirectory, "compat-current.json"), + JsonSerializer.Serialize(Current)); + Baseline = await baseline; + } + + public Task DisposeAsync() + { + return Task.CompletedTask; + } + + private static async Task> RunBaselineAsync(string outputFile) + { + var runner = typeof(CompatibilityRuns).Assembly.GetCustomAttributes() + .Single(attribute => attribute.Key == "BaselineRunner").Value!; + if (!File.Exists(runner)) + { + throw new FileNotFoundException("The baseline runner is not built; build Linq2GraphQL.Compat.Baseline.", + runner); + } + + File.Delete(outputFile); + var startInfo = new ProcessStartInfo(Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? "dotnet") + { + ArgumentList = { runner, outputFile }, + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + using var process = Process.Start(startInfo)!; + var output = process.StandardOutput.ReadToEndAsync(); + var error = process.StandardError.ReadToEndAsync(); + using var timeout = new CancellationTokenSource(BaselineTimeout); + try + { + await process.WaitForExitAsync(timeout.Token); + } + catch (OperationCanceledException) + { + process.Kill(true); + throw new TimeoutException($"The baseline runner did not finish in {BaselineTimeout}."); + } + + if (process.ExitCode != 0) + { + throw new InvalidOperationException( + $"The baseline runner failed with exit code {process.ExitCode}.\n{await output}\n{await error}"); + } + + return JsonSerializer.Deserialize>(await File.ReadAllTextAsync(outputFile))!; + } + + private static IReadOnlyDictionary ReadAcceptedDifferences( + [CallerFilePath] string callerPath = "") + { + var path = Path.Combine(Path.GetDirectoryName(callerPath)!, "accepted-differences.json"); + return JsonSerializer.Deserialize>(File.ReadAllText(path))!; + } +} diff --git a/test/Linq2GraphQL.Compat/Tests/Linq2GraphQL.Compat.Tests.csproj b/test/Linq2GraphQL.Compat/Tests/Linq2GraphQL.Compat.Tests.csproj new file mode 100644 index 00000000..c050aa64 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Tests/Linq2GraphQL.Compat.Tests.csproj @@ -0,0 +1,30 @@ + + + + + true + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + <_Parameter1>BaselineRunner + <_Parameter2>$(MSBuildThisFileDirectory)../Baseline/bin/$(Configuration)/$(TargetFramework)/Linq2GraphQL.Compat.Baseline.dll + + + diff --git a/test/Linq2GraphQL.Compat/Tests/accepted-differences.json b/test/Linq2GraphQL.Compat/Tests/accepted-differences.json new file mode 100644 index 00000000..f879aed7 --- /dev/null +++ b/test/Linq2GraphQL.Compat/Tests/accepted-differences.json @@ -0,0 +1,3 @@ +{ + "Errors_CancelledBeforeSending": "#123 checks the token before sending: an already cancelled call no longer sends the request. It still throws TaskCanceledException." +} diff --git a/test/Linq2GraphQL.Compat/Tests/packages.lock.json b/test/Linq2GraphQL.Compat/Tests/packages.lock.json new file mode 100644 index 00000000..5b446dda --- /dev/null +++ b/test/Linq2GraphQL.Compat/Tests/packages.lock.json @@ -0,0 +1,1014 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.AspNetCore.Mvc.Testing": { + "type": "Direct", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "BJi3rpYETlh0wd14Lg5Is9MWvEf55TAGd7yo+xGHuEZp7ololyvftbQZ1i7ZuITA7DgNPJED6EMhFSWycq7SBg==", + "dependencies": { + "Microsoft.AspNetCore.TestHost": "10.0.11", + "Microsoft.Extensions.DependencyModel": "10.0.11", + "Microsoft.Extensions.Hosting": "10.0.11" + } + }, + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", + "dependencies": { + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" + } + }, + "Nerdbank.GitVersioning": { + "type": "Direct", + "requested": "[3.8.118, )", + "resolved": "3.8.118", + "contentHash": "cRaG+ICcECG+CzbtQyUV2WftH7yl2B02AjYGGNScXx8TwYavZYwhCewBTiC0qTcsac7m6AzBUYna5xzBWmTGYw==" + }, + "xunit": { + "type": "Direct", + "requested": "[2.9.3, )", + "resolved": "2.9.3", + "contentHash": "TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==", + "dependencies": { + "xunit.analyzers": "1.18.0", + "xunit.assert": "2.9.3", + "xunit.core": "[2.9.3]" + } + }, + "xunit.runner.visualstudio": { + "type": "Direct", + "requested": "[3.1.5, )", + "resolved": "3.1.5", + "contentHash": "tKi7dSTwP4m5m9eXPM2Ime4Kn7xNf4x4zT9sdLO/G4hZVnQCRiMTWoSZqI/pYTVeI27oPPqHBKYI/DjJ9GsYgA==" + }, + "ChilliCream.Nitro.App": { + "type": "Transitive", + "resolved": "32.0.2", + "contentHash": "wSD2dFFraVpIsQDiy31k1vkGWYAGdzNVXOhtOIujMt/ADAzfkEbJUsPyF4qoktFspepN4VrAN7DMS8QRqkEhTg==", + "dependencies": { + "Yarp.ReverseProxy": "2.3.0" + } + }, + "GreenDonut": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "nzv5xP1krDEqhq4GekXWdKlvGPb0NM8JF3B0WpEqIS/tVG7U3sBaQuGCMSNJ02kvrtcde+YEPYtcTh7Y0SJ+CA==", + "dependencies": { + "GreenDonut.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0", + "Microsoft.Extensions.ObjectPool": "10.0.0" + } + }, + "GreenDonut.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "egSQAz8BbFmLqOWtX0s/xlaqz/43fHUzdu/9TjpZ3s4F8FIVgO4rBfKNFWt2nsba9tvT1AW2WbAaf+3pY6IN0w==" + }, + "GreenDonut.Data": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "kYYLxAEPJl0/vdWF2i5pNs6pndGbuiz8OFAyUovfsu2Guo3dSomkU91PC0kpOeToXoQyRDdjz3GUKNBFnT9PQw==", + "dependencies": { + "GreenDonut": "16.6.4", + "GreenDonut.Data.Abstractions": "16.6.4" + } + }, + "GreenDonut.Data.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "Ao8i3nm86+vRKlpctKoWvZ4OdjSLPAQmWp3VMFmCuMVF3rbsVR8TxLRcAG/2/B6VdbGQyOO8tJUGSAooncu28g==", + "dependencies": { + "GreenDonut.Abstractions": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4" + } + }, + "GreenDonut.Data.Primitives": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "p3185VDDm5xV6ZQrkJWkmYaPCVE2BIg6up6R6DrQKnCwIMv3VDzFgNLnVu2eNqoj3iEplBZJBdk1OzvYZO3Xdg==" + }, + "HotChocolate": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "bvEKPvyd0OhZd5usrPxWcGToM860SOlupW+edNobvZiyltlcxnZkfZ7u8Vx8MNtA0OswLyjaL1RI3+JashlE/g==", + "dependencies": { + "HotChocolate.Authorization": "16.6.4", + "HotChocolate.CostAnalysis": "16.6.4", + "HotChocolate.Execution.Projections": "16.6.4", + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.CursorPagination": "16.6.4", + "HotChocolate.Types.CursorPagination.Extensions": "16.6.4", + "HotChocolate.Types.Mutations": "16.6.4", + "HotChocolate.Types.Queries": "16.6.4", + "HotChocolate.Validation": "16.6.4" + } + }, + "HotChocolate.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "1ELetbKeMEJXK1D/G9kR55XGF4FkaYS8zvLkWIl/3s75BWPTk97vzC/EBgTEC5Q/Wj7zmBDUwdA7a9noezeoFw==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Language": "16.6.4", + "HotChocolate.Primitives": "16.6.4" + } + }, + "HotChocolate.AspNetCore.Pipeline": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "j3T4SnePMXVbrOyniu9SFvA7jOfHlcVjEeyvEh60UD/xaPIP1+L5WofDpP1088JwwvLlpYCWdyEmXhNoFy8Q+g==", + "dependencies": { + "ChilliCream.Nitro.App": "32.0.2", + "HotChocolate.Caching.Memory": "16.6.4", + "HotChocolate.PersistedOperations.Abstractions": "16.6.4", + "HotChocolate.Transport.Formatters": "16.6.4", + "HotChocolate.Transport.Sockets": "16.6.4" + } + }, + "HotChocolate.Authorization": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "2TIXgq49SYmfC+NMV+poOq83JeScz0ZkEhHSgv91lNDTZINz06DlxcCrlsf2q+ns8fIS3rbnnHJswBzobE+qUA==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Caching.Memory": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oEOWL5+6wVG7HQHil5EydXcCdV296ZSuUO27mZYAxq5wMx9aX9D/ZkUOWU3To1vo75w767tqrr7+OEGWjPxuiA==" + }, + "HotChocolate.CostAnalysis": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "LcrorDRmMdWjRyCOxnYbqIuDB/qdP5oFXBw4gkgNdnjov0C7BGz5z0M074OvgdzsnqQYb7iDWcaPPtZq6zCVxA==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Execution.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "pmaAsn6q4C/elx0SVnTGYWZxy3AqY5V7FYf/3CR8fq7i4rMKH/hHe/qfIoAzC6Phbg1tacHlT2YBeOAssQ3GoA==", + "dependencies": { + "HotChocolate.Features": "16.6.4", + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Language.Web": "16.6.4", + "HotChocolate.Primitives": "16.6.4", + "HotChocolate.Text.Json": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4", + "HotChocolate.Utilities.Tasks": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Execution.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "OP16Y71IuSuBhGuTNo3gujdBF5HP1WmZYtNV6bUpCv/r4r7dG8rKQYxd2nlnPfTeiFQsvZyqGNKQLxATwxOiCQ==", + "dependencies": { + "HotChocolate.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Execution.Operation.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "yfXI/ps/VYFyVtj3Z29ImoSLxGfn5OTRXmhkpQtKhQLTiFA8DbxU8/swXRx8bTJL8YS3AOAdPn5qiZBD6rz93Q==", + "dependencies": { + "HotChocolate.Features": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4" + } + }, + "HotChocolate.Execution.Pipeline": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "ZaJ48M13jKTsVphND7rK+JvWkxM3oDmYLL/JDNj0zjMqMH77PQSLVALK/OOKSI0HxhDbKWdVSvUMKg7MoXrJ5A==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Validation": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Execution.Projections": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "9cqrsEdbY8JfKgLgRGvM3rBfrC7fvb6rl+kORlXVMOvxDTbL75vrvmKyTHC1HmlJdQ56wTUq33Y6ycEJdoCwNw==", + "dependencies": { + "GreenDonut.Data": "16.6.4", + "GreenDonut.Data.Abstractions": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4", + "HotChocolate.Caching.Memory": "16.6.4", + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Features": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "0SGN2IDkopXsaxaN0qT+Ww5d/Y+yV4ZvG+xCKU0CvWlTnrq6JrpgeZcJF594EwJnXB4Zja3Wn1piKFEh0ewPDw==" + }, + "HotChocolate.Fusion.Language": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "euXggAJYrOhpd0OpDXLZOQ49AocNkIYUCVEoU6403EDTN46PnaDz2ltGnhcYk8bI1qMq0nm+ZbcmREcdRJfonQ==" + }, + "HotChocolate.Fusion.Utilities": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "HDz/NdyIDNCfUx2JvInVbsr4F3f9a8jyXlnM5mbGV0caZv8Hr1ozyY9NOyltZtkomdk0TKXVN8YaxBWnfwMBLA==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Fusion.Language": "16.6.4", + "HotChocolate.Language": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4" + } + }, + "HotChocolate.Language": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oLEo6gvXVcKN/sDOSKxB0pFYBId1OSdKB+yxVRzg88M3q8N2uq89Q0P7fnpwUuiobay511gvXXihYaBxNt3xVA==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Language.Utf8": "16.6.4", + "HotChocolate.Language.Visitors": "16.6.4", + "HotChocolate.Language.Web": "16.6.4" + } + }, + "HotChocolate.Language.SyntaxTree": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "BDsJMdv6LjYEfGVQiAVhSf50xbAIrigoZUzjUoncbXGXzrfAJaVsGkZs6mR1z0UcTWrlSNoFRosxbtY07iPnCg==", + "dependencies": { + "HotChocolate.Utilities.Buffers": "16.6.4", + "Microsoft.Extensions.ObjectPool": "10.0.0" + } + }, + "HotChocolate.Language.Utf8": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "Ria0zRrpy4nXVvuczx14Vbe+8jdVPPryUlKjfUVUZCmU9Ntif/XhaFmVYo3HtS+FVkFHSRA1o0DeTXEoDnzX9Q==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Language.Utf8.SyntaxTree": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4" + } + }, + "HotChocolate.Language.Utf8.SyntaxTree": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "2nnk9e2GT4N8HlVXvtYYOEJysPUiZMQnjtSnLSltW9YC1VW/E4IGnxxJ2Gt7Mj+4yUSlQ+61DnzOD+UtSF09Kg==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4" + } + }, + "HotChocolate.Language.Visitors": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "MWHB8709Ho2bQkIXuzTGKw91L9z675poWJ1lg6BGmdg3/ZnfsXGAv8cdP/cA4UzB1rOtYJTqrh2YP7xywHvwCQ==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "16.6.4" + } + }, + "HotChocolate.Language.Web": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "7GWlN019RYlbGJ88j9gw34exwD562PsiJ49zs8RALAzJnmC000KgH5vHikUbPVU5eeO8nUunyCEQafdgypY68A==", + "dependencies": { + "HotChocolate.Language.Utf8": "16.6.4", + "HotChocolate.Language.Visitors": "16.6.4" + } + }, + "HotChocolate.PersistedOperations.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oUpPCiwIfrlk7Cswh+c9J+iRnmNIbRlA7EmGeL/nOR93xSMiCd9zgrkAtBggP4SdyESY9dD628lQZb8AkqXZdw==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4" + } + }, + "HotChocolate.PersistedOperations.Pipeline": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "h1VeBRoKQVg5BZnhLHwUHhGApOa8Rk31s64PNG1darAqUnX9v8ZNd/oiv+cQ6CabraQHmbvvvR2DfE/XGsygcA==", + "dependencies": { + "HotChocolate.PersistedOperations.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Primitives": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "u4FkIs8tKYWJ3I0vTEDPXaPhy4zfhFNZNWqef3tRPGpnQe1rg+7FdM+V1bNs6j94ucY8fX5DTNDJy9OGVe4e3g==", + "dependencies": { + "HotChocolate.Language": "16.6.4" + } + }, + "HotChocolate.Subscriptions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "L9CzlWy1cHZFixMWyZmtbI5pmqlfwHjGBjF0+pVnbJJaYQv2eSc4Q/8kdQjkhdGuhewPtC44OAMki1br9/Azpw==", + "dependencies": { + "HotChocolate.Abstractions": "16.6.4", + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Utilities": "16.6.4" + } + }, + "HotChocolate.Subscriptions.InMemory": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "/3Tm/h3jw+nrv5CHtszE3iAnG3n3odP842QrTid7mxrEmaMEqE74RA00wTmFaO/bbepCnmymXLxox31nC30TAQ==", + "dependencies": { + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Subscriptions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Text.Json": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "sBxtzPsvDjsw9V9VKy/NomlPE1ruprKHU5iTuHJUZ2i20Ihvq4ouxff0O7yCD1iA32NCaLNL3zvNJagZNV/nTQ==" + }, + "HotChocolate.Transport.Formatters": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "fl16wIiX4FAbSs2TSUM7yorg3awV2cUDNBMN9LU/mPcEN9yzgNN7FsIKQdl1TiqiXSAz5/ihVtBqLJBliws8uw==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Utilities.Buffers": "16.6.4", + "HotChocolate.Utilities.Tasks": "16.6.4" + } + }, + "HotChocolate.Transport.Sockets": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "g67fURnanTGuLJwWxRG4E5PJfl+K6TZx8afNc6u+flbbwmTR+7TKEx7b/ZrlzqxCSqASA4H+KN3h4/3nILT+gQ==" + }, + "HotChocolate.Types": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "UEpl+u8WuvQOK1vdlq+2uucLPQpuNXbzt27ij8xcEwOfZAimYC8dGep4MIb1ItdNk2X7PaOegGPQXWoh+oxSiQ==", + "dependencies": { + "GreenDonut": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4", + "HotChocolate.Abstractions": "16.6.4", + "HotChocolate.Caching.Memory": "16.6.4", + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Execution.Operation.Abstractions": "16.6.4", + "HotChocolate.Execution.Pipeline": "16.6.4", + "HotChocolate.Features": "16.6.4", + "HotChocolate.Fusion.Language": "16.6.4", + "HotChocolate.Fusion.Utilities": "16.6.4", + "HotChocolate.PersistedOperations.Abstractions": "16.6.4", + "HotChocolate.PersistedOperations.Pipeline": "16.6.4", + "HotChocolate.Text.Json": "16.6.4", + "HotChocolate.Transport.Formatters": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4", + "HotChocolate.Utilities": "16.6.4", + "HotChocolate.Utilities.Base36": "16.6.4", + "HotChocolate.Utilities.DependencyInjection": "16.6.4", + "Microsoft.Extensions.DependencyInjection": "10.0.0", + "Microsoft.Extensions.ObjectPool": "10.0.0", + "Microsoft.Extensions.Options": "10.0.0" + } + }, + "HotChocolate.Types.Abstractions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "KrftIDiSImZmhQv+Johy6cGOzIKizZS4TbsJwzlSINrUtj/L8G7RVvFaUTl/iYXYIdganPopITsSCu+fs3UIVA==", + "dependencies": { + "HotChocolate.Features": "16.6.4", + "HotChocolate.Primitives": "16.6.4" + } + }, + "HotChocolate.Types.CursorPagination": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "hNoVzFKkZGzTofL0nPtMeqFpv6+zy2jqY9Ef3vnJuzSwCjD08g4SJNt947ViksDoqMUVPtH3xjZMiOS2vN9Z6w==", + "dependencies": { + "HotChocolate.Execution.Configuration.Abstractions": "16.6.4", + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Types.CursorPagination.Extensions": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "uaWfK7+/WpYF/zOoeLF+QutSVHP3hQEW+MKHRc76Fg4tuhDxSw6c7rW3wEbOys7W1kAgnKfeVWtYkQCj4ifBBg==", + "dependencies": { + "GreenDonut.Data": "16.6.4", + "HotChocolate.Types.CursorPagination": "16.6.4" + } + }, + "HotChocolate.Types.Errors": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "S9KNljhZe94L/OQse+VsVwwIUunoyjBv4IvTfjCPy/6IWvc96q6Pkw5wC9C42X32PrCPqTsXL6vsc7G8mQLh3A==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Types.Mutations": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "l5umZs2JyB3wq8giyucXLKmKkaFEZxidzhaiZ2DsxXq969v0OlgZiGxdU5puMUJ1XNrWtQUocnURgo8tqOg/pg==", + "dependencies": { + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.Errors": "16.6.4" + } + }, + "HotChocolate.Types.Queries": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "WiMtlmgToK8/GLFR5zdUT9YdSmpU2kkDTd7l+56r1TB934+2Qp2hzl0zd6THCPx4Hd9BocwMjrUggSCgnDuDng==", + "dependencies": { + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.Errors": "16.6.4" + } + }, + "HotChocolate.Types.Scalars.Upload": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "GWkhJth8tpx3zF8xXu7oxXB+aeTGclwDZR8/kA0CI/efsIRbAj5k13HxTN7WG9/b7/SdV+iJer6pRS1J1fWOYQ==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "HotChocolate.Utilities": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "8kg+EoA7eS0uIOR/06CzKcEaZprWAxecwUkHFS2cOys7uRkXaxjgVfzwz1wARkAXEHhaMhFEQvVjHghQGQodYA==", + "dependencies": { + "HotChocolate.Utilities.Buffers": "16.6.4", + "HotChocolate.Utilities.Tasks": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "HotChocolate.Utilities.Base36": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "i0zQoDkaSXR07627r1l7SQ0psF9zOa7CUsmR7vrSmwhBItYe2AVR6z4M58JDo1MoHR5Nt6Mp8Y0dgrOL6OM6zg==" + }, + "HotChocolate.Utilities.Buffers": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "oeadDwUfn3oF97oNwF3QD3gEoOPOxl/sKwFGKj9BXNwgQnm9ho4DRFZrY0v4Gk78sGEsSxzfK8YlUz7pl5aAXA==" + }, + "HotChocolate.Utilities.DependencyInjection": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "1mw7EmE6mF/Ui+LGW1cyVPm0Rvko+szyU5q3AsH5NmiT+9iEEReLm3h716nF9f4RsYGnuNdXuUt1+eE6tfs/AQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "10.0.0" + } + }, + "HotChocolate.Utilities.Tasks": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "/zsN3ARuQe39QWMEMlaQCV4Td4kSa4Ppzh979YeXATB7S039QyDyExgtzsPw2gu0WamuH+hqPsGdo3hSRqqUIQ==" + }, + "HotChocolate.Validation": { + "type": "Transitive", + "resolved": "16.6.4", + "contentHash": "H104wO+jzcY8OhZE9QEKWs5NGtC4Kj04oJOsgJ+do3KI2go9fKNtrHKfJLFfuR6HaREn6SDqswYViiR4BGItSg==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "16.6.4", + "HotChocolate.Types.Abstractions": "16.6.4", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" + } + }, + "Microsoft.AspNetCore.TestHost": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "IVGNbZVxLuL80y7cmXYfhIFoTGneHkp4D7xXarYe6V/wjo8/2qiSLUwWax1/h2eHtJ3Y5cuqmtpOyWMnXIsUMA==" + }, + "Microsoft.CodeCoverage": { + "type": "Transitive", + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" + }, + "Microsoft.Extensions.Caching.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "vUl798SmruTqqlt/xH2gDk3tJlhk6k3HdOXAHirlRfbNKDym4g/kRpUL9S4sl6F6FsOTOMW+ZsDapqlZMOOiEw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "fVi053xdpda9Em7vSkmgVxO/PtgC2m78ekReKWsgcyskqY0U82Bz/MONwxpGzI0hElYKJfw+fupqMVeKW3fSaA==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "rFn8RuszZn3qquPVkDytMUlPc2+rXl9MCoygwc1XmAgC5vg5/oXJ8hkOosOrLoBLsqdTy4lFwP6iQdPS9uSYOA==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.CommandLine": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "1KHr/1L56llwQ/yI0tAisEA31UpPsn8aasjASIwELOaN4JIUcbjuQBMdFOIzfNBBeULoUa0XfBe5QDtRRUY+fg==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "/a1aJz4m7ylhEDf25ugQChLQoN5XwoGjWw/BoR/ZWWKsO1v4DdJElS1uyngahz4B/eOzjFk1KNTkarRLE5wsIg==" + }, + "Microsoft.Extensions.DependencyModel": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "PJPtFYsZ+r+uz9qqXWUTEyKeJ1EiBGIJtqavkg9ZXijjGSFAk4Fgi5sqIxj+uAyLZwEKgexDUQXhWhvU6l3+og==" + }, + "Microsoft.Extensions.Diagnostics": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "HT70uGPxMLqqnOzKMcnQtDmeV4r0KHr4qVCLhP7SXil9jMEm8sQXwcybxVVFGXZJ1V44xV0mLqQ54aZbcR2OiQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.11", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.11" + } + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "se7Kx8QpJEt+nf26L4qIVAofGTDr1wbexxsh/Fm3Xc04xUkqUXK06KUS7FLwSQYSjqb7q9n+T7MEcXYBhI1Y5g==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "JOjac6SQQgZmdmB8WGEw61/7siqMZoWJMkmq2p1goJGxqI59lO6oB4bOl0jNsbaPBdYy5Mlkb+6U7T4+CjnD8Q==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.FileProviders.Physical": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "Tq/UqMaczePv9yWwSsJZRgKtgA46djVR5xHj/lZBCueQ3ag8f9v5mu0EdhrNx7tXxNk+Y9OurG2oKuSKINjr0A==", + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileSystemGlobbing": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.FileSystemGlobbing": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "2i6rtW/B5rCnWCnhdmWWEmaM9O0HD0zsPY9eRqa++y4tclI3Uw8zvGbBvhY/LjAdtf8gUHhUPcAWj3DRlWMXmQ==" + }, + "Microsoft.Extensions.Hosting": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "eIDa/Rl+93aj17gMlFsJJx+LhBvb3CP0Mu1PeVYkDp2Y3S4Jock8UynfGQEcx7lrlq+gKW+ECQJHbro/LTPDEQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Binder": "10.0.11", + "Microsoft.Extensions.Configuration.CommandLine": "10.0.11", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "10.0.11", + "Microsoft.Extensions.Configuration.FileExtensions": "10.0.11", + "Microsoft.Extensions.Configuration.Json": "10.0.11", + "Microsoft.Extensions.Configuration.UserSecrets": "10.0.11", + "Microsoft.Extensions.DependencyInjection": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Diagnostics": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Physical": "10.0.11", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Configuration": "10.0.11", + "Microsoft.Extensions.Logging.Console": "10.0.11", + "Microsoft.Extensions.Logging.Debug": "10.0.11", + "Microsoft.Extensions.Logging.EventLog": "10.0.11", + "Microsoft.Extensions.Logging.EventSource": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.Hosting.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "pwtpF7iF/NNaOBcX+pvMZ7y2+JAVbH5KkNrH9uMZtuVxVJsFTDiWiCR7Tk3HVptsAijaetipUZVRVK2LLq+nvA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "Ljd0Uxoq5XpScD2Bg0nM/r3mwx7Ao5Uq24eo2ARxbGvqJ7Zht6rt2cJtwVRH4Cv+1ZVMdXz6TB43KbpmsxRrvQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Configuration": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "S7LvLeVHKNPaY2NMyxW7c2TBGsLgxoSUBCV5Ev5iN8kgC7EPR2UB7eW7vHsElGMcIUDwRmoxLfvGDynCn3q6EA==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Binder": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Debug": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "wr+j1bjdFXhc8lKTLoq+RbwFM8M+orcMS9xrcqLmDGOxJcXpKizEeE5h6v/GKwCZV02FmhaA7OlNjoq072jZpQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.EventLog": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "Eck9GpCCpvZ3f6L7IUlN+mPtRVefnf7PsiIG5vi61QawPtLNCEAv2TPD/M3SojcU0PFaef+BxiVGPOShFHtDog==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "System.Diagnostics.EventLog": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.EventSource": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "hs6QWECLLohi2VKqUvSGRUvrg7eXR1DqKL95Jrtz3cdD2g2nBA+yJPdRQLZ7SLmnTZWycxfMDK2s0ho+rfst5w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "10.0.0", + "contentHash": "bpeCq0IYmVLACyEUMzFIOQX+zZUElG1t+nu1lSxthe7B+1oNYking7b91305+jNB6iwojp9fqTY9O+Nh7ULQxg==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "eY1GAKcTfD2maP27J84X9IovT3yjHJ2dVDzPmDg6/XqYvt3jMzJhtfQCLjG9pVsZGAd+8DQ2QrjaDcs2+VQLGw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "syEhXQ/sEaSBFaqzlp9gDGHX/nk6gkQkh1sIUpBO1mlBj3Phu1rmb4ML1uCiyPW9N6Kxfxv3y5FGObC+bV01Qw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Binder": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "SXcz+kF+4Oo9b1+55zntpJFYfwb1jw66ioxptyNOOTDc8g2FHnBFWjZpsWfCvZIhzr0x+4e2trVTs4OKwQfBtw==" + }, + "Microsoft.IO.RecyclableMemoryStream": { + "type": "Transitive", + "resolved": "3.0.0", + "contentHash": "irv0HuqoH8Ig5i2fO+8dmDNdFdsrO+DoQcedwIlb810qpZHBNQHZLW7C/AHBQDgLLpw2T96vmMAy/aE4Yj55Sg==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==" + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" + } + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "10.0.11", + "contentHash": "QTXEoQBzz00SFWbo7nAg1Ogd4f99lwqcO9uAJ7MYSLEUR28f6As32QktrqG2Fr9cfAfd1GjLyGYspE7Ipj7P6w==" + }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "ne1843evDugl0md7Fjzy6QjJrzsjh46ZKbhf8GwBXb5f/gw97J4bxMs0NQKifDuThh/f0bZ0e62NPl1jzTuRqA==" + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "31kfaW4ZupZzPsI5PVe77VhnvFF55qgma7KZr/E0iFTs6fmdhhG8j0mgEx620iLTey1EynOkEfnyTjtNEpJzGw==" + }, + "xunit.abstractions": { + "type": "Transitive", + "resolved": "2.0.3", + "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" + }, + "xunit.analyzers": { + "type": "Transitive", + "resolved": "1.18.0", + "contentHash": "OtFMHN8yqIcYP9wcVIgJrq01AfTxijjAqVDy/WeQVSyrDC1RzBWeQPztL49DN2syXRah8TYnfvk035s7L95EZQ==" + }, + "xunit.assert": { + "type": "Transitive", + "resolved": "2.9.3", + "contentHash": "/Kq28fCE7MjOV42YLVRAJzRF0WmEqsmflm0cfpMjGtzQ2lR5mYVj1/i0Y8uDAOLczkL3/jArrwehfMD0YogMAA==" + }, + "xunit.core": { + "type": "Transitive", + "resolved": "2.9.3", + "contentHash": "BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==", + "dependencies": { + "xunit.extensibility.core": "[2.9.3]", + "xunit.extensibility.execution": "[2.9.3]" + } + }, + "xunit.extensibility.core": { + "type": "Transitive", + "resolved": "2.9.3", + "contentHash": "kf3si0YTn2a8J8eZNb+zFpwfoyvIrQ7ivNk5ZYA5yuYk1bEtMe4DxJ2CF/qsRgmEnDr7MnW1mxylBaHTZ4qErA==", + "dependencies": { + "xunit.abstractions": "2.0.3" + } + }, + "xunit.extensibility.execution": { + "type": "Transitive", + "resolved": "2.9.3", + "contentHash": "yMb6vMESlSrE3Wfj7V6cjQ3S4TXdXpRqYeNEI3zsX31uTsGMJjEw6oD5F5u1cHnMptjhEECnmZSsPxB6ChZHDQ==", + "dependencies": { + "xunit.extensibility.core": "[2.9.3]" + } + }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.3.0", + "contentHash": "gxtkN3a+9biu9V9Zd5NaTO6VZWXAnS2mhQ0R/VXmSPoTuiQNZsakKikrKpDtKxrL5nUYzbRsHtl40WNq+ZBKKg==", + "dependencies": { + "System.IO.Hashing": "8.0.0" + } + }, + "linq2graphql.client": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Caching.Memory": "[10.0.11, )", + "Microsoft.Extensions.Http": "[10.0.11, )" + } + }, + "linq2graphql.client.subscriptions": { + "type": "Project", + "dependencies": { + "Linq2GraphQL.Client": "[1.0.0, )", + "Websocket.Client": "[5.3.0, )" + } + }, + "linq2graphql.testserver": { + "type": "Project", + "dependencies": { + "HotChocolate.AspNetCore": "[16.6.4, )", + "HotChocolate.Data": "[16.6.4, )", + "HotChocolate.Types.Analyzers": "[16.6.4, )", + "Linq2GraphQL.TestServer.Shared": "[1.0.0, )" + } + }, + "linq2graphql.testserver.shared": { + "type": "Project", + "dependencies": { + "HotChocolate.AspNetCore": "[16.6.4, )", + "HotChocolate.Data": "[16.6.4, )" + } + }, + "linq2graphql.testservernullable": { + "type": "Project", + "dependencies": { + "HotChocolate.AspNetCore": "[16.6.4, )", + "HotChocolate.Data": "[16.6.4, )", + "HotChocolate.Types.Analyzers": "[16.6.4, )", + "HotChocolate.Types.Scalars": "[16.6.4, )", + "Linq2GraphQL.TestServer.Shared": "[1.0.0, )" + } + }, + "HotChocolate.AspNetCore": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "sxqZ+B2asfW/vAznKNl+xP+sf8eR3h4lRKYrmDtJPTAbJ4Z8+rWW6DNqbFyoU1LAl1teTbRwPaGPxEqYKumA2Q==", + "dependencies": { + "ChilliCream.Nitro.App": "32.0.2", + "HotChocolate": "16.6.4", + "HotChocolate.AspNetCore.Pipeline": "16.6.4", + "HotChocolate.Subscriptions.InMemory": "16.6.4", + "HotChocolate.Transport.Formatters": "16.6.4", + "HotChocolate.Transport.Sockets": "16.6.4", + "HotChocolate.Types.Scalars.Upload": "16.6.4", + "HotChocolate.Utilities.DependencyInjection": "16.6.4" + } + }, + "HotChocolate.Data": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "ruKaYosX4yTOAVeDEQfHFSjuIhmCeQpq3ritskH8i74wn8hKhPRsFA9iFPom3qpiZkCJxsCIPQZumGJGf6xpkQ==", + "dependencies": { + "GreenDonut.Data": "16.6.4", + "GreenDonut.Data.Abstractions": "16.6.4", + "GreenDonut.Data.Primitives": "16.6.4", + "HotChocolate.Execution.Operation.Abstractions": "16.6.4", + "HotChocolate.Execution.Projections": "16.6.4", + "HotChocolate.Types": "16.6.4", + "HotChocolate.Types.CursorPagination.Extensions": "16.6.4" + } + }, + "HotChocolate.Types.Analyzers": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "bigjWuAkEQvxoQCrUzAvowiqS7YrTciape6++hB9YpA2cFH5RQnG+xyTo/MvWCN5jSvnW4izvdae9mhxtfhZZA==" + }, + "HotChocolate.Types.Scalars": { + "type": "CentralTransitive", + "requested": "[16.6.4, )", + "resolved": "16.6.4", + "contentHash": "WlNLZQRjpwbkV3gYUetD3w6xFwx5yN0l3lUXbyRihy+jB/6LnXgTGCGLphZy1e5nPl0nbeDwMdx0OLyBe6/hyQ==", + "dependencies": { + "HotChocolate.Types": "16.6.4" + } + }, + "Microsoft.Extensions.Caching.Memory": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "el1g0mBEbDBGY2bT9mcSfrTWO8QlPdq2nOCnvQugioOFwHV+bVBMeiakoI0dNOdj8d6Hi9K6HY2xzRUWJiDR3w==", + "dependencies": { + "Microsoft.Extensions.Caching.Abstractions": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "wlhRqZW8LcJPa+vk2oLAc/REXDItHtkFQdf/QcXYGZbZOO13izcsKY1pCvuFQYwUiZD+hwSZwsKASjqT+BNaVg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.EnvironmentVariables": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "KICyU3eVi5jvloKm01EXV69L97H/zkhISVtV98cIuzuFOxNx3xTUVcXqvWTz3aq7OvUuDB/MFlPFjmxRaKF7/A==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.FileExtensions": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "mDW7KVFB05M6jiRUyaZiOMWhS31n5HlSZwoYctHAZAucD4sMDJ70IxOmkGDt6RpstchD+keWBjhdzcMpSkWvWQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Physical": "10.0.11", + "Microsoft.Extensions.Primitives": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.Json": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "nSPrT8U/cNoB4coqkmnanAMK9PsL7lsjG+LLUKEwHRFwS6E78b8S1wdv/y88EOxBhasWov1rLd7RTHmmsYPOLg==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.11", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.FileExtensions": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Configuration.UserSecrets": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "BRliLdUowglV8GS+J1G/QsSofCJYYFg3U8QZx0ACRn+a91az/Qnpy+h6PyHS94WgV2TSazX5D/cuuk6wnCJatw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.Configuration.Json": "10.0.11", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.11", + "Microsoft.Extensions.FileProviders.Physical": "10.0.11" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "PSmotV19c7E3lKed++uYo1kSiXFI+uTl37CBSrhq+CfLC3FCHjG7R91+xPnNehQfHS1b0Tzo/CCLPWH3qaEheg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11" + } + }, + "Microsoft.Extensions.Http": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "ujx8RvcKzkxPFBguwgiygbwWVHVK0P7HFlNJ6I0JBRb28tzwe42jixBoA+dGmqG9IHepPVcm04vv2IDnU93ekA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.11", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Diagnostics": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.Logging": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "nUOJwgFkSiLHiVGFpU22pIJtuWYewuSYQ3JVuP/gdK8ASMT807Px+TYQiRWs6uSsOmoyFTaVCwKXTasczV6BpA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Microsoft.Extensions.Logging.Console": { + "type": "CentralTransitive", + "requested": "[10.0.11, )", + "resolved": "10.0.11", + "contentHash": "dFc0yDudyD1iIg6z9XT7ofsT3hVO7Y4ylrxGHIVRR0GaZ4CUk4ujOrMoy7wWEdNHZhvJooySg6hZpOxyS8zEVA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging": "10.0.11", + "Microsoft.Extensions.Logging.Abstractions": "10.0.11", + "Microsoft.Extensions.Logging.Configuration": "10.0.11", + "Microsoft.Extensions.Options": "10.0.11" + } + }, + "Websocket.Client": { + "type": "CentralTransitive", + "requested": "[5.3.0, )", + "resolved": "5.3.0", + "contentHash": "uhdDM+gruCEhHRCKCoyali1HJp0wSS/HBs5X9XZwULNKM2y5ML188TsvcEgWEFOx0NOaHfGNtfoC0cd1p2NOIg==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.IO.RecyclableMemoryStream": "3.0.0", + "System.Reactive": "6.0.0" + } + } + } + } +} \ No newline at end of file