File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" />
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 */
You can’t perform that action at this time.
0 commit comments