Here is the JS style object that your column values should be, before going through JSON.dumps() (sorry I am not a python guy, I hope you can interpret).
{
requirements_gatherer : { personsAndTeams: [{id: "4616627", kind: "person"}]},
department: { labels: ["Information Technology"]}
}
Also, the value for PeopleValue
(which should be personsAndTeams
) you’re supplying looks to be a string, not an array of objects.
I see…
Thanks! It works now. Was trying the personsAndTeams Type as well but I realized I wrapped the entire array as a String so that cause it to not work.
On the side note… Would you happen to know why you don’t have to specify a type and some you do?
on line 99 you have to specify the type or it will throw an error. I’ve tried 4 with and without quotes and it and still an error. Only when the type is specified does it work.
However, i’m finding that you do not need to include the type for some of them. When do you need types and don’t need them?
Thanks!
That I don’t know a pattern to. It is annoying at times, but it is all documented somewhat:
GraphQL API
Creating an item can support a mix of objects and strings for the column values. There are three change column methods: simple, multiple, and one thats just change_column
. multiple and change_column use JSON, simple uses strings. Oddly, the create_item allows both strings and objects (all of which must be turned to JSON). No consistency at all.
certain column types support simple changes, other support both and some only support with objects. Its all by column type. See the column types reference to look at the example mutations if it shows a simple version it will take a string, if it shows JSON only you need to use an object that matches what they show serialized in the examples.
The lack of actual schemas for anything drives me nuts. I can look at the example mutations and figure it out but there isn’t a schema for any of the objects, so I can’t validate them when building them (officially at least).