Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions config/schema/artifacts/runtime_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1812,6 +1812,11 @@ enum_types_by_name:
direction: desc
field_path: widget.id
graphql_resolvers_by_name:
as_geo_tile:
needs_lookahead: true
resolver_ref:
name: ElasticGraph::GraphQL::Aggregation::Resolvers::AsGeoTile
require_path: elastic_graph/graphql/aggregation/resolvers/as_geo_tile
get_record_field_value:
needs_lookahead: false
resolver_ref:
Expand Down Expand Up @@ -3252,6 +3257,9 @@ object_types_by_name:
full_address:
resolver:
name: object_with_lookahead
geo_location:
resolver:
name: object_with_lookahead
timestamps:
resolver:
name: object_with_lookahead
Expand Down Expand Up @@ -4326,6 +4334,13 @@ object_types_by_name:
name_in_index: lon
resolver:
name: get_record_field_value
GeoLocationGroupedBy:
elasticgraph_category: geo_location_grouped_by_object
graphql_fields_by_name:
as_geo_tile:
resolver:
name: as_geo_tile
graphql_only_return_type: true
GeoShape:
graphql_fields_by_name:
coordinates:
Expand All @@ -4334,6 +4349,57 @@ object_types_by_name:
type:
resolver:
name: get_record_field_value
GeoTile:
graphql_fields_by_name:
bounds:
resolver:
name: object_without_lookahead
center_point:
resolver:
name: object_without_lookahead
corners:
resolver:
name: object_without_lookahead
x:
resolver:
name: object_without_lookahead
"y":
resolver:
name: object_without_lookahead
zoom_level:
resolver:
name: object_without_lookahead
graphql_only_return_type: true
GeoTileBounds:
graphql_fields_by_name:
east:
resolver:
name: object_without_lookahead
north:
resolver:
name: object_without_lookahead
south:
resolver:
name: object_without_lookahead
west:
resolver:
name: object_without_lookahead
graphql_only_return_type: true
GeoTileCorners:
graphql_fields_by_name:
northeast:
resolver:
name: object_without_lookahead
northwest:
resolver:
name: object_without_lookahead
southeast:
resolver:
name: object_without_lookahead
southwest:
resolver:
name: object_without_lookahead
graphql_only_return_type: true
IDListFilterInput:
graphql_fields_by_name:
count:
Expand Down Expand Up @@ -7271,6 +7337,9 @@ object_types_by_name:
seasons_object:
resolver:
name: object_with_lookahead
stadium_location:
resolver:
name: object_with_lookahead
staff:
resolver:
name: object_with_lookahead
Expand Down Expand Up @@ -9285,6 +9354,9 @@ object_types_by_name:
full_address:
resolver:
name: object_with_lookahead
geo_location:
resolver:
name: object_with_lookahead
internal_details:
resolver:
name: object_with_lookahead
Expand Down
121 changes: 121 additions & 0 deletions config/schema/artifacts/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ type AddressGroupedBy {
"""
full_address: String

"""
The `geo_location` field value for this group.
"""
geo_location: GeoLocationGroupedBy

"""
The `timestamps` field value for this group.
"""
Expand Down Expand Up @@ -3802,11 +3807,117 @@ input GeoLocationFilterInput {
not: GeoLocationFilterInput
}

"""
Offers geographic grouping representations for a location.
"""
type GeoLocationGroupedBy {
"""
Groups locations into Web Mercator XYZ tiles. Missing locations produce a `null` tile.
Points beyond ±85.0511° latitude are grouped into the northernmost or southernmost row,
so a point can be outside the bounds of the tile it is grouped into.
Boundary points are assigned to the tile to the east or south, subject to datastore coordinate encoding.
"""
as_geo_tile(
"""
The Web Mercator zoom level, from 0 through 29. Higher levels produce smaller tiles and more buckets.
"""
zoom_level: Int! = 7
): GeoTile
}

type GeoShape {
coordinates: [Float!]!
type: String
}

"""
A tile in the Web Mercator XYZ grid. Its coordinates identify a cell, not a fixed ground distance.
"""
type GeoTile {
"""
The geographic bounds of the tile. Web Mercator excludes the poles and stops at approximately ±85.0511°.
"""
bounds: GeoTileBounds!

"""
The point at the center of the tile on a Web Mercator map, not the average record location.
Its latitude is calculated by inverse projection, not by averaging the northern and southern
latitude bounds. For tile 1/0/0, the center latitude is approximately 66.51°, while the average
of the latitude bounds is approximately 42.53°.
"""
center_point: GeoLocation!

"""
The four corners of the tile, calculated from its geographic bounds.
"""
corners: GeoTileCorners!

"""
The zero-based tile coordinate, counted west to east, from 0 through 2^zoomLevel - 1.
"""
x: Int!

"""
The zero-based tile coordinate, counted north to south, from 0 through 2^zoomLevel - 1.
"""
y: Int!

"""
The zoom level of the tile, from 0 through 29.
"""
zoom_level: Int!
}

"""
The geographic bounds of a Web Mercator XYZ tile. Tiles do not cross the antimeridian.
"""
type GeoTileBounds {
"""
The longitude of the eastern boundary of the tile.
"""
east: Float!

"""
The latitude of the northern boundary of the tile.
"""
north: Float!

"""
The latitude of the southern boundary of the tile.
"""
south: Float!

"""
The longitude of the western boundary of the tile.
"""
west: Float!
}

"""
The geographic locations of the four corners of a Web Mercator XYZ tile.
"""
type GeoTileCorners {
"""
The northeast corner of the tile.
"""
northeast: GeoLocation!

"""
The northwest corner of the tile.
"""
northwest: GeoLocation!

"""
The southeast corner of the tile.
"""
southeast: GeoLocation!

"""
The southwest corner of the tile.
"""
southwest: GeoLocation!
}

"""
Input type used to specify filters on `ID` fields.

Expand Down Expand Up @@ -14387,6 +14498,11 @@ type TeamGroupedBy {
"""
seasons_object: TeamSeasonGroupedBy

"""
The `stadium_location` field value for this group.
"""
stadium_location: GeoLocationGroupedBy

"""
The `staff` field value for this group.
"""
Expand Down Expand Up @@ -18822,6 +18938,11 @@ type WidgetOrAddressGroupedBy {
"""
full_address: String

"""
The `geo_location` field value for this group.
"""
geo_location: GeoLocationGroupedBy

"""
The `internal_details` field value for this group.
"""
Expand Down
72 changes: 72 additions & 0 deletions config/schema/artifacts_with_apollo/runtime_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,11 @@ graphql_resolvers_by_name:
resolver_ref:
name: ElasticGraph::Apollo::GraphQL::ServiceFieldResolver
require_path: elastic_graph/apollo/graphql/service_field_resolver
as_geo_tile:
needs_lookahead: true
resolver_ref:
name: ElasticGraph::GraphQL::Aggregation::Resolvers::AsGeoTile
require_path: elastic_graph/graphql/aggregation/resolvers/as_geo_tile
get_record_field_value:
needs_lookahead: false
resolver_ref:
Expand Down Expand Up @@ -3281,6 +3286,9 @@ object_types_by_name:
full_address:
resolver:
name: object_with_lookahead
geo_location:
resolver:
name: object_with_lookahead
timestamps:
resolver:
name: object_with_lookahead
Expand Down Expand Up @@ -4428,6 +4436,13 @@ object_types_by_name:
name_in_index: lon
resolver:
name: get_record_field_value
GeoLocationGroupedBy:
elasticgraph_category: geo_location_grouped_by_object
graphql_fields_by_name:
as_geo_tile:
resolver:
name: as_geo_tile
graphql_only_return_type: true
GeoShape:
graphql_fields_by_name:
coordinates:
Expand All @@ -4436,6 +4451,57 @@ object_types_by_name:
type:
resolver:
name: get_record_field_value
GeoTile:
graphql_fields_by_name:
bounds:
resolver:
name: object_without_lookahead
center_point:
resolver:
name: object_without_lookahead
corners:
resolver:
name: object_without_lookahead
x:
resolver:
name: object_without_lookahead
"y":
resolver:
name: object_without_lookahead
zoom_level:
resolver:
name: object_without_lookahead
graphql_only_return_type: true
GeoTileBounds:
graphql_fields_by_name:
east:
resolver:
name: object_without_lookahead
north:
resolver:
name: object_without_lookahead
south:
resolver:
name: object_without_lookahead
west:
resolver:
name: object_without_lookahead
graphql_only_return_type: true
GeoTileCorners:
graphql_fields_by_name:
northeast:
resolver:
name: object_without_lookahead
northwest:
resolver:
name: object_without_lookahead
southeast:
resolver:
name: object_without_lookahead
southwest:
resolver:
name: object_without_lookahead
graphql_only_return_type: true
IDListFilterInput:
graphql_fields_by_name:
count:
Expand Down Expand Up @@ -7400,6 +7466,9 @@ object_types_by_name:
seasons_object:
resolver:
name: object_with_lookahead
stadium_location:
resolver:
name: object_with_lookahead
staff:
resolver:
name: object_with_lookahead
Expand Down Expand Up @@ -9414,6 +9483,9 @@ object_types_by_name:
full_address:
resolver:
name: object_with_lookahead
geo_location:
resolver:
name: object_with_lookahead
internal_details:
resolver:
name: object_with_lookahead
Expand Down
Loading
Loading