threefoldtech / tfchain_graphql

Graphql for TFchain
Apache License 2.0
2 stars 3 forks source link

broken region information: all are set to unknown #149

Closed xmonader closed 5 months ago

xmonader commented 6 months ago

zos fetches the information from geoip service https://geoip.grid.tf

image

image

image

processor code https://github.com/threefoldtech/tfchain_graphql/blob/da00000dd87ceca477991fbab9c0934aebd1b3f5/scripts/init-countries.js#L63 image

so everything seems to be incheck, but graphql says otherwise

image

all of the records don't have the proper continent

sameh-farouk commented 6 months ago

This because init-countries.js gets countries from https://restcountries.com/v2/all and maps continent value to region and region value to subregion on our db. since the data served over this API have no continent filed at all. all regions on our db are set to default value "unknown region".

The mapping in init-countries.js should be corrected to:

sameh-farouk commented 6 months ago

Update: Fix merged

Screenshot from 2024-01-16 14-58-11

sameh-farouk commented 5 months ago

Verified on devnet

Screenshot_20240128_173618