worldcoin / developer-portal

The Worldcoin Developer Portal provides tools to interact with the Worldcoin SDK. Easiest way to get started with World ID.
https://developer.worldcoin.org
MIT License
59 stars 31 forks source link

[fix] Ordering of rankings #706

Closed andy-t-wang closed 2 months ago

andy-t-wang commented 3 months ago

Fix the ordering of rankings. Updated the tests to cover this. Previously only had one example so didn't notice that graphql was returning the apps out of order

Also added an enforcement that the platform and country has only one. I chose not to make a computed field here and upsert on it because the flow for making rankings should be that they first fetch the existing ranking. Thus we should know that there exists a ranking or not. And based on documentation if we know the column is not present we should not upsert