Can you query and use the query data in a mutation?

Due to another team requiring us to populate data in SmartSheet, I am trying to come up with a way to copy the latest Update for an item into a text field for exporting to SmartSheet. Currently, the people on the team cut and paste the latest comment into a text column. At this time, we can use any 3rd party integration tools.

I’ve confirmed I can query updates(limit: 1) {text_body} and pull the last update for any item.

I’ve confirmed I can update a text field with a value.

Is it possible to use GraphQL in one motion and query for the text_body from the Update and mutate copy the text to a custom column?

While retrieving data
Store item # and last update text_body to variables
Update the custom text field with text_body (would actually like to concatenate with created_at) where item # is …
Run until no more data is being retrieved

-or- do it all in a single mutation query?


Hello @BruceB !

Your process is correct. There is no way of retrieving the information and changing the column value using only one request.

You need one query and one mutation then.