Skip to content

Commit 535715a

Browse files
authored
Update README.md
1 parent 6e57786 commit 535715a

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,28 @@
1212
# Introduction
1313
Linq2GraphQL generates C# classes from the GraphQL schema and and togheter with the nuget package Linq2GraphQL.Client it makes it possible to query the server using Linq expressions.
1414

15-
A simple query that will get the first 10 orders with the primitive properties of orders and the connected customer
15+
A simple query that will get the first 10 orders with the primitive properties of orders and the connected customer.
1616

1717
var orders = await sampleClient
18-
.Query
18+
.Query
1919
.Orders(first: 10)
2020
.Include(e => e.Orders.Select(e => e.Customer))
2121
.Select(e => e.Orders)
2222
.ExecuteAsync();
2323

24+
A example mutation where we add a new customer and return the Customer Id.
25+
26+
var customerId = await sampleClient
27+
.Mutation
28+
.AddCustomer(new CustomerInput
29+
{
30+
CustomerId = Guid.NewGuid(),
31+
CustomerName = "New Customer",
32+
Status = CustomerStatus.Active
33+
})
34+
.Select(e=> e.CustomerId)
35+
.ExecuteAsync();
36+
2437

2538
# Getting Started
2639
## Generate Client code

0 commit comments

Comments
 (0)