Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/Linq2GraphQL.Docs/Components/GenerateClient.razor
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
<Checkbox Switch @bind-Value="options.IncludeDeprecated"/>
</DataGridItem>

<DataGridItem Title="Standalone">
<Checkbox Switch @bind-Value="options.Standalone"/>
</DataGridItem>

<DataGridItem Title="Agent mode (preview)">
<Checkbox Switch @bind-Value="options.Agent"/>
</DataGridItem>

</DataGrid>

<div class="mt-3"/>
Expand Down
10 changes: 7 additions & 3 deletions docs/Linq2GraphQL.Docs/Components/GenerateClient.razor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.IO.Compression;
using System.IO.Compression;
using Linq2GraphQL.Generator;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
Expand Down Expand Up @@ -134,7 +134,8 @@ private async Task GenerateClientFromSchema()

isLoading = true;
var generator = new ClientGenerator(options.Namespace, options.ClientName, options.IncludeSubscriptions,
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated);
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated,
agent: options.Agent, standalone: options.Standalone);
var entries = IsIntrospectionJson(options.Schema)
? generator.Generate(options.Schema)
: generator.GenerateFromSdl(options.Schema);
Expand All @@ -158,7 +159,8 @@ private async Task GenerateClientAsync()
{
isLoading = true;
var generator = new ClientGenerator(options.Namespace, options.ClientName, options.IncludeSubscriptions,
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated);
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated,
agent: options.Agent, standalone: options.Standalone);
var entries = await generator.GenerateAsync(new(options.Url), options.Token);
await SaveEntriesAsync(entries);
}
Expand All @@ -183,6 +185,8 @@ public class GenerateOptions
public string Url { get; set; }
public string Token { get; set; }
public bool IncludeDeprecated { get; set; }
public bool Standalone { get; set; }
public bool Agent { get; set; }
public EnumGeneratorStrategy EnumGeneratorStrategy { get; set; }

public string Schema { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions docs/Linq2GraphQL.Docs/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
color: #ff8383;
}

/* FocusOnNavigate focuses the page's h1 for screen readers; don't draw a focus ring around it. */
h1:focus {
outline: none;
}

#blazor-error-ui {
background: lightyellow;
Expand Down
Loading