Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
jordrake committed May 1, 2024
1 parent 5e76ad1 commit bffa5a9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
14 changes: 13 additions & 1 deletion _snippets/graphql/create-thread.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,21 @@ mutation createThread($input: CreateThreadInput!) {
"labelTypeIds": ["lt_01HB924PME9C0YWKW1N4AK3BZA"],
"threadFields": [{
"key": "my_string_field",
"type": "ThreadFieldSchemaType.String",
"type": "STRING",
"stringValue": "any value",
}],
// You can also set other thread field types like boolean or enum.
// "threadFields": [{
// "key": "my_enum_field",
// "type": "ENUM",
// "stringValue": "any specified value",
// }],
//
// "threadFields": [{
// "key": "my_bool_field",
// "type": "BOOL",
// "booleanValue": true,
// }],
}
}
```
14 changes: 14 additions & 0 deletions _snippets/typescript-sdk/create-thread.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ const res = await client.createThread({
type: ThreadFieldSchemaType.String,
stringValue: 'any value',
}],

// You can also set other thread field types like boolean or enum.
// threadFields: [{
// key: 'my_enum_field',
// type: ThreadFieldSchemaType.Enum,
// stringValue: 'any specified value',
// }]
//
// threadFields: [{
// key: 'my_bool_field',
// type: ThreadFieldSchemaType.Bool,
// booleanValue: true,
// }],

});

if (res.error) {
Expand Down

0 comments on commit bffa5a9

Please sign in to comment.