-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a04eb70
commit b8614c2
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"); | ||
|
@@ -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()); | ||
|
@@ -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 | ||
{ | ||
|
@@ -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; | ||
} | ||
|