Skip to content
This repository has been archived by the owner. It is now read-only.

Remove usage of MessagesSchema byLocations endpoint #10

Merged
merged 3 commits into from Aug 9, 2017

Conversation

Projects
None yet
3 participants
@c-w
Copy link
Member

commented Jul 28, 2017

In Fortis-V1, when the user selects the filter terms, we have a distinction between keywords (like "Isis" or "Bomb") and locations (like "Syria" or "Benghazi"): if we query for all events that contain a keyword, we'll match the keyword in the text, if we query for all events that contain a location, we instead match for the location's coordinates in the event's metadata.

In Fortis-V2, we no longer support this distinction as it's much easier to just treat keywords and locations the same by just using the locations' name as an additional keyword for which to query.

As a result, we need to remove the usage of the MessagesSchema byLocations endpoint in the GraphGL client. Note that the change of deprecating this endpoint has already been made on the GraphQL service, in the branch https://github.com/CatalystCode/project-fortis-services/tree/implement-tiles-resolver

Remove usage of byLocations endpoint
In Fortis-V1, when the user selects the filter terms, we have a
distinction between keywords (like "Isis" or "Bomb") and locations (like
"Syria" or "Benghazi"): if we query for all events that contain a
keyword, we'll match the keyword in the text, if we query for all events
that contain a location, we instead match for the location's coordinates
in the event's metadata.

In Fortis-V2, we no longer support this distinction as it's much easier
to just treat keywords and locations the same by just using the
locations' name as an additional keyword for which to query.

As a result, we need to remove the usage of the MessagesSchema
byLocations endpoint in the GraphGL client. Note that the change of
deprecating this endpoint has already been made on the GraphQL service,
in the branch:
https://github.com/CatalystCode/project-fortis-services/tree/implement-tiles-resolver

@c-w c-w requested a review from erikschlegel Jul 28, 2017

@c-w c-w changed the title Remove usage of byLocations endpoint Remove usage of MessagesSchema byLocations endpoint Jul 28, 2017

c-w added a commit that referenced this pull request Jul 28, 2017

Remove usage of TilesSchema byLocations endpoints
This is a sister-change to pull request
#10, see
the the description of that change for further information.
@Smarker

Smarker approved these changes Aug 7, 2017

Copy link
Contributor

left a comment

LGTM - with comments


SERVICES.FetchMessageSentences(siteKey, originalSource, bbox, datetimeSelection, timespanType,
limit, offset, edges, DEFAULT_LANGUAGE, Actions.DataSources(filteredSource),
categoryValue?categoryValue.name.toLowerCase():categoryValue, searchValue, location, callback);
categoryValue?categoryValue.name.toLowerCase():categoryValue, searchValue, undefined, callback);

This comment has been minimized.

Copy link
@Smarker

Smarker Aug 7, 2017

Contributor

I'm hesitant to pass in undefined as a parameter, since this might introduce new errors. Would there be a way to change the signature of this so it doesn't take a location parameter?

This comment has been minimized.

Copy link
@c-w

c-w Aug 7, 2017

Author Member

I usually like keeping changes minimal to keep risk low, but sure. Done in 0f94c6b.

This comment has been minimized.

Copy link
@Smarker

Smarker Aug 7, 2017

Contributor

yea makes sense

@Smarker

Smarker approved these changes Aug 7, 2017

Copy link
Contributor

left a comment

LGTM

@erikschlegel
Copy link
Collaborator

left a comment

LGTM with one minor question below.

@@ -704,23 +704,13 @@ export const SERVICES = {

let query, variables;

if (coordinates && coordinates.length === 2) {
query = ` ${fragmentView}
query ByLocation($site: String!, $originalSource: String, $coordinates: [Float]!, $filteredEdges: [String]!, $langCode: String!, $limit: Int!, $offset: Int!, $fromDate: String!, $toDate: String!, $sourceFilter: [String], $fulltextTerm: String) {

This comment has been minimized.

Copy link
@erikschlegel

erikschlegel Aug 9, 2017

Collaborator

why are we getting rid of ByLocation? This is used when you select a place from the popular locations donut chart.

This comment has been minimized.

Copy link
@c-w

c-w Aug 9, 2017

Author Member

Let me merge this and then I'll have to revert this and #11 which already got merged.

@c-w c-w merged commit 77f16ee into master Aug 9, 2017

@c-w c-w deleted the remove-bylocations branch Aug 9, 2017

c-w added a commit that referenced this pull request Aug 9, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.