diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf55d54b..f2d9bcf0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,13 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Added
+- **Standalone clients** (`--standalone`, `-sa`, or `"standalone": true` in the settings file): the
+ generator writes a copy of the runtime into `Runtime/` under `.Runtime`, so the client
+ references no Linq2GraphQL package. Clients generated with different generator versions can then be
+ used in one app. `Runtime/RuntimeInfo.cs` records the runtime version and the packages it needs, which
+ the generator also prints. With `--agent` the copy includes the agent tools from
+ `Linq2GraphQL.Client.AI` too, in `.Runtime.AI`.
+
- `GraphSubscriptionExecute.StartWithErrorsAsync()` returns `IObservable>`.
Each event carries its data AND its GraphQL `errors`. A `next` event with field errors
no longer terminates the subscription: partial data and later events keep flowing.
@@ -111,6 +118,9 @@ Behaviour changes that callers may notice. None of them changes a public signatu
### Fixed
+- The safe-mode schema cache key includes the schema type, so clients with their own runtime copy
+ that share an `IMemoryCache` and an endpoint no longer read each other's cached schema
+ (`InvalidCastException`).
- A server `complete` frame now completes the typed subscription observable. Previously
the observable stayed open after the server finished the stream.
- A `Fault` overflow in one subscriber no longer starves other subscribers of the same
diff --git a/CLAUDE.md b/CLAUDE.md
index 706a8eb2..4b310701 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -64,6 +64,8 @@ Key details that bite:
**T4 workflow (from DEVELOPER.md — read it before touching templates):** each template is three files — `X.tt` (source, edit this), `X.tt.cs` (hand-written partial with constructor params and helpers), and `X.g.cs` (preprocessed output, **generated at build time, gitignored**). The generator's csproj runs the pinned `dotnet-t4` local tool (`.config/dotnet-tools.json`) over every `Templates\**\*.tt` before compiling, so editing a `.tt` and building is the whole loop and stale template logic cannot be built. Compile errors inside template code are reported against the `.tt` file and line. A template in a new folder needs a `T4Template` item with a `TemplateNamespace` in the csproj.
+**Standalone mode** (`--standalone`, `StandaloneRuntime.cs`) makes the output carry its own copy of the runtime instead of depending on the packages, so clients generated by different versions can share an app. The csproj embeds `src/Linq2GraphQL.Client`, `.Subscriptions` and `.AI` source (minus `Assembly.cs`) as resources; Subscriptions is copied only with `--subscriptions` and AI only with `--agent`; the generator writes it to `Runtime/` with `Linq2GraphQL.Client` rewritten to `.Runtime` everywhere, including the generated client files. So the runtime must stay copyable: no reliance on its own assembly name, no `InternalsVisibleTo` from generated code, no hard-coded `"Linq2GraphQL.Client"` strings, and anything shared across apps (like the safe-mode cache key) must be keyed by type so copies don't collide. `TestClientStandalone` is the checked-in standalone output; `Linq2GraphQL.Tests.Standalone` compiles the main suite's test files against it, with `StandaloneNamespaces.cs` pointing the package namespaces at the copy.
+
`GeneratorSettings.Current.Nullable` is ambient static state read from inside templates; the nullable and non-nullable clients differ mainly in nullable annotations and `#pragma warning disable CS8618`.
`GeneratorSettings.Current.TypeMapping` is the GraphQL-scalar-to-CLR-type table for the run: `Helpers.DefaultTypeMapping` with any `scalarMappings` from the `--config` settings file applied on top (`GeneratorConfig`). It is read in exactly two places - `BaseType.GetCoreType` for the emitted type name and `Schema.GetCustomScalars`, which treats absence from the table as "generate a `CustomScalar` class for this scalar" - so mapping a scalar to a simple type also suppresses its generated class, and mapping it to `null` does the reverse. Override targets are validated against `Helpers.SupportedTargetTypes`, an allow-list, because a null `CoreType.CSharpType` silently changes nullability and the input-factory template rather than failing.
@@ -73,6 +75,6 @@ Key details that bite:
`Linq2GraphQL.Tests` is xUnit + Shouldly + Moq. It spins up the real GraphQL server in-process with `WebApplicationFactory` — `Linq2GraphQL.TestServer` is HotChocolate over the POCOs in `TestServer.Shared`, and `TestServerNullable` is the same schema for the nullable client. `SampleClientFixture` / `SampleClientNullableFixture` wire the generated client to that in-memory host (safe mode on, SSE subscriptions), and test classes take them via `IClassFixture<>`. So most tests are end-to-end: an assertion failure can come from the expression parser, the query text, or the server's own resolvers.
-`Linq2GraphQL.TestClient` / `TestClientNullable` hold **checked-in generated output**. They are not regenerated by the build — run `./scripts/regenerate-test-clients.ps1` (it boots both test servers over plain HTTP, regenerates both clients with the flags that produced the committed output, and writes them back) and commit the diff. The `generated-clients` CI job runs the same script with `-Check` and fails if the committed output no longer matches the generator, so a template or schema change that you forget to regenerate is caught in CI rather than passing against stale output.
+`Linq2GraphQL.TestClient` / `TestClientNullable` / `TestClientStandalone` hold **checked-in generated output**. They are not regenerated by the build — run `./scripts/regenerate-test-clients.ps1` (it boots the test servers over plain HTTP, regenerates the clients with the flags that produced the committed output, and writes them back) and commit the diff. The `generated-clients` CI job runs the same script with `-Check` and fails if the committed output no longer matches the generator, so a template or schema change that you forget to regenerate is caught in CI rather than passing against stale output. `TestClientStandalone` contains a copy of the runtime, so **any change under `src/Linq2GraphQL.Client`, `.Subscriptions` or `.AI` also needs a regenerate**; `-Check` ignores only the version line in its `RuntimeInfo.cs`.
`docs/` (the Blazor documentation site) and `StartGG/` (a sample client) are outside the CI solution filter and can drift.
diff --git a/Linq2GraphQL.CI.slnf b/Linq2GraphQL.CI.slnf
index e99fb3e6..be5bfa99 100644
--- a/Linq2GraphQL.CI.slnf
+++ b/Linq2GraphQL.CI.slnf
@@ -10,10 +10,12 @@
"test\\Linq2GraphQL.Agent.Sample\\Linq2GraphQL.Agent.Sample.csproj",
"test\\Linq2GraphQL.TestClient\\Linq2GraphQL.TestClient.csproj",
"test\\Linq2GraphQL.TestClientNullable\\Linq2GraphQL.TestClientNullable.csproj",
+ "test\\Linq2GraphQL.TestClientStandalone\\Linq2GraphQL.TestClientStandalone.csproj",
"test\\Linq2GraphQL.TestServer\\Linq2GraphQL.TestServer.csproj",
"test\\Linq2GraphQL.TestServer.Shared\\Linq2GraphQL.TestServer.Shared.csproj",
"test\\Linq2GraphQL.TestServerNullable\\Linq2GraphQL.TestServerNullable.csproj",
- "test\\Linq2GraphQL.Tests\\Linq2GraphQL.Tests.csproj"
+ "test\\Linq2GraphQL.Tests\\Linq2GraphQL.Tests.csproj",
+ "test\\Linq2GraphQL.Tests.Standalone\\Linq2GraphQL.Tests.Standalone.csproj"
]
}
}
diff --git a/Linq2GraphQL.sln b/Linq2GraphQL.sln
index ef044bf5..51b9a7b4 100644
--- a/Linq2GraphQL.sln
+++ b/Linq2GraphQL.sln
@@ -28,6 +28,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.TestServer.Sha
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.TestClientNullable", "test\Linq2GraphQL.TestClientNullable\Linq2GraphQL.TestClientNullable.csproj", "{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.TestClientStandalone", "test\Linq2GraphQL.TestClientStandalone\Linq2GraphQL.TestClientStandalone.csproj", "{B6FCB2DB-88F4-44DD-8A77-4675AA6E8D60}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.Tests.Standalone", "test\Linq2GraphQL.Tests.Standalone\Linq2GraphQL.Tests.Standalone.csproj", "{DB460038-5D98-46AC-8551-5F928C2EC76A}"
+EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.Console", "test\Linq2GraphQL.Console\Linq2GraphQL.Console.csproj", "{058B468F-CE72-4CFF-8847-87CEED642C4E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.Agent.Sample", "test\Linq2GraphQL.Agent.Sample\Linq2GraphQL.Agent.Sample.csproj", "{6E3C2B71-4D8A-4F1E-9B57-2A9C0D4E8F13}"
@@ -92,6 +96,14 @@ Global
{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B6FCB2DB-88F4-44DD-8A77-4675AA6E8D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6FCB2DB-88F4-44DD-8A77-4675AA6E8D60}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B6FCB2DB-88F4-44DD-8A77-4675AA6E8D60}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B6FCB2DB-88F4-44DD-8A77-4675AA6E8D60}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB460038-5D98-46AC-8551-5F928C2EC76A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB460038-5D98-46AC-8551-5F928C2EC76A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB460038-5D98-46AC-8551-5F928C2EC76A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB460038-5D98-46AC-8551-5F928C2EC76A}.Release|Any CPU.Build.0 = Release|Any CPU
{058B468F-CE72-4CFF-8847-87CEED642C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{058B468F-CE72-4CFF-8847-87CEED642C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{058B468F-CE72-4CFF-8847-87CEED642C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -135,6 +147,8 @@ Global
{F0D6061C-3D3F-4323-AE4F-39737F5E2247} = {3D9B8FE2-6906-4190-9AB4-845BAB6E403C}
{C1908816-34E7-4B41-9E39-2283C59DB017} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
{8083E0AF-8429-4EA1-9BC9-8B6EE5EFB9B2} = {3D9B8FE2-6906-4190-9AB4-845BAB6E403C}
+ {B6FCB2DB-88F4-44DD-8A77-4675AA6E8D60} = {1F4F9593-3C19-4C2E-AF8C-C269659AA12A}
+ {DB460038-5D98-46AC-8551-5F928C2EC76A} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
{058B468F-CE72-4CFF-8847-87CEED642C4E} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
{6E3C2B71-4D8A-4F1E-9B57-2A9C0D4E8F13} = {5BE1963B-E57D-4CF5-B03E-644D8F39B4D2}
{C0E1A444-A834-4FC0-8436-38066EA8D37D} = {F646B02D-53FC-4C88-8941-2255A2F4DAF6}
diff --git a/README.md b/README.md
index bf245945..2366282f 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,7 @@ Usage:
-d --deprecated Include Deprecated as Obsolete
-sc --schema Schema file (SDL) to generate from instead of an endpoint
-ag --agent Agent mode: also emit the schema as SDL (see docs/design/agent-mode.md)
+ -sa --standalone Write a copy of the runtime into the output, see Standalone clients below
-cf --config Json settings file, see Configuration file below
As an example:
@@ -139,6 +140,7 @@ file is allowed to be absent.
| `nullable` | bool | `false` | `-nu`, `--nullable` |
| `deprecated` | bool | `false` | `-d`, `--deprecated` |
| `agent` | bool | `false` | `-ag`, `--agent` |
+| `standalone` | bool | `false` | `-sa`, `--standalone` |
| `scalarMappings` | object | none | *no equivalent* |
| `descriptionAttributes` | bool | `true` | *no equivalent* |
@@ -181,6 +183,25 @@ Scalar names are matched case insensitively. The target must be one of the suppo
(`System.Int64`). Anything else fails the run with an error rather than generating a client that does
not compile.
+### Standalone clients
+
+A generated client normally references the `Linq2GraphQL.Client` package, and an app gets one version
+of it however many clients it uses. When clients are shipped as packages of their own by different
+teams, an app that references clients made with different generator versions ends up with whichever
+runtime NuGet picks. With `--standalone` (`-sa`) the generator instead writes a copy of the runtime into
+`Runtime/` in the output, under the namespace `.Runtime`, so the client depends on nothing
+from Linq2GraphQL:
+
+ Linq2GraphQL https://spacex-production.up.railway.app/ -c="SpaceXClient" -n="SpaceX" -o="Generated" --standalone
+
+With `--agent` the copy also includes the agent tools from `Linq2GraphQL.Client.AI`, in
+`.Runtime.AI`. `Runtime/RuntimeInfo.cs` records the runtime version and the packages the
+copy needs, and the generator prints them as `PackageReference` lines to add instead of the
+Linq2GraphQL packages. Code using the client does not change; runtime types you name yourself
+(`GraphClientOptions`, `GraphQueryExecutionException`) come from `SpaceX.Runtime`. A runtime fix
+reaches the client only when you regenerate, and the `Runtime` folder is rewritten on every run (don't
+edit it).
+
## Add Nuget
Latest
diff --git a/docs/Linq2GraphQL.Docs/Pages/Generator.razor b/docs/Linq2GraphQL.Docs/Pages/Generator.razor
index 932f543b..78a7e811 100644
--- a/docs/Linq2GraphQL.Docs/Pages/Generator.razor
+++ b/docs/Linq2GraphQL.Docs/Pages/Generator.razor
@@ -29,6 +29,7 @@
-es, --enum-strategy | FailIfMissing | AddUnknownOption gives every enum an extra Unknown member, so values added to the schema later don't break deserialization. |
-d, --deprecated | false | Include deprecated fields and enum values, marked [Obsolete]. Without it they are left out. |
-ag, --agent | false | Agent mode, in preview: also emit the schema as SDL so Linq2GraphQL.Client.AI can expose it to AI agents. |
+ -sa, --standalone | false | Write a copy of the runtime into the output, so the client needs no Linq2GraphQL.Client package. See standalone clients. |
-cf, --config | linq2graphql.json | A json settings file, see below. |
@@ -86,6 +87,7 @@
nullable | bool | false | -nu, --nullable |
deprecated | bool | false | -d, --deprecated |
agent | bool | false | -ag, --agent |
+ standalone | bool | false | -sa, --standalone |
scalarMappings | object | none | no equivalent |
descriptionAttributes | bool | true | no equivalent |
@@ -153,6 +155,62 @@
+
+ Standalone clients
+
+ A generated client normally references the Linq2GraphQL.Client package, and an app gets one
+ version of that package however many clients it uses. That is a problem when clients are built and
+ shipped as packages of their own, by different teams: an app that references two clients made with
+ different generator versions ends up with whichever runtime NuGet picks, which may not be the one either
+ client was generated against.
+
+
+ With --standalone the generator writes a copy of the runtime next to the client instead,
+ under the namespace <namespace>.Runtime. The client then depends on nothing from
+ Linq2GraphQL, so any number of standalone clients, of any generator version, can live in one app, next to
+ clients that use the package.
+
+
+
+ The runtime lands in a Runtime folder in the output. Runtime/Subscriptions is
+ only written with --subscriptions, and Runtime/AI, a copy of the agent tools
+ from Linq2GraphQL.Client.AI, only with --agent. Runtime/RuntimeInfo.cs records the runtime
+ version the copy was taken from and the packages it needs, and the generator prints them as
+ PackageReference lines to add to the client's project, in place of
+ Linq2GraphQL.Client:
+
+
+
+ Code that uses the client does not change: AddSpaceXClient(), Select and
+ ExecuteAsync work as before. Runtime types you name yourself, such as
+ GraphClientOptions or GraphQueryExecutionException, come from
+ SpaceX.Runtime rather than Linq2GraphQL.Client. In agent mode,
+ AsAgentTools comes from SpaceX.Runtime.AI, so don't add the
+ Linq2GraphQL.Client.AI package either.
+
+ Things to know before choosing it:
+
+ -
+ A runtime fix reaches a standalone client only when the client is regenerated with a newer generator.
+ That is the point (each client keeps the runtime it was tested with), but nothing updates it for you.
+
+ -
+ Don't edit the files in
Runtime. The folder belongs to the generator and is deleted and
+ rewritten on every run, and turning standalone off removes it.
+
+ -
+ Each client has its own runtime types, so two standalone clients throw different
+
GraphQueryExecutionException types; catch each one in terms of its own client.
+
+ -
+ The packages the copy needs (
Microsoft.Extensions.*, Websocket.Client and,
+ in agent mode, GraphQL-Parser and Microsoft.Extensions.AI.Abstractions) are
+ still ordinary NuGet references, so an app gets one version of each. They keep to semantic
+ versioning, so the highest one requested works for every client.
+
+
+
+
@code {
private const string Usage = """
Linq2GraphQL [] [options]
@@ -178,6 +236,15 @@
Linq2GraphQL --config linq2graphql.json -o=SomewhereElse
""";
+ private const string Standalone = """
+ Linq2GraphQL https://spacex-production.up.railway.app/ -c=SpaceXClient -n=SpaceX -o=Generated --standalone
+ """;
+
+ private const string StandalonePackages = """
+
+
+ """;
+
private const string ConfigJson = """
{
"endpoint": "https://spacex-production.up.railway.app/",
diff --git a/scripts/regenerate-test-clients.ps1 b/scripts/regenerate-test-clients.ps1
index 14ca4728..068690e8 100644
--- a/scripts/regenerate-test-clients.ps1
+++ b/scripts/regenerate-test-clients.ps1
@@ -4,10 +4,11 @@
Regenerates the checked-in test clients from the test servers' live schemas.
.DESCRIPTION
- test/Linq2GraphQL.TestClient and test/Linq2GraphQL.TestClientNullable hold
- generated output that the test suite compiles against. Nothing in the normal
- build refreshes it, so it silently drifts whenever a template or the test
- schema changes.
+ test/Linq2GraphQL.TestClient, test/Linq2GraphQL.TestClientNullable and
+ test/Linq2GraphQL.TestClientStandalone (standalone mode, with its own copy of
+ the runtime) hold generated output that the test suites compile against.
+ Nothing in the normal build refreshes it, so it silently drifts whenever a
+ template, the runtime or the test schema changes.
This script boots each test server over plain HTTP, runs the generator
against it with the flags that produced the checked-in output, and writes
@@ -47,6 +48,15 @@ $clients = @(
Port = 5181
Nullable = $true
}
+ @{
+ Name = 'SampleClient'
+ Server = 'test/Linq2GraphQL.TestServer'
+ Output = 'test/Linq2GraphQL.TestClientStandalone/Generated'
+ Namespace = 'Linq2GraphQL.TestClientStandalone'
+ Port = 5182
+ Nullable = $false
+ Standalone = $true
+ }
)
function Wait-ForServer([string]$url, [System.Diagnostics.Process]$process) {
@@ -99,6 +109,7 @@ try {
'--agent=true'
)
if ($client.Nullable) { $arguments += '-nu=true' }
+ if ($client.Standalone) { $arguments += '--standalone=true' }
$sentinel = Join-Path $repoRoot "$($client.Output)/Client/$($client.Name).cs"
$generatedAt = Get-Date
@@ -131,7 +142,10 @@ try {
# so git status reports every regenerated file as modified even when its content is
# unchanged. git diff applies the same normalization git would apply on checkin, so
# it reports only real drift.
- $diff = @(git diff --stat -- @paths)
+ #
+ # The standalone client's RuntimeInfo.cs records the generator version, which changes with every
+ # commit; -I ignores a change made only of lines matching that one.
+ $diff = @(git diff --stat -I '^\s*public const string Version = ' -- @paths)
# git diff only compares tracked files, so a newly generated file needs its own check.
$added = @(git ls-files --others --exclude-standard -- @paths)
diff --git a/src/Linq2GraphQL.Client/GraphClient.cs b/src/Linq2GraphQL.Client/GraphClient.cs
index d340f105..b97f06b0 100644
--- a/src/Linq2GraphQL.Client/GraphClient.cs
+++ b/src/Linq2GraphQL.Client/GraphClient.cs
@@ -186,7 +186,9 @@ public async Task GetSchemaForSafeModeAsync(CancellationToken can
return null;
}
- var cacheKey = $"Linq2GraphQL_Schema:{HttpClient.BaseAddress}:{includeDeprecated}:{options.Value.SchemaCacheKey}";
+ // The schema type is part of the key: clients that carry their own copy of the runtime
+ // share the app's IMemoryCache but cannot read each other's GraphQLSchema.
+ var cacheKey = $"Linq2GraphQL_Schema:{typeof(GraphQLSchema).AssemblyQualifiedName}:{HttpClient.BaseAddress}:{includeDeprecated}:{options.Value.SchemaCacheKey}";
return await cache.GetOrCreateAsync(cacheKey, async entry =>
{
diff --git a/src/Linq2GraphQL.Generator/ClientGenerator.cs b/src/Linq2GraphQL.Generator/ClientGenerator.cs
index cb4eff5b..45cc8f85 100644
--- a/src/Linq2GraphQL.Generator/ClientGenerator.cs
+++ b/src/Linq2GraphQL.Generator/ClientGenerator.cs
@@ -19,7 +19,8 @@ public class ClientGenerator(
bool includeDeprecated,
IReadOnlyDictionary scalarMappings = null,
bool descriptionAttributes = true,
- bool agent = false)
+ bool agent = false,
+ bool standalone = false)
{
private static readonly Dictionary EmptyScalarMappings = new();
@@ -239,6 +240,17 @@ private List Generate(RootSchema rootSchema)
fileName = clientName + "Extensions" + ".cs";
AddFile(clientDirName, fileName, clientExtensionsTemplateText);
+ if (standalone)
+ {
+ Console.WriteLine("Generate Runtime (standalone)...");
+ foreach (var entry in entries)
+ {
+ entry.Content = StandaloneRuntime.RewriteNamespaces(entry.Content, namespaceName);
+ }
+
+ entries.AddRange(StandaloneRuntime.GetFiles(namespaceName, includeSubscriptions, agent));
+ }
+
return entries;
}
diff --git a/src/Linq2GraphQL.Generator/GeneratorConfig.cs b/src/Linq2GraphQL.Generator/GeneratorConfig.cs
index 6fb945c1..f04faead 100644
--- a/src/Linq2GraphQL.Generator/GeneratorConfig.cs
+++ b/src/Linq2GraphQL.Generator/GeneratorConfig.cs
@@ -56,6 +56,12 @@ public class GeneratorConfig
///
public bool? Agent { get; set; }
+ ///
+ /// Standalone: write a copy of the runtime into the output instead of depending on the
+ /// Linq2GraphQL.Client packages.
+ ///
+ public bool? Standalone { get; set; }
+
///
/// Emit [Description] attributes from schema descriptions. On by default; set to false to
/// opt out. Settings file only, there is no command line flag for it.
diff --git a/src/Linq2GraphQL.Generator/Linq2GraphQL.Generator.csproj b/src/Linq2GraphQL.Generator/Linq2GraphQL.Generator.csproj
index 209307b2..82496202 100644
--- a/src/Linq2GraphQL.Generator/Linq2GraphQL.Generator.csproj
+++ b/src/Linq2GraphQL.Generator/Linq2GraphQL.Generator.csproj
@@ -71,4 +71,41 @@
+
+
+
+
+
+
+
+
+
+
+ $(IntermediateOutputPath)PackageVersions.g.cs
+
+
+ <_PackageVersionLine Include="@(PackageVersion->' ["%(Identity)"] = "%(Version)",')"/>
+
+
+
+
+
+
+
+
diff --git a/src/Linq2GraphQL.Generator/Program.cs b/src/Linq2GraphQL.Generator/Program.cs
index e8dd1451..69950adc 100644
--- a/src/Linq2GraphQL.Generator/Program.cs
+++ b/src/Linq2GraphQL.Generator/Program.cs
@@ -28,6 +28,9 @@ private static async Task Main(string[] args)
"Schema file (SDL) to generate from instead of an endpoint, relative to current location");
var agent = new Option(new[] { "--agent", "-ag" },
"Agent mode: also emit the schema as SDL and implement IGraphSchemaSource on the client");
+ var standalone = new Option(new[] { "--standalone", "-sa" },
+ "Standalone: write a copy of the runtime into the output (namespace .Runtime) instead of " +
+ "depending on the Linq2GraphQL.Client packages");
var rootCommand = new RootCommand("Generate GraphQL client")
{
@@ -42,7 +45,8 @@ private static async Task Main(string[] args)
nullable,
includeDeprecated,
schemaFile,
- agent
+ agent,
+ standalone
};
rootCommand.SetHandler(async context =>
@@ -70,10 +74,11 @@ private static async Task Main(string[] args)
var descriptionAttributesValue = config.DescriptionAttributes ?? true;
var agentValue = Resolve(result, agent, config.Agent, false);
+ var standaloneValue = Resolve(result, standalone, config.Standalone, false);
await GenerateClientAsync(uriValue, schemaFileValue, outputFolderValue, namespaceValue, clientNameValue,
includeSubscriptionsValue, authTokenValue, enumStrategyValue, nullableValue, deprecatedValue,
- scalarMappings, descriptionAttributesValue, agentValue);
+ scalarMappings, descriptionAttributesValue, agentValue, standaloneValue);
}
catch (GeneratorConfigurationException ex)
{
@@ -156,7 +161,8 @@ private static Uri ResolveEndpoint(ParseResult result, Argument argument, s
private static async Task GenerateClientAsync(Uri uri, string schemaFile, string outputFolder, string namespaceName, string name,
bool includeSubscriptions, string authToken, string enumStrategy, bool nullable, bool includeDeprecated,
- IReadOnlyDictionary scalarMappings, bool descriptionAttributes, bool agent)
+ IReadOnlyDictionary scalarMappings, bool descriptionAttributes, bool agent,
+ bool standalone)
{
var enumStrat = enumStrategy != null &&
enumStrategy.Equals("AddUnknownOption", StringComparison.InvariantCultureIgnoreCase)
@@ -164,7 +170,7 @@ private static async Task GenerateClientAsync(Uri uri, string schemaFile, string
: EnumGeneratorStrategy.FailIfMissing;
var generator = new ClientGenerator(namespaceName, name, includeSubscriptions, enumStrat, nullable,
- includeDeprecated, scalarMappings, descriptionAttributes, agent);
+ includeDeprecated, scalarMappings, descriptionAttributes, agent, standalone);
List entries;
if (schemaFile != null)
{
@@ -184,6 +190,15 @@ private static async Task GenerateClientAsync(Uri uri, string schemaFile, string
var outputPath = Path.GetFullPath(outputFolder, Environment.CurrentDirectory);
Console.WriteLine($"Output path is set to: {outputPath}");
+
+ // A runtime copy from an earlier standalone run is the generator's own output: clear it, so files
+ // dropped from the runtime do not linger and turning standalone off does not leave a second runtime.
+ var runtimePath = Path.Combine(outputPath, StandaloneRuntime.DirectoryName);
+ if (File.Exists(Path.Combine(runtimePath, StandaloneRuntime.InfoFileName)))
+ {
+ Directory.Delete(runtimePath, true);
+ }
+
foreach (var dirName in entries.GroupBy(e => e.DirectoryName))
{
var directory = Path.Combine(outputPath, dirName.Key);
@@ -195,5 +210,16 @@ private static async Task GenerateClientAsync(Uri uri, string schemaFile, string
await File.WriteAllTextAsync(filePath, entry.Content.ReplaceLineEndings("\n"));
}
}
+
+ if (standalone)
+ {
+ Console.WriteLine("");
+ Console.WriteLine($"Standalone: runtime {StandaloneRuntime.Version} written to {runtimePath}. " +
+ "Don't reference the Linq2GraphQL.Client packages; the project needs:");
+ foreach (var (packageName, version) in StandaloneRuntime.GetPackages(includeSubscriptions, agent))
+ {
+ Console.WriteLine($" ");
+ }
+ }
}
}
diff --git a/src/Linq2GraphQL.Generator/StandaloneRuntime.cs b/src/Linq2GraphQL.Generator/StandaloneRuntime.cs
new file mode 100644
index 00000000..21a8ca24
--- /dev/null
+++ b/src/Linq2GraphQL.Generator/StandaloneRuntime.cs
@@ -0,0 +1,151 @@
+using System.Reflection;
+using System.Text.RegularExpressions;
+
+namespace Linq2GraphQL.Generator;
+
+///
+/// Standalone mode: instead of depending on the Linq2GraphQL.Client packages, the generated client carries
+/// its own copy of the runtime under <namespace>.Runtime. Clients generated by different
+/// generator versions can then be used in the same app, because each one brings the runtime it was
+/// generated against. The runtime source is embedded in the generator at build time.
+///
+internal static class StandaloneRuntime
+{
+ ///
+ /// The output folder the runtime is written to. The generator owns it: it is cleared before every run,
+ /// so files removed from the runtime do not linger.
+ ///
+ public const string DirectoryName = "Runtime";
+
+ ///
+ /// Written into in standalone mode. Its presence is what marks a Runtime
+ /// folder as the generator's to clear.
+ ///
+ public const string InfoFileName = "RuntimeInfo.cs";
+
+ private const string ResourcePrefix = DirectoryName + "/";
+ private const string SubscriptionsPrefix = ResourcePrefix + "Subscriptions/";
+ private const string AgentPrefix = ResourcePrefix + "AI/";
+
+ private static readonly Regex RuntimeNamespace = new(@"\bLinq2GraphQL\.Client\b", RegexOptions.Compiled);
+
+ private static readonly string[] ClientPackages = ["Microsoft.Extensions.Caching.Memory", "Microsoft.Extensions.Http"];
+ private static readonly string[] SubscriptionsPackages = ["Websocket.Client"];
+ private static readonly string[] AgentPackages = ["GraphQL-Parser", "Microsoft.Extensions.AI.Abstractions"];
+
+ ///
+ /// The runtime project has ImplicitUsings enabled, the project the copy lands in might not.
+ ///
+ private static readonly string[] ImplicitUsings =
+ [
+ "System", "System.Collections.Generic", "System.IO", "System.Linq", "System.Net.Http", "System.Threading",
+ "System.Threading.Tasks"
+ ];
+
+ public static string Version { get; } =
+ typeof(StandaloneRuntime).Assembly.GetCustomAttribute()
+ ?.InformationalVersion.Split('+')[0] ?? "unknown";
+
+ public static string GetRuntimeNamespace(string namespaceName) => namespaceName + ".Runtime";
+
+ ///
+ /// Points every reference to the runtime packages' namespaces at the copy.
+ ///
+ public static string RewriteNamespaces(string content, string namespaceName) =>
+ RuntimeNamespace.Replace(content, GetRuntimeNamespace(namespaceName));
+
+ ///
+ /// The packages the copied runtime needs, with the versions it was built against.
+ ///
+ public static IReadOnlyList<(string Name, string Version)> GetPackages(bool includeSubscriptions, bool includeAgent) =>
+ ClientPackages
+ .Concat(includeSubscriptions ? SubscriptionsPackages : [])
+ .Concat(includeAgent ? AgentPackages : [])
+ .Select(e => (e, PackageVersions.All.GetValueOrDefault(e, "unknown")))
+ .ToList();
+
+ ///
+ /// The runtime files: Client always, Subscriptions with subscriptions, and the agent tools
+ /// (Linq2GraphQL.Client.AI) for a client generated in agent mode.
+ ///
+ public static IEnumerable GetFiles(string namespaceName, bool includeSubscriptions, bool includeAgent)
+ {
+ var assembly = typeof(StandaloneRuntime).Assembly;
+
+ // RecursiveDir in the resource name uses the build machine's path separator.
+ var resources = assembly.GetManifestResourceNames()
+ .Select(e => (Resource: e, Path: e.Replace('\\', '/')))
+ .Where(e => e.Path.StartsWith(ResourcePrefix, StringComparison.Ordinal))
+ .Where(e => includeSubscriptions || !e.Path.StartsWith(SubscriptionsPrefix, StringComparison.Ordinal))
+ .Where(e => includeAgent || !e.Path.StartsWith(AgentPrefix, StringComparison.Ordinal))
+ .OrderBy(e => e.Path, StringComparer.Ordinal);
+
+ foreach (var (resource, path) in resources)
+ {
+ using var stream = assembly.GetManifestResourceStream(resource);
+ using var reader = new StreamReader(stream);
+ var source = reader.ReadToEnd().TrimStart('');
+
+ yield return new FileEntry
+ {
+ DirectoryName = Path.GetDirectoryName(path).Replace('\\', '/'),
+ FileName = Path.GetFileName(path),
+ Content = Header + MissingImplicitUsings(source) + RewriteNamespaces(source, namespaceName)
+ };
+ }
+
+ yield return new FileEntry
+ {
+ DirectoryName = DirectoryName, FileName = InfoFileName, Content = InfoFile(namespaceName, includeSubscriptions, includeAgent)
+ };
+ }
+
+ private const string Header = """
+ //---------------------------------------------------------------------
+ //
+ // 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
+
+ """;
+
+ private static string MissingImplicitUsings(string source)
+ {
+ var missing = ImplicitUsings
+ .Where(e => !Regex.IsMatch(source, $@"^\s*using {Regex.Escape(e)};", RegexOptions.Multiline))
+ .Select(e => $"using {e};\n");
+
+ return string.Concat(missing);
+ }
+
+ private static string InfoFile(string namespaceName, bool includeSubscriptions, bool includeAgent)
+ {
+ var packages = string.Join("\n", GetPackages(includeSubscriptions, includeAgent)
+ .Select(e => $"/// - {e.Name} {e.Version}
"));
+
+ return $$"""
+ //---------------------------------------------------------------------
+ //
+ // Written by the Linq2GraphQL generator in standalone mode.
+ // Please don't edit this file - regenerate instead.
+ //---------------------------------------------------------------------
+
+ namespace {{GetRuntimeNamespace(namespaceName)}};
+
+ ///
+ /// The Linq2GraphQL runtime this copy was taken from. It needs these packages:
+ ///
+ {{packages}}
+ ///
+ ///
+ public static class RuntimeInfo
+ {
+ public const string Version = "{{Version}}";
+ }
+
+ """;
+ }
+}
diff --git a/test/Linq2GraphQL.TestClientStandalone/Generated/Client/MutationMethods.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Client/MutationMethods.cs
new file mode 100644
index 00000000..cf2fd928
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+///
+/// 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.TestClientStandalone/Generated/Client/QueryMethods.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Client/QueryMethods.cs
new file mode 100644
index 00000000..b104c05f
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+///
+/// 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.TestClientStandalone/Generated/Client/SampleClient.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Client/SampleClient.cs
new file mode 100644
index 00000000..b9d31a1c
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+///
+/// 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.TestClientStandalone/Generated/Client/SampleClientExtensions.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Client/SampleClientExtensions.cs
new file mode 100644
index 00000000..7abc0ec5
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Options;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+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.TestClientStandalone/Generated/Client/SampleClientSchema.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Client/SampleClientSchema.cs
new file mode 100644
index 00000000..1dda5edb
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone;
+
+///
+/// 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.TestClientStandalone/Generated/Client/SubscriptionMethods.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Client/SubscriptionMethods.cs
new file mode 100644
index 00000000..7d82b560
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+using Linq2GraphQL.TestClientStandalone.Runtime.Subscriptions;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+///
+/// 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.TestClientStandalone/Generated/Enums/AddressType.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Enums/AddressType.cs
new file mode 100644
index 00000000..32050e03
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+using System.ComponentModel;
+using System.Runtime.Serialization;
+using System.Text.Json.Serialization;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Enums/CustomerStatus.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Enums/CustomerStatus.cs
new file mode 100644
index 00000000..a4191df8
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+using System.ComponentModel;
+using System.Runtime.Serialization;
+using System.Text.Json.Serialization;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Enums/SortEnumType.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Enums/SortEnumType.cs
new file mode 100644
index 00000000..14f2ab61
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+using System.ComponentModel;
+using System.Runtime.Serialization;
+using System.Text.Json.Serialization;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/AddressFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/AddressFilterInput.cs
new file mode 100644
index 00000000..e3295203
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/AddressInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/AddressInput.cs
new file mode 100644
index 00000000..80e63cb1
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/AddressSortInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/AddressSortInput.cs
new file mode 100644
index 00000000..3fce4b68
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/CustomerFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/CustomerFilterInput.cs
new file mode 100644
index 00000000..d458f3a2
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/CustomerInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/CustomerInput.cs
new file mode 100644
index 00000000..9944ee4d
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/CustomerSortInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/CustomerSortInput.cs
new file mode 100644
index 00000000..15b56655
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/CustomerStatusOperationFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/CustomerStatusOperationFilterInput.cs
new file mode 100644
index 00000000..2026611d
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/DateTimeOperationFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/DateTimeOperationFilterInput.cs
new file mode 100644
index 00000000..08f755d4
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/DecimalOperationFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/DecimalOperationFilterInput.cs
new file mode 100644
index 00000000..2fae901e
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/FloatOperationFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/FloatOperationFilterInput.cs
new file mode 100644
index 00000000..bce88ad2
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/IAnimalFilterInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/IAnimalFilterInput.cs
new file mode 100644
index 00000000..8227219d
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/IAnimalSortInput.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/IAnimalSortInput.cs
new file mode 100644
index 00000000..712fbd08
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+[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.TestClientStandalone/Generated/Inputs/InputFactory.cs b/test/Linq2GraphQL.TestClientStandalone/Generated/Inputs/InputFactory.cs
new file mode 100644
index 00000000..aff3784b
--- /dev/null
+++ b/test/Linq2GraphQL.TestClientStandalone/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.TestClientStandalone.Runtime;
+
+namespace Linq2GraphQL.TestClientStandalone;
+
+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