using angular $resource to make a REST call to our api rather than an $http call
separated out the query for a node's labels for cleaner code