Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasvandeweerdt committed Oct 15, 2023
1 parent a04eb70 commit b8614c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ DataList<Person> people = client.Get(query).Result;

### Mutations

#### Create a new person
#### Create a new person and return the `ID`
```csharp
CustomFieldCollection customFields = new();
customFields.AddOrUpdate("internal_reference", "an internal reference");
Expand All @@ -235,7 +235,7 @@ PersonCreateInput input = new() {
DoNotTranslateLanguages = new() { "en", "nl" }
};

PersonCreatePayload result = await client.Mutation(input, false);
PersonCreatePayload result = await client.Mutation(input, new PersonQuery().Select(PersonField.ID), false);
if (result.IsError())
{
Debug.WriteLine(result.Errors.ToString());
Expand All @@ -245,7 +245,7 @@ if (result.IsError())
Person newPerson = result.Person;
```

#### Updating an existing person
#### Updating an existing person and return the `ID`, `Name` and `Site`
```csharp
try
{
Expand All @@ -254,7 +254,7 @@ try
ID = "NG1lLnFhL1blcnNvbi8yMjMxSjIx",
Name = "Jimmy",
PrimaryEmail = "[email protected]",
}, true);
}, new PersonQuery().Select(PersonField.ID, PersonField.Name, PersonField.Site), true).Result;

Person updatedPerson = result.Person;
}
Expand Down

0 comments on commit b8614c2

Please sign in to comment.