Skip to content

Commit e300724

Browse files
authored
Merge pull request #25 from Linq2GraphQL/docs-update
docs more docs
2 parents f6516f0 + d799a7a commit e300724

3 files changed

Lines changed: 13 additions & 17 deletions

File tree

docs/Linq2GraphQL.Docs/Components/Samples/SamplesViewer.razor

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
</div>
1414

1515

16-
<div style="max-height:200px">
17-
@((MarkupString)queryHtml)
18-
</div>
16+
@((MarkupString)queryHtml)
1917

2018
@if (isExpanded)
2119
{
2220
<Tabs @ref=tabs>
23-
21+
2422
<Tab Title="Query">
2523
<div style="height:300px">
2624
<StandaloneCodeEditor Id="@(id + "_query")" ConstructionOptions="QueryConstructionOptions" />

docs/Linq2GraphQL.Docs/Components/Samples/SamplesViewer.razor.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ namespace Linq2GraphQL.Docs.Components.Samples
1212
public partial class SamplesViewer<T, TResult>
1313
{
1414
private GraphQLRequest request;
15-
private string requestJson;
16-
15+
1716
[Inject] private HttpClient httpClient { get; set; }
1817
[Inject] private TablerService tablerService { get; set; }
1918

@@ -34,12 +33,8 @@ protected override async Task OnInitializedAsync()
3433
{
3534
jsonOptions.WriteIndented = true;
3635
await LoadCodeAsync();
37-
3836
request = await QueryExecute.GetRequestAsync();
39-
requestJson = JsonSerializer.Serialize(request, jsonOptions);
40-
41-
42-
37+
4338
await base.OnInitializedAsync();
4439
}
4540

@@ -59,6 +54,7 @@ private async Task LoadCodeAsync()
5954
catch (Exception ex)
6055
{
6156
queryHtml = FormatHtml($"Unable to get code: Error {ex.Message}");
57+
6258
}
6359
}
6460

@@ -67,7 +63,7 @@ private string FormatHtml(string source)
6763
{
6864
if (string.IsNullOrWhiteSpace(source))
6965
{
70-
source = "No Code....";
66+
source = @"No code..";
7167
}
7268

7369
var formatter = new HtmlClassFormatter();
@@ -99,14 +95,10 @@ private async Task ExecuteAsync()
9995
{
10096
isExecuting = true;
10197
await QueryExecute.ExecuteAsync();
102-
103-
104-
105-
10698
}
10799
catch (Exception ex)
108100
{
109-
101+
//TODO add error modal
110102
throw;
111103
}
112104
finally

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
color: #ff8383;
1616
}
1717

18+
.csharp {
19+
max-height: 300px;
20+
overflow: auto;
21+
margin-bottom: 0.5rem !important;
22+
padding:5px
23+
}
1824

1925
/*Monaco Editor*/
2026
.monaco-editor-container { /* for all editor instances */

0 commit comments

Comments
 (0)