Hi Heidi,
The relative clause "which is the capital of China" is not an extraneous piece of information in this sentence. In fact, it defines what Beijing is — the capital city of China.
If a relative clause is defining (or restrictive) because it provides essential information about the noun to which it refers, we do not put a comma before the relative pronoun.
On the other hand, if your sentence were different (e.g. "I went to Beijing, which is the capital of China, for a symposium"), the main idea would be your travelling to Beijing to attend a symposium. The fact that Beijing is a capital city is an additional piece of information.
A simple test would be to remove the additional piece of information and see if the meaning of the sentence remains intact. In this case, we would end up with "I went to Beijing for a symposium." The meaning remains intact; thus, it is a non-restrictive relative clause. Therefore, we use commas.
I hope this helps you.