Skip to content

Commit 1a35989

Browse files
authored
Update README.md
Added note on using `byte[]` in variables (see #163)
1 parent 673ccaa commit 1a35989

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ var heroAndFriendsRequest = new GraphQLRequest {
4343
};
4444
```
4545

46+
Be careful when using `byte[]` in your variables object, as most JSON serializers will treat that as binary data! If you really need to send a *list of bytes* with a `byte[]` as a source, then convert it to a `List<byte>` first, which will tell the serializer to output a list of numbers instead of a base64-encoded string.
47+
4648
### Execute Query/Mutation:
4749
```csharp
4850
var graphQLClient = new GraphQLHttpClient("https://swapi.apis.guru/");
@@ -62,6 +64,8 @@ var graphQLResponse = await graphQLClient.SendQueryAsync<HeroAndFriendsResponse>
6264
var heroName = graphQLResponse.Data.Hero.Name;
6365
```
6466

67+
68+
6569
### Use Subscriptions
6670

6771
```csharp

0 commit comments

Comments
 (0)