Skip to content

Commit a685c43

Browse files
authored
Merge pull request #37 from Linq2GraphQL/support-list-in-list
Update Ducumentation
2 parents 5643494 + 131b224 commit a685c43

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

Linq2GraphQL.sln

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".items", ".items", "{7A8567
1010
.gitignore = .gitignore
1111
Directory.Build.props = Directory.Build.props
1212
nuget.config = nuget.config
13-
version.json = version.json
1413
README.md = README.md
14+
version.json = version.json
1515
EndProjectSection
1616
EndProject
1717
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Linq2GraphQL.TestServer", "test\Linq2GraphQL.TestServer\Linq2GraphQL.TestServer.csproj", "{AD8291B6-5979-4C43-B785-EAD4FF93C564}"
@@ -49,6 +49,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{884758A6-B
4949
EndProject
5050
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StarWars.Client", "docs\StarWars.Client\StarWars.Client.csproj", "{3C66EF43-E66D-46DE-B2BB-434E7FC20487}"
5151
EndProject
52+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1675748B-E070-4733-8660-B6DA86180398}"
53+
ProjectSection(SolutionItems) = preProject
54+
README.md = README.md
55+
EndProjectSection
56+
EndProject
5257
Global
5358
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5459
Debug|Any CPU = Debug|Any CPU

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Install/Update Tool:
6161
-c, --client <client> Name of the generated client [default: GraphQLClient]
6262
-t, --token <token> Bearertoken for authentication
6363
-s, --subscriptions Include subscriptions (Exprimental)
64-
-es --enum-strategy If AddUnknownOption all enums will have an additional Unknown option
64+
-es --enum-strategy If AddUnknownOption all enums will have an additional Unknown option
65+
-nu --nullabel Nullable client [default: false]
6566

6667
As an example:
6768

docs/Linq2GraphQL.Docs/Pages/Index.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<h2 id="generate-client-code">Generate Client code</h2>
3333
<p>
3434
There are two options to generate the client code from the GraphQL schema.
35-
Use the online tool to <a href="https://linq2graphql.com/generate-client"> generate</a> or install Linq2GraphQL.Generator as a tool.
35+
Use the online tool to <a href="https://linq2graphql.com/generate-client"> generate</a> or install Linq2GraphQL.Generator as a .Net tool.
3636
</p>
3737
<p>Install/Update Tool: </p>
3838
<pre><code>dotnet tool update Linq2GraphQL.Generator -g --prerelease
@@ -48,7 +48,9 @@ Options:
4848
-n, --namespace &lt;namespace&gt; Namespace of generated classes [default: YourNamespace]
4949
-c, --client &lt;client&gt; Name of the generated client [default: GraphQLClient]
5050
-t, --token &lt;token&gt; Bearertoken for authentication
51-
-s, --subscriptions Include subscriptions (Exprimental)
51+
-nu --nullabel Nullable client [default: false]
52+
-es --enum-strategy If AddUnknownOption all enums will have an additional Unknown option
53+
-s, --subscriptions Include subscriptions (Exprimental)
5254
</code></pre>
5355
<p>As an example:</p>
5456
<pre><code>Linq2GraphQL https://spacex-production.up.railway.app/ -c=&quot;SpaceXClient&quot; -n=&quot;SpaceX&quot; -o=&quot;Generated&quot;

test/Linq2GraphQL.Tests/QueryNullableTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,20 @@ public async Task GetCustomerNull()
3737

3838
Assert.Null(result);
3939
}
40+
41+
42+
[Fact]
43+
public async Task GetCustomerListInList()
44+
{
45+
var result = await nullableClient
46+
.Query
47+
.CustomerListInList()
48+
.Select()
49+
.ExecuteAsync();
50+
51+
TestClientNullable.Customer? customer = result.FirstOrDefault()?.FirstOrDefault();
52+
Assert.NotNull(customer);
53+
}
54+
4055
}
4156
}

0 commit comments

Comments
 (0)