publishResult = async (topicName, data) => {
  const dataBuffer = Buffer.from(JSON.stringify(data));

  pubsub.topic(topicName).publishMessage(dataBuffer);
}
Publishes the result to the given pubsub topic and returns a Promise.

@param {string} topicName Name of the topic on which to publish.
@param {object} data The message data to publish.