It may be a bit tedious to get the whole graph, but you can get most of the data from the experimental / unofficial Wikidata a> request API.
I suggest the following workflow:
Go to the instance of the objects you want to work with, say Estonia (Q191) and find your copy (P31), you will find: country, sovereign state, UN member, EU member, etc.
Use the Wikidata Query Query API Command to display each entity that as selected property P31. Let's try the country (Q6256) :
http://wdq.wmflabs.org/api?q=claim[31:6256]
It displays an array of numeric identifiers: your countries! (note that the result is still incomplete, as only 141 items were found: both countries are not on Wikidat or, as Nemo suggested in the comments, some countries can be found in countries (Q6256) subclasses (P279) )
50, :
https:
, (P150), .
tree. , (Q142), http://wdq.wmflabs.org/api?q=tree[142][150] Tadaaa, 36994 ! , , . , .
, (P279) (Q15284) ( ): , (Q484170),
http://wdq.wmflabs.org/api?q=tree[142][150] AND claim[31:484170]
: !