def getNode(globalId, *args): resolvedGlobalId = fromGlobalId(globalId) _type, _id = resolvedGlobalId.type, resolvedGlobalId.id if _type == 'User': return userData[_id] else: return photoData[_id]
def getNode(globalId, *args): resolvedGlobalId = fromGlobalId(globalId) _type, _id = resolvedGlobalId.type, resolvedGlobalId.id if _type == 'Faction': return getFaction(_id) elif _type == 'Ship': return getShip(_id) else: return None