Skip to content

Commit 80fb7f3

Browse files
authored
Merge pull request #27 from Linq2GraphQL/interface-demo
Added interface Sample
2 parents 4637c25 + 401eeac commit 80fb7f3

8 files changed

Lines changed: 63 additions & 22 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@inherits SampleBase
2+
3+
4+
<SamplesViewer TypeFullName="@GetTypeFullName()" Title="Query interface" QueryExecute="GetQuery()">
5+
<Description>
6+
7+
</Description>
8+
</SamplesViewer>
9+
10+
11+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Linq2GraphQL.Client;
2+
using StarWars.Client;
3+
4+
namespace Linq2GraphQL.Docs.Components.Samples.Interfaces
5+
{
6+
public partial class InterfaceQuery
7+
{
8+
private GraphQueryExecute<Node, Node> GetQuery()
9+
{
10+
return starWarsClient
11+
.Query
12+
.Node("ZmlsbXM6MQ==")
13+
.Include(e => e.Film())
14+
.Select();
15+
}
16+
}
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@page "/samples/interfaces"
2+
@using Linq2GraphQL.Client;
3+
@using StarWars.Client;
4+
5+
@inject StarWarsClient starWarsClient
6+
7+
<h3>Interface Samples</h3>
8+
9+
<InterfaceQuery />
10+
11+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@page "/samples/queries"
2+
@using Linq2GraphQL.Client;
3+
@using StarWars.Client;
4+
5+
@inject StarWarsClient starWarsClient
6+
7+
<h3>Query Samples</h3>
8+
9+
<BasicQuery />
10+
<ProjectCustomObject />
11+
<SelectMany />
12+
13+

docs/Linq2GraphQL.Docs/Components/Samples/Queries/SelectMany.razor

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
@inherits SampleBase;
22

33

4-
<SamplesViewer Title="Select many" QueryExecute="GetQuery()" TypeFullName="@GetTypeFullName()" >
4+
<SamplesViewer Title="Select many" QueryExecute="GetQuery()" TypeFullName="@GetTypeFullName()" />
55

66

7-
</SamplesViewer>
87

98

109

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

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/Linq2GraphQL.Docs/Shared/MainNavigation.razor

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Navbar Background="NavbarBackground.Dark" Direction="NavbarDirection.Vertical">
22

33
<a href="https://github.com/linq2graphql/linq2graphql.client" class="navbar-brand navbar-brand-autodark">
4-
4+
55
<h2 class="text-secondary">Linq2GraphQL</h2>
66
</a>
77

@@ -18,11 +18,17 @@
1818
</MenuItemIcon>
1919
</NavbarMenuItem>
2020

21-
<NavbarMenuItem Href="samples" Text="Samples">
21+
<NavbarMenuItem Text="Samples">
2222
<MenuItemIcon>
2323
<Icon class="icon" IconType="@Icons.Eye_exclamation" />
2424
</MenuItemIcon>
25+
26+
<SubMenu>
27+
<NavbarMenuItem Href="samples/queries" Text="Queries" />
28+
<NavbarMenuItem Href="samples/interfaces" Text="Interfaces" />
29+
</SubMenu>
30+
2531
</NavbarMenuItem>
2632

27-
</NavbarMenu>
28-
</Navbar>
33+
</NavbarMenu>
34+
</Navbar>

src/Linq2GraphQL.Client/QueryExecutor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ internal async Task<T> ExecuteRequestAsync(string alias, GraphQLRequest graphReq
2828
}
2929

3030
var con = await response.Content.ReadAsStringAsync();
31-
Console.WriteLine(con);
3231
return ProcessResponse(con, alias, graphRequest.Query);
3332
}
3433

0 commit comments

Comments
 (0)