Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Spatial filters #341

Merged
merged 13 commits into from
Nov 10, 2019
Merged

Spatial filters #341

merged 13 commits into from
Nov 10, 2019

Conversation

michaeldgraham
Copy link
Collaborator

This PR contains initial support for Point type spatial filtering. Given a Point type field named, for example, location, the filtering fields location, location_not, location_distance, location_distance_lt, location_distance_lte, location_distance_gt, location_distance_gte will now be generated.

To support the distance filters, the schema augmentation process now generates the following input object type definition,

input _Neo4jPointDistanceFilter {
  point: _Neo4jPointInput!
  distance: Float!
}

Tests

The following tests have been added to filterTck.md:

Spatial field equal to given value
Spatial field different from given value
Spatial field distance with given Point value equal to given value
Spatial field distance with given Point value less than given value
Spatial field distance with given Point value less than or equal to given value
Spatial field distance with given Point value greater than given value
Spatial field distance with given Point value greater than or equal to given value
Spatial field exists
Spatial field does NOT exist
Spatial fields on relationship exist
Spatial field does NOT exist on related node
Spatial field on related node equal to given value
Spatial field on related node equal to given year OR does NOT exist
Spatial and scalar field on relationship match given logical AND filters

The following tests have been added to integration.test.js:

Spatial - filtering - field equal to given value
Spatial - filtering - field different from given value
Spatial - filtering - field distance with given Point value less than given value

@codecov-io
Copy link

codecov-io commented Nov 10, 2019

Codecov Report

Merging #341 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
+ Coverage   96.35%   96.44%   +0.08%     
==========================================
  Files          24       24              
  Lines        2662     2698      +36     
==========================================
+ Hits         2565     2602      +37     
+ Misses         97       96       -1
Impacted Files Coverage Δ
src/augment/types/relationship/query.js 98.9% <ø> (ø) ⬆️
src/utils.js 94.04% <100%> (+0.3%) ⬆️
src/augment/input-values.js 100% <100%> (ø) ⬆️
src/augment/types/spatial.js 100% <100%> (ø) ⬆️
src/translate.js 98.55% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d71d73b...3a5ebfb. Read the comment docs.

@johnymontana johnymontana merged commit c4f6a21 into neo4j-graphql:master Nov 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants