vienna-project / recohub

build Github Repository Recommender Service
0 stars 0 forks source link

Github API ID's Inconsistency : Rest API <-> GraphQL API #5

Open craftsangjae opened 4 years ago

craftsangjae commented 4 years ago

Rest-API에서의 객체 ID가 integer로 구성되어 있고, graphQL API에서는 객체 ID가 문자열로 되어 있음. graphQL API의 문자열 ID은 base64로 인코딩되어 있기 때문.

graphQLID = 'MDEwOlJlcG9zaXRvcnkyODQ1NzgyMw=='
base64.decodebytes(graphQLID.encode()).decode('utf8')
# >>> 010:Repository28457823 
# (restAPI object ID)
craftsangjae commented 4 years ago

https://github.community/t/feature-request-get-rest-apis-id-from-graphql-node-id/13598