You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
15
+
16
+
Linq2GraphQL generates C# classes from the GraphQL schema and and togheter with the nuget package Linq2GraphQL.Client it
17
+
makes it possible to query the server using Linq expressions.
17
18
18
19
A simple query that will get the first 10 orders with the primitive properties of orders and the connected customer.
20
+
19
21
```cs
20
22
varorders=awaitsampleClient
21
23
.Query
@@ -26,6 +28,7 @@ var orders = await sampleClient
26
28
```
27
29
28
30
A example mutation where we add a new customer and return the Customer Id.
31
+
29
32
```cs
30
33
varcustomerId=awaitsampleClient
31
34
.Mutation
@@ -40,16 +43,19 @@ A example mutation where we add a new customer and return the Customer Id.
40
43
```
41
44
42
45
# Getting Started
46
+
43
47
## Generate Client code
48
+
44
49
There are two options to generate the client code from the GraphQL schema.
45
-
Use the online tool to <ahref="https://linq2graphql.com/generate-client"> generate</a> or install Linq2GraphQL.Generator as a tool.
50
+
Use the online tool to <ahref="https://linq2graphql.com/generate-client"> generate</a> or install
Would generate a client from url *https://spacex-production.up.railway.app/* with the name *SpaceXClient* in the namespace *SpaceX* to folder *Generated*
78
+
Would generate a client from url *https://spacex-production.up.railway.app/* with the name *SpaceXClient* in the
Turning on *SafeMode* will make the client before the first request to do an introspection query to the endpoint. The schema will be used to make sure that any auto included properties are available. This is an advanced feature that require the endpoint to support introspection. By default safe mode is turned of.
110
+
111
+
Turning on *SafeMode* will make the client before the first request to do an introspection query to the endpoint. The
112
+
schema will be used to make sure that any auto included properties are available. This is an advanced feature that
113
+
require the endpoint to support introspection. By default safe mode is turned of.
99
114
100
115
# Acknowledgments
101
-
Linq2GraphQL is inspired by [GraphQLinq](https://github.com/Giorgi/GraphQLinq) , thank you [Giorgi](https://github.com/Giorgi)
116
+
117
+
Linq2GraphQL is inspired by [GraphQLinq](https://github.com/Giorgi/GraphQLinq) , thank
118
+
you [Giorgi](https://github.com/Giorgi)
102
119
103
120
## Contributing
104
121
105
-
Are you a developer looking to contribute to this project? Please see our [Developer Guide](DEVELOPER.md) for comprehensive information about:
122
+
Are you a developer looking to contribute to this project? Please see our [Developer Guide](DEVELOPER.md) for
123
+
comprehensive information about:
106
124
107
125
- T4 template development workflow
108
126
- Code generation system architecture
@@ -112,7 +130,9 @@ Are you a developer looking to contribute to this project? Please see our [Devel
112
130
113
131
## Development Workflow
114
132
115
-
**⚠️ Important for Developers:** When modifying T4 templates (`.tt` files), you must manually regenerate the corresponding `.cs` files using Visual Studio's "Run Custom Tool" feature. See [DEVELOPER.md](DEVELOPER.md) for detailed instructions.
133
+
**⚠️ Important for Developers:** When modifying T4 templates (`.tt` files), you must manually regenerate the
134
+
corresponding `.cs` files using Visual Studio's "Run Custom Tool" feature. See [DEVELOPER.md](DEVELOPER.md) for detailed
135
+
instructions.
116
136
117
137
[](https://github.com/linq2graphql/linq2graphql.client/stargazers)
0 commit comments