Only last generated query is displayed in panel

The following is created generating appropriate JSON and using the grafana API. I want both queries to be visible in the panel time series, but when I create it using the API, only the last (here name2) is displayed. If I remove the datasource2/name2 query and create it manually in the exact same way in the UI (I have compared the 2 JSON objects, they are the exact same), it works just fine, like this:
image

Any ideas of how I might fix this?

Welcome @drjones2

Does anything change in your original screenshot if you click the “Eye” icons on the far right?

image

If I do that for name1, nothing changes, if I disable name2 however and apply changes, only name1 is now shown.

Can you share the full queries you have written to plot this data? (I think you just need to click “Build”)

Thank you for pointing me in the right direction. The issue was that both queries had the same refId, which was “A”. Making these unique fixed the problem.