Use variable as key in Ecto's select_merge

In Ecto 3 I could only get string keys to work. With an atom I was faced with

 Postgrex expected a binary, got :id.

See here.

Now it’s entirely possible that I’m missing something.

But it might be a good time to step back and re-examine the problem that lead you to needing to dynamically specify the key and see if there is an alternate way of solving it.