Skip to content

Commit 482ee44

Browse files
authored
Merge pull request #129 from Linq2GraphQL/docs/online-generator-standalone
Docs: standalone and agent options in the online generator; no focus ring on h1
2 parents fda2d0d + 08396d4 commit 482ee44

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

‎docs/Linq2GraphQL.Docs/Components/GenerateClient.razor‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
<Checkbox Switch @bind-Value="options.IncludeDeprecated"/>
4040
</DataGridItem>
4141

42+
<DataGridItem Title="Standalone">
43+
<Checkbox Switch @bind-Value="options.Standalone"/>
44+
</DataGridItem>
45+
46+
<DataGridItem Title="Agent mode (preview)">
47+
<Checkbox Switch @bind-Value="options.Agent"/>
48+
</DataGridItem>
49+
4250
</DataGrid>
4351

4452
<div class="mt-3"/>

‎docs/Linq2GraphQL.Docs/Components/GenerateClient.razor.cs‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.IO.Compression;
1+
using System.IO.Compression;
22
using Linq2GraphQL.Generator;
33
using Microsoft.AspNetCore.Components;
44
using Microsoft.AspNetCore.Components.Forms;
@@ -134,7 +134,8 @@ private async Task GenerateClientFromSchema()
134134

135135
isLoading = true;
136136
var generator = new ClientGenerator(options.Namespace, options.ClientName, options.IncludeSubscriptions,
137-
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated);
137+
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated,
138+
agent: options.Agent, standalone: options.Standalone);
138139
var entries = IsIntrospectionJson(options.Schema)
139140
? generator.Generate(options.Schema)
140141
: generator.GenerateFromSdl(options.Schema);
@@ -158,7 +159,8 @@ private async Task GenerateClientAsync()
158159
{
159160
isLoading = true;
160161
var generator = new ClientGenerator(options.Namespace, options.ClientName, options.IncludeSubscriptions,
161-
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated);
162+
options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated,
163+
agent: options.Agent, standalone: options.Standalone);
162164
var entries = await generator.GenerateAsync(new(options.Url), options.Token);
163165
await SaveEntriesAsync(entries);
164166
}
@@ -183,6 +185,8 @@ public class GenerateOptions
183185
public string Url { get; set; }
184186
public string Token { get; set; }
185187
public bool IncludeDeprecated { get; set; }
188+
public bool Standalone { get; set; }
189+
public bool Agent { get; set; }
186190
public EnumGeneratorStrategy EnumGeneratorStrategy { get; set; }
187191

188192
public string Schema { get; set; }

‎docs/Linq2GraphQL.Docs/wwwroot/css/app.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
color: #ff8383;
88
}
99

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

1115
#blazor-error-ui {
1216
background: lightyellow;

0 commit comments

Comments
 (0)