mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-29 22:02:16 +02:00
Updated Request Matching GraphQLMatcher (markdown)
@@ -1,7 +1,8 @@
|
|||||||
## GraphQL Schema (GraphQLMatcher)
|
# GraphQL Schema (GraphQLMatcher)
|
||||||
Can be used to match a GraphQL Query or Mutation using GraphQAL Schema.
|
Can be used to match a GraphQL `Query` using GraphQL Schema (`MUtation` is not yet supported I think...)
|
||||||
|
|
||||||
#### C# option
|
## Define a mapping which includes a GraphQL Schema which should be used for matching the body:
|
||||||
|
### C#
|
||||||
```csharp
|
```csharp
|
||||||
var TestSchema = @"
|
var TestSchema = @"
|
||||||
input MessageInput {
|
input MessageInput {
|
||||||
@@ -45,7 +46,7 @@ server
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
#### JSON Mapping option
|
### JSON Mapping
|
||||||
``` json
|
``` json
|
||||||
{
|
{
|
||||||
"Guid": "5a36d1c1-11df-4976-90f9-22cae5dadb38",
|
"Guid": "5a36d1c1-11df-4976-90f9-22cae5dadb38",
|
||||||
@@ -72,3 +73,6 @@ server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Use / Test
|
||||||
|
When WireMock.Net is started (see above) with that GraphQL Schema, a client can send GraphQL
|
||||||
Reference in New Issue
Block a user