From dc27a0cd9ba88747c43887cb3e2cf712bdb49f38 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Wed, 28 Jun 2017 13:50:05 -0700 Subject: [PATCH 1/2] Implement {save,remove}Locations resolver --- src/resolvers-cassandra/Edges.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/resolvers-cassandra/Edges.js b/src/resolvers-cassandra/Edges.js index 04036be..17d72a5 100644 --- a/src/resolvers-cassandra/Edges.js +++ b/src/resolvers-cassandra/Edges.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - // ---------------------------------------------------------------------------------- mutations + // ---------------------------------------------------------------------------------- mutations removeKeywords(args, res){ // eslint-disable-line no-unused-vars }, @@ -10,12 +10,22 @@ module.exports = { }, saveLocations(args, res){ // eslint-disable-line no-unused-vars + // this is now handled by spark: + // we get the coordinates of the geofence + // that is configured in the sitesettings table + // and use those to filter the twitter stream + return null; }, removeLocations(args, res){ // eslint-disable-line no-unused-vars + // this is now handled by spark: + // we get the coordinates of the geofence + // that is configured in the sitesettings table + // and use those to filter the twitter stream + return null; }, - // ------------------------------------------------------------------------------------ queries + // ------------------------------------------------------------------------------------ queries terms(args, res){ // eslint-disable-line no-unused-vars }, From 3e577271645f9dba7cf3218f1fb86b449c525004 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Wed, 28 Jun 2017 13:54:57 -0700 Subject: [PATCH 2/2] Provide feedback to user about API call --- src/resolvers-cassandra/Edges.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/resolvers-cassandra/Edges.js b/src/resolvers-cassandra/Edges.js index 17d72a5..7ed978d 100644 --- a/src/resolvers-cassandra/Edges.js +++ b/src/resolvers-cassandra/Edges.js @@ -10,19 +10,23 @@ module.exports = { }, saveLocations(args, res){ // eslint-disable-line no-unused-vars - // this is now handled by spark: - // we get the coordinates of the geofence - // that is configured in the sitesettings table - // and use those to filter the twitter stream - return null; + return new Promise((resolve, reject) => { // eslint-disable-line no-unused-vars + reject( + 'This API call is no longer supported. ' + + 'We now automatically filter events down to only those ' + + 'locations defined in the geo-fence for your site' + ); + }); }, removeLocations(args, res){ // eslint-disable-line no-unused-vars - // this is now handled by spark: - // we get the coordinates of the geofence - // that is configured in the sitesettings table - // and use those to filter the twitter stream - return null; + return new Promise((resolve, reject) => { // eslint-disable-line no-unused-vars + reject( + 'This API call is no longer supported. ' + + 'We now automatically filter events down to only those ' + + 'locations defined in the geo-fence for your site' + ); + }); }, // ------------------------------------------------------------------------------------ queries