Changed getGraph() parameter to be a JSONArray