diff --git a/Rakefile b/Rakefile index 6f5937169..0c975932e 100644 --- a/Rakefile +++ b/Rakefile @@ -77,6 +77,10 @@ configure_local_rake_tasks = ->(tasks) do FactoryBot.build(:widget, components: widget_components, inventor: Faker::Base.sample(inventors)) end) + batch.concat(Array.new(10) { FactoryBot.build(:online_store) }) + batch.concat(Array.new(10) { FactoryBot.build(:physical_store) }) + batch.concat(Array.new(10) { FactoryBot.build(:third_party_wholesale) }) + batch.concat(sponsors = Array.new(10) { FactoryBot.build(:sponsor) }) batch.concat(Array.new(10) { FactoryBot.build(:team, sponsors: sponsors.sample(rand(3))) }) batch diff --git a/ai-memory/README.md b/ai-memory/README.md index b901957b5..41ecc9b6f 100644 --- a/ai-memory/README.md +++ b/ai-memory/README.md @@ -301,6 +301,16 @@ The project is a monorepo composed of many gems. Each gem typically resides in i - **Dependencies**: `elasticgraph-graphql`, `elasticgraph-indexer`, `elasticgraph-schema_artifacts`, `elasticgraph-support`, `graphql`, `graphql-c_parser`, `rake`. - **Provides**: The schema definition framework and artifact generation capabilities. +### Index Inheritance + +Abstract types (interfaces and unions) can declare an index that their concrete subtypes inherit, rather than each subtype declaring its own. Multiple concrete types then share a single datastore index. A subtype may still declare its own dedicated index, which overrides the inherited one — those documents are stored in a separate index and do not have `__typename` stored in them. + +**`__typename` injection (indexer)**: When a record is indexed into a shared (inherited) index, the indexer automatically injects `__typename` into the document so the datastore can distinguish between concrete types at query time. + +**Query-time scoping**: When an abstract type shares an index with types outside its subtype hierarchy, `QueryAdapter::AbstractTypeFilter` automatically injects an internal `__typename` filter scoped to the queried type's concrete subtypes. + +**Key files**: `schema_definition/indexing/index.rb`, `schema_definition/mixins/has_indices.rb`, `schema_definition/schema_elements/type_with_subfields.rb`, `indexer/record_preparer.rb`, `graphql/query_adapter/abstract_type_filter.rb`, `graphql/schema/type.rb`. + ## Other Key Information This section highlights other important aspects of the ElasticGraph project: diff --git a/config/schema/artifacts/data_warehouse.yaml b/config/schema/artifacts/data_warehouse.yaml index 3388a7164..e6d7bec07 100644 --- a/config/schema/artifacts/data_warehouse.yaml +++ b/config/schema/artifacts/data_warehouse.yaml @@ -14,13 +14,6 @@ tables: shapes ARRAY>>, manufacturer_id STRING ) - companies: - table_schema: |- - CREATE TABLE IF NOT EXISTS companies ( - id STRING, - name STRING, - stock_ticker STRING - ) components: table_schema: |- CREATE TABLE IF NOT EXISTS components ( @@ -38,6 +31,14 @@ tables: owner_ids ARRAY, owner_id STRING ) + distribution_channels: + table_schema: |- + CREATE TABLE IF NOT EXISTS distribution_channels ( + id STRING, + established_on DATE, + active BOOLEAN, + __typename STRING + ) electrical_parts: table_schema: |- CREATE TABLE IF NOT EXISTS electrical_parts ( @@ -53,7 +54,7 @@ tables: id STRING, name STRING, created_at TIMESTAMP, - ceo STRUCT + ceo STRUCT ) mechanical_parts: table_schema: |- @@ -64,12 +65,21 @@ tables: material STRING, manufacturer_id STRING ) - people: + named_inventors: table_schema: |- - CREATE TABLE IF NOT EXISTS people ( + CREATE TABLE IF NOT EXISTS named_inventors ( id STRING, name STRING, - nationality STRING + nationality STRING, + __typename STRING, + stock_ticker STRING + ) + physical_stores: + table_schema: |- + CREATE TABLE IF NOT EXISTS physical_stores ( + id STRING, + established_on DATE, + active BOOLEAN ) sponsors: table_schema: |- @@ -142,8 +152,8 @@ tables: internal_details STRUCT, internal_highlightable_details STRUCT, the_opts STRUCT, - inventor STRUCT, - named_inventor STRUCT, + inventor STRUCT, + named_inventor STRUCT, weight_in_ng_str BIGINT, weight_in_ng BIGINT, tags ARRAY, diff --git a/config/schema/artifacts/datastore_config.yaml b/config/schema/artifacts/datastore_config.yaml index 7976cf8a8..3ca61c0c5 100644 --- a/config/schema/artifacts/datastore_config.yaml +++ b/config/schema/artifacts/datastore_config.yaml @@ -1531,30 +1531,6 @@ indices: index.number_of_replicas: 1 index.number_of_shards: 1 index.max_result_window: 10000 - companies: - aliases: {} - mappings: - dynamic: strict - properties: - id: - type: keyword - name: - type: keyword - stock_ticker: - type: keyword - __sources: - type: keyword - __versions: - type: object - dynamic: 'false' - _size: - enabled: true - settings: - index.mapping.ignore_malformed: false - index.mapping.coerce: false - index.number_of_replicas: 1 - index.number_of_shards: 1 - index.max_result_window: 10000 components: aliases: {} mappings: @@ -1618,6 +1594,33 @@ indices: index.number_of_replicas: 1 index.number_of_shards: 1 index.max_result_window: 10000 + distribution_channels: + aliases: {} + mappings: + dynamic: strict + properties: + id: + type: keyword + established_on: + type: date + format: strict_date + active: + type: boolean + __typename: + type: keyword + __sources: + type: keyword + __versions: + type: object + dynamic: 'false' + _size: + enabled: true + settings: + index.mapping.ignore_malformed: false + index.mapping.coerce: false + index.number_of_replicas: 1 + index.number_of_shards: 1 + index.max_result_window: 10000 electrical_parts: aliases: {} mappings: @@ -1709,7 +1712,7 @@ indices: index.number_of_replicas: 1 index.number_of_shards: 1 index.max_result_window: 10000 - people: + named_inventors: aliases: {} mappings: dynamic: strict @@ -1720,6 +1723,35 @@ indices: type: keyword nationality: type: keyword + stock_ticker: + type: keyword + __typename: + type: keyword + __sources: + type: keyword + __versions: + type: object + dynamic: 'false' + _size: + enabled: true + settings: + index.mapping.ignore_malformed: false + index.mapping.coerce: false + index.number_of_replicas: 1 + index.number_of_shards: 1 + index.max_result_window: 10000 + physical_stores: + aliases: {} + mappings: + dynamic: strict + properties: + id: + type: keyword + established_on: + type: date + format: strict_date + active: + type: boolean __sources: type: keyword __versions: diff --git a/config/schema/artifacts/json_schemas.yaml b/config/schema/artifacts/json_schemas.yaml index f46e562cd..3f0a6f2a3 100644 --- a/config/schema/artifacts/json_schemas.yaml +++ b/config/schema/artifacts/json_schemas.yaml @@ -28,9 +28,12 @@ json_schema_version: 1 - ElectricalPart - Manufacturer - MechanicalPart + - OnlineStore - Person + - PhysicalStore - Sponsor - Team + - ThirdPartyWholesale - Widget - WidgetWorkspace id: @@ -445,6 +448,29 @@ json_schema_version: 1 oneOf: - "$ref": "#/$defs/Person" - "$ref": "#/$defs/Company" + OnlineStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + __typename: + type: string + const: OnlineStore + default: OnlineStore + required: + - id + - established_on + - active Person: type: object properties: @@ -472,6 +498,29 @@ json_schema_version: 1 - id - name - nationality + PhysicalStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + __typename: + type: string + const: PhysicalStore + default: PhysicalStore + required: + - id + - established_on + - active Player: type: object properties: @@ -819,6 +868,24 @@ json_schema_version: 1 - was_shortened - players_nested - players_object + ThirdPartyWholesale: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + __typename: + type: string + const: ThirdPartyWholesale + default: ThirdPartyWholesale + required: + - id + - active Untyped: type: - array diff --git a/config/schema/artifacts/json_schemas_by_version/v1.yaml b/config/schema/artifacts/json_schemas_by_version/v1.yaml index d657699e7..bb5079fc4 100644 --- a/config/schema/artifacts/json_schemas_by_version/v1.yaml +++ b/config/schema/artifacts/json_schemas_by_version/v1.yaml @@ -28,9 +28,12 @@ json_schema_version: 1 - ElectricalPart - Manufacturer - MechanicalPart + - OnlineStore - Person + - PhysicalStore - Sponsor - Team + - ThirdPartyWholesale - Widget - WidgetWorkspace id: @@ -565,6 +568,38 @@ json_schema_version: 1 oneOf: - "$ref": "#/$defs/Person" - "$ref": "#/$defs/Company" + OnlineStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + ElasticGraph: + type: ID! + nameInIndex: id + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + ElasticGraph: + type: Date + nameInIndex: established_on + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + ElasticGraph: + type: Boolean + nameInIndex: active + __typename: + type: string + const: OnlineStore + default: OnlineStore + required: + - id + - established_on + - active Person: type: object properties: @@ -601,6 +636,38 @@ json_schema_version: 1 - id - name - nationality + PhysicalStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + ElasticGraph: + type: ID! + nameInIndex: id + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + ElasticGraph: + type: Date + nameInIndex: established_on + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + ElasticGraph: + type: Boolean + nameInIndex: active + __typename: + type: string + const: PhysicalStore + default: PhysicalStore + required: + - id + - established_on + - active Player: type: object properties: @@ -1098,6 +1165,30 @@ json_schema_version: 1 - was_shortened - players_nested - players_object + ThirdPartyWholesale: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + ElasticGraph: + type: ID! + nameInIndex: id + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + ElasticGraph: + type: Boolean + nameInIndex: active + __typename: + type: string + const: ThirdPartyWholesale + default: ThirdPartyWholesale + required: + - id + - active Untyped: type: - array diff --git a/config/schema/artifacts/runtime_metadata.yaml b/config/schema/artifacts/runtime_metadata.yaml index 639891715..082ad511f 100644 --- a/config/schema/artifacts/runtime_metadata.yaml +++ b/config/schema/artifacts/runtime_metadata.yaml @@ -21,32 +21,6 @@ enum_types_by_name: sort_field: direction: desc field_path: timestamps.created_at - CompanySortOrderInput: - values_by_name: - id_ASC: - sort_field: - direction: asc - field_path: id - id_DESC: - sort_field: - direction: desc - field_path: id - name_ASC: - sort_field: - direction: asc - field_path: name - name_DESC: - sort_field: - direction: desc - field_path: name - stock_ticker_ASC: - sort_field: - direction: asc - field_path: stock_ticker - stock_ticker_DESC: - sort_field: - direction: desc - field_path: stock_ticker ComponentSortOrderInput: values_by_name: created_at_ASC: @@ -201,6 +175,24 @@ enum_types_by_name: datastore_abbreviation: nmi YARD: datastore_abbreviation: yd + DistributionChannelSortOrderInput: + values_by_name: + established_on_ASC: + sort_field: + direction: asc + field_path: established_on + established_on_DESC: + sort_field: + direction: desc + field_path: established_on + id_ASC: + sort_field: + direction: asc + field_path: id + id_DESC: + sort_field: + direction: desc + field_path: id ElectricalPartSortOrderInput: values_by_name: created_at_ASC: @@ -871,8 +863,16 @@ enum_types_by_name: sort_field: direction: desc field_path: voltage - PersonSortOrderInput: + PhysicalStoreSortOrderInput: values_by_name: + established_on_ASC: + sort_field: + direction: asc + field_path: established_on + established_on_DESC: + sort_field: + direction: desc + field_path: established_on id_ASC: sort_field: direction: asc @@ -881,22 +881,24 @@ enum_types_by_name: sort_field: direction: desc field_path: id - name_ASC: + RetailSortOrderInput: + values_by_name: + established_on_ASC: sort_field: direction: asc - field_path: name - name_DESC: + field_path: established_on + established_on_DESC: sort_field: direction: desc - field_path: name - nationality_ASC: + field_path: established_on + id_ASC: sort_field: direction: asc - field_path: nationality - nationality_DESC: + field_path: id + id_DESC: sort_field: direction: desc - field_path: nationality + field_path: id SponsorSortOrderInput: values_by_name: id_ASC: @@ -915,6 +917,24 @@ enum_types_by_name: sort_field: direction: desc field_path: name + StoreSortOrderInput: + values_by_name: + established_on_ASC: + sort_field: + direction: asc + field_path: established_on + established_on_DESC: + sort_field: + direction: desc + field_path: established_on + id_ASC: + sort_field: + direction: asc + field_path: id + id_DESC: + sort_field: + direction: desc + field_path: id TeamSortOrderInput: values_by_name: country_code_ASC: @@ -1774,17 +1794,6 @@ index_definitions_by_name: timestamps.created_at: source: __self route_with: id - companies: - current_sources: - - __self - fields_by_path: - id: - source: __self - name: - source: __self - stock_ticker: - source: __self - route_with: id components: current_sources: - __self @@ -1833,6 +1842,17 @@ index_definitions_by_name: source: widget has_had_multiple_sources: true route_with: id + distribution_channels: + current_sources: + - __self + fields_by_path: + active: + source: __self + established_on: + source: __self + id: + source: __self + route_with: id electrical_parts: current_sources: - __self @@ -1889,7 +1909,7 @@ index_definitions_by_name: name: source: __self route_with: id - people: + named_inventors: current_sources: - __self fields_by_path: @@ -1899,6 +1919,19 @@ index_definitions_by_name: source: __self nationality: source: __self + stock_ticker: + source: __self + route_with: id + physical_stores: + current_sources: + - __self + fields_by_path: + active: + source: __self + established_on: + source: __self + id: + source: __self route_with: id sponsors: current_sources: @@ -3192,9 +3225,11 @@ object_types_by_name: resolver: name: get_record_field_value index_definition_names: - - companies + - named_inventors update_targets: - data_params: + __typename: + cardinality: one name: cardinality: one stock_ticker: @@ -3215,100 +3250,6 @@ object_types_by_name: routing_value_source: id script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a type: Company - CompanyAggregatedValues: - graphql_fields_by_name: - id: - resolver: - name: object_with_lookahead - name: - resolver: - name: object_with_lookahead - stock_ticker: - resolver: - name: object_with_lookahead - CompanyAggregation: - elasticgraph_category: indexed_aggregation - graphql_fields_by_name: - aggregated_values: - resolver: - name: object_without_lookahead - count: - resolver: - name: object_without_lookahead - grouped_by: - resolver: - name: object_without_lookahead - source_type: Company - CompanyAggregationConnection: - elasticgraph_category: relay_connection - graphql_fields_by_name: - edges: - resolver: - name: object_without_lookahead - nodes: - resolver: - name: object_without_lookahead - page_info: - resolver: - name: object_without_lookahead - CompanyAggregationEdge: - elasticgraph_category: relay_edge - graphql_fields_by_name: - cursor: - resolver: - name: object_without_lookahead - node: - resolver: - name: object_without_lookahead - CompanyConnection: - elasticgraph_category: relay_connection - graphql_fields_by_name: - edges: - resolver: - name: object_without_lookahead - nodes: - resolver: - name: object_without_lookahead - page_info: - resolver: - name: object_without_lookahead - total_edge_count: - resolver: - name: object_without_lookahead - CompanyEdge: - elasticgraph_category: relay_edge - graphql_fields_by_name: - all_highlights: - resolver: - name: object_without_lookahead - cursor: - resolver: - name: object_without_lookahead - highlights: - resolver: - name: object_without_lookahead - node: - resolver: - name: object_without_lookahead - CompanyGroupedBy: - graphql_fields_by_name: - name: - resolver: - name: object_with_lookahead - stock_ticker: - resolver: - name: object_with_lookahead - CompanyHighlights: - graphql_fields_by_name: - id: - resolver: - name: get_record_field_value - name: - resolver: - name: get_record_field_value - stock_ticker: - resolver: - name: get_record_field_value Component: graphql_fields_by_name: created_at: @@ -3685,81 +3626,31 @@ object_types_by_name: graphql_fields_by_name: count: name_in_index: __counts - ElectricalPart: + DistributionChannel: graphql_fields_by_name: - component_aggregations: - relation: - direction: in - foreign_key: part_ids - resolver: - name: nested_relationships - components: - relation: - direction: in - foreign_key: part_ids - resolver: - name: nested_relationships - created_at: + active: resolver: name: get_record_field_value - id: - resolver: - name: get_record_field_value - manufacturer: - relation: - direction: out - foreign_key: manufacturer_id - resolver: - name: nested_relationships - name: + established_on: resolver: name: get_record_field_value - voltage: + id: resolver: name: get_record_field_value index_definition_names: - - electrical_parts - update_targets: - - data_params: - created_at: - cardinality: one - manufacturer_id: - cardinality: one - name: - cardinality: one - voltage: - cardinality: one - id_source: id - metadata_params: - relationship: - value: __self - sourceId: - cardinality: one - source_path: id - sourceType: - cardinality: one - source_path: type - version: - cardinality: one - relationship: __self - routing_value_source: id - script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a - type: ElectricalPart - ElectricalPartAggregatedValues: + - distribution_channels + DistributionChannelAggregatedValues: graphql_fields_by_name: - created_at: - resolver: - name: object_with_lookahead - id: + active: resolver: name: object_with_lookahead - name: + established_on: resolver: name: object_with_lookahead - voltage: + id: resolver: name: object_with_lookahead - ElectricalPartAggregation: + DistributionChannelAggregation: elasticgraph_category: indexed_aggregation graphql_fields_by_name: aggregated_values: @@ -3771,8 +3662,8 @@ object_types_by_name: grouped_by: resolver: name: object_without_lookahead - source_type: ElectricalPart - ElectricalPartAggregationConnection: + source_type: DistributionChannel + DistributionChannelAggregationConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -3784,7 +3675,7 @@ object_types_by_name: page_info: resolver: name: object_without_lookahead - ElectricalPartAggregationEdge: + DistributionChannelAggregationEdge: elasticgraph_category: relay_edge graphql_fields_by_name: cursor: @@ -3793,7 +3684,7 @@ object_types_by_name: node: resolver: name: object_without_lookahead - ElectricalPartConnection: + DistributionChannelConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -3808,7 +3699,7 @@ object_types_by_name: total_edge_count: resolver: name: object_without_lookahead - ElectricalPartEdge: + DistributionChannelEdge: elasticgraph_category: relay_edge graphql_fields_by_name: all_highlights: @@ -3823,18 +3714,169 @@ object_types_by_name: node: resolver: name: object_without_lookahead - ElectricalPartGroupedBy: + DistributionChannelGroupedBy: graphql_fields_by_name: - created_at: - resolver: - name: object_with_lookahead - name: + active: resolver: name: object_with_lookahead - voltage: + established_on: resolver: name: object_with_lookahead - ElectricalPartHighlights: + DistributionChannelHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value + ElectricalPart: + graphql_fields_by_name: + component_aggregations: + relation: + direction: in + foreign_key: part_ids + resolver: + name: nested_relationships + components: + relation: + direction: in + foreign_key: part_ids + resolver: + name: nested_relationships + created_at: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + manufacturer: + relation: + direction: out + foreign_key: manufacturer_id + resolver: + name: nested_relationships + name: + resolver: + name: get_record_field_value + voltage: + resolver: + name: get_record_field_value + index_definition_names: + - electrical_parts + update_targets: + - data_params: + created_at: + cardinality: one + manufacturer_id: + cardinality: one + name: + cardinality: one + voltage: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: ElectricalPart + ElectricalPartAggregatedValues: + graphql_fields_by_name: + created_at: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + name: + resolver: + name: object_with_lookahead + voltage: + resolver: + name: object_with_lookahead + ElectricalPartAggregation: + elasticgraph_category: indexed_aggregation + graphql_fields_by_name: + aggregated_values: + resolver: + name: object_without_lookahead + count: + resolver: + name: object_without_lookahead + grouped_by: + resolver: + name: object_without_lookahead + source_type: ElectricalPart + ElectricalPartAggregationConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + ElectricalPartAggregationEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + cursor: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + ElectricalPartConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + total_edge_count: + resolver: + name: object_without_lookahead + ElectricalPartEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + all_highlights: + resolver: + name: object_without_lookahead + cursor: + resolver: + name: object_without_lookahead + highlights: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + ElectricalPartGroupedBy: + graphql_fields_by_name: + created_at: + resolver: + name: object_with_lookahead + name: + resolver: + name: object_with_lookahead + voltage: + resolver: + name: object_with_lookahead + ElectricalPartHighlights: graphql_fields_by_name: id: resolver: @@ -5188,6 +5230,8 @@ object_types_by_name: stock_ticker: resolver: name: get_record_field_value + index_definition_names: + - named_inventors NamedInventorAggregatedValues: graphql_fields_by_name: id: @@ -5301,6 +5345,43 @@ object_types_by_name: resolver: name: object_with_lookahead graphql_only_return_type: true + OnlineStore: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + update_targets: + - data_params: + __typename: + cardinality: one + active: + cardinality: one + established_on: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: OnlineStore PageInfo: graphql_fields_by_name: end_cursor: @@ -5469,9 +5550,11 @@ object_types_by_name: resolver: name: get_record_field_value index_definition_names: - - people + - named_inventors update_targets: - data_params: + __typename: + cardinality: one name: cardinality: one nationality: @@ -5503,7 +5586,72 @@ object_types_by_name: nationality: resolver: name: object_with_lookahead - PersonAggregation: + PersonGroupedBy: + graphql_fields_by_name: + name: + resolver: + name: object_with_lookahead + nationality: + resolver: + name: object_with_lookahead + PersonHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value + name: + resolver: + name: get_record_field_value + nationality: + resolver: + name: get_record_field_value + PhysicalStore: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - physical_stores + update_targets: + - data_params: + active: + cardinality: one + established_on: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: PhysicalStore + PhysicalStoreAggregatedValues: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + PhysicalStoreAggregation: elasticgraph_category: indexed_aggregation graphql_fields_by_name: aggregated_values: @@ -5515,8 +5663,8 @@ object_types_by_name: grouped_by: resolver: name: object_without_lookahead - source_type: Person - PersonAggregationConnection: + source_type: PhysicalStore + PhysicalStoreAggregationConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -5528,7 +5676,7 @@ object_types_by_name: page_info: resolver: name: object_without_lookahead - PersonAggregationEdge: + PhysicalStoreAggregationEdge: elasticgraph_category: relay_edge graphql_fields_by_name: cursor: @@ -5537,7 +5685,7 @@ object_types_by_name: node: resolver: name: object_without_lookahead - PersonConnection: + PhysicalStoreConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -5552,7 +5700,7 @@ object_types_by_name: total_edge_count: resolver: name: object_without_lookahead - PersonEdge: + PhysicalStoreEdge: elasticgraph_category: relay_edge graphql_fields_by_name: all_highlights: @@ -5567,25 +5715,19 @@ object_types_by_name: node: resolver: name: object_without_lookahead - PersonGroupedBy: + PhysicalStoreGroupedBy: graphql_fields_by_name: - name: + active: resolver: name: object_with_lookahead - nationality: + established_on: resolver: name: object_with_lookahead - PersonHighlights: + PhysicalStoreHighlights: graphql_fields_by_name: id: resolver: name: get_record_field_value - name: - resolver: - name: get_record_field_value - nationality: - resolver: - name: get_record_field_value Player: graphql_fields_by_name: affiliations: @@ -5728,16 +5870,16 @@ object_types_by_name: addresses: resolver: name: list_records - companies: + component_aggregations: resolver: name: list_records - company_aggregations: + components: resolver: name: list_records - component_aggregations: + distribution_channel_aggregations: resolver: name: list_records - components: + distribution_channels: resolver: name: list_records electrical_part_aggregations: @@ -5782,10 +5924,16 @@ object_types_by_name: parts: resolver: name: list_records - people: + physical_store_aggregations: resolver: name: list_records - person_aggregations: + physical_stores: + resolver: + name: list_records + retail_aggregations: + resolver: + name: list_records + retailers: resolver: name: list_records sponsor_aggregations: @@ -5794,6 +5942,12 @@ object_types_by_name: sponsors: resolver: name: list_records + store_aggregations: + resolver: + name: list_records + stores: + resolver: + name: list_records team_aggregations: resolver: name: list_records @@ -5824,6 +5978,107 @@ object_types_by_name: widgets_or_addresses: resolver: name: list_records + Retail: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + RetailAggregatedValues: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + RetailAggregation: + elasticgraph_category: indexed_aggregation + graphql_fields_by_name: + aggregated_values: + resolver: + name: object_without_lookahead + count: + resolver: + name: object_without_lookahead + grouped_by: + resolver: + name: object_without_lookahead + source_type: Retail + RetailAggregationConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + RetailAggregationEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + cursor: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + RetailConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + total_edge_count: + resolver: + name: object_without_lookahead + RetailEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + all_highlights: + resolver: + name: object_without_lookahead + cursor: + resolver: + name: object_without_lookahead + highlights: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + RetailGroupedBy: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + RetailHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value SearchHighlight: graphql_fields_by_name: path: @@ -6022,6 +6277,107 @@ object_types_by_name: graphql_fields_by_name: count: name_in_index: __counts + Store: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + StoreAggregatedValues: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + StoreAggregation: + elasticgraph_category: indexed_aggregation + graphql_fields_by_name: + aggregated_values: + resolver: + name: object_without_lookahead + count: + resolver: + name: object_without_lookahead + grouped_by: + resolver: + name: object_without_lookahead + source_type: Store + StoreAggregationConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + StoreAggregationEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + cursor: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + StoreConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + total_edge_count: + resolver: + name: object_without_lookahead + StoreEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + all_highlights: + resolver: + name: object_without_lookahead + cursor: + resolver: + name: object_without_lookahead + highlights: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + StoreGroupedBy: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + StoreHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value StringConnection: elasticgraph_category: relay_connection graphql_fields_by_name: @@ -6955,6 +7311,38 @@ object_types_by_name: players_object: resolver: name: object_with_lookahead + ThirdPartyWholesale: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + update_targets: + - data_params: + __typename: + cardinality: one + active: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: ThirdPartyWholesale Widget: graphql_fields_by_name: amount_cents: diff --git a/config/schema/artifacts/schema.graphql b/config/schema/artifacts/schema.graphql index 7e88fa2cd..a717db3f7 100644 --- a/config/schema/artifacts/schema.graphql +++ b/config/schema/artifacts/schema.graphql @@ -820,274 +820,6 @@ type Company implements NamedInventor { stock_ticker: String } -""" -Type used to perform aggregation computations on `Company` fields. -""" -type CompanyAggregatedValues { - """ - Computed aggregate values for the `id` field. - """ - id: NonNumericAggregatedValues - - """ - Computed aggregate values for the `name` field. - """ - name: NonNumericAggregatedValues - - """ - Computed aggregate values for the `stock_ticker` field. - """ - stock_ticker: NonNumericAggregatedValues -} - -""" -Return type representing a bucket of `Company` documents for an aggregations query. -""" -type CompanyAggregation { - """ - Provides computed aggregated values over all `Company` documents in an aggregation bucket. - """ - aggregated_values: CompanyAggregatedValues - - """ - The count of `Company` documents in an aggregation bucket. - """ - count: JsonSafeLong! - - """ - Used to specify the `Company` fields to group by. The returned values identify each aggregation bucket. - """ - grouped_by: CompanyGroupedBy -} - -""" -Represents a paginated collection of `CompanyAggregation` results. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. -""" -type CompanyAggregationConnection { - """ - Wraps a specific `CompanyAggregation` to pair it with its pagination cursor. - """ - edges: [CompanyAggregationEdge!]! - - """ - The list of `CompanyAggregation` results. - """ - nodes: [CompanyAggregation!]! - - """ - Provides pagination-related information. - """ - page_info: PageInfo! -} - -""" -Represents a specific `CompanyAggregation` in the context of a `CompanyAggregationConnection`, -providing access to both the `CompanyAggregation` and query-specific information such as the pagination `Cursor`. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. -""" -type CompanyAggregationEdge { - """ - The `Cursor` of this `CompanyAggregation`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `CompanyAggregation`. - """ - cursor: Cursor - - """ - The `CompanyAggregation` of this edge. - """ - node: CompanyAggregation -} - -""" -Represents a paginated collection of `Company` results. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. -""" -type CompanyConnection { - """ - Wraps a specific `Company` to pair it with its pagination cursor. - """ - edges: [CompanyEdge!]! - - """ - The list of `Company` results. - """ - nodes: [Company!]! - - """ - Provides pagination-related information. - """ - page_info: PageInfo! - - """ - The total number of edges available in this connection to paginate over. - """ - total_edge_count: JsonSafeLong! -} - -""" -Represents a specific `Company` in the context of a `CompanyConnection`, -providing access to both the `Company` and query-specific information such as the pagination `Cursor`. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. -""" -type CompanyEdge { - """ - All search highlights for this `Company`, indicating where in the indexed document the query matched. - """ - all_highlights: [SearchHighlight!]! - - """ - The `Cursor` of this `Company`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `Company`. - """ - cursor: Cursor - - """ - Specific search highlights for this `Company`, providing matching snippets for the requested fields. - """ - highlights: CompanyHighlights - - """ - The `Company` of this edge. - """ - node: Company -} - -""" -Input type used to specify filters on `Company` fields. - -Will match all documents if passed as an empty object (or as `null`). -""" -input CompanyFilterInput { - """ - Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. - - Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't - be provided on a single `CompanyFilterInput` input because of collisions - between key names. For example, if you want to AND multiple - OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. - - When `null` or an empty list is passed, matches all documents. - """ - all_of: [CompanyFilterInput!] - - """ - Matches records where any of the provided sub-filters evaluate to true. - This works just like an OR operator in SQL. - - When `null` is passed, matches all documents. - When an empty list is passed, this part of the filter matches no documents. - """ - any_of: [CompanyFilterInput!] - - """ - Used to filter on the `id` field. - - When `null` or an empty object is passed, matches all documents. - """ - id: IDFilterInput - - """ - Used to filter on the `name` field. - - When `null` or an empty object is passed, matches all documents. - """ - name: StringFilterInput - - """ - Matches records where the provided sub-filter evaluates to false. - This works just like a NOT operator in SQL. - - When `null` or an empty object is passed, matches no documents. - """ - not: CompanyFilterInput - - """ - Used to filter on the `stock_ticker` field. - - When `null` or an empty object is passed, matches all documents. - """ - stock_ticker: StringFilterInput -} - -""" -Type used to specify the `Company` fields to group by for aggregations. -""" -type CompanyGroupedBy { - """ - The `name` field value for this group. - """ - name: String - - """ - The `stock_ticker` field value for this group. - """ - stock_ticker: String -} - -""" -Type used to request desired `Company` search highlight fields. -""" -type CompanyHighlights { - """ - Search highlights for the `id`, providing snippets of the matching text. - """ - id: [String!]! - - """ - Search highlights for the `name`, providing snippets of the matching text. - """ - name: [String!]! - - """ - Search highlights for the `stock_ticker`, providing snippets of the matching text. - """ - stock_ticker: [String!]! -} - -""" -Enumerates the ways `Company`s can be sorted. -""" -enum CompanySortOrderInput { - """ - Sorts ascending by the `id` field. - """ - id_ASC - - """ - Sorts descending by the `id` field. - """ - id_DESC - - """ - Sorts ascending by the `name` field. - """ - name_ASC - - """ - Sorts descending by the `name` field. - """ - name_DESC - - """ - Sorts ascending by the `stock_ticker` field. - """ - stock_ticker_ASC - - """ - Sorts descending by the `stock_ticker` field. - """ - stock_ticker_DESC -} - type Component implements NamedEntity { created_at: DateTime! dollar_widget: Widget @@ -2794,33 +2526,287 @@ enum DistanceUnitInput { YARD } -type ElectricalPart implements NamedEntity { +interface DistributionChannel { + active: Boolean + id: ID! +} + +""" +Type used to perform aggregation computations on `DistributionChannel` fields. +""" +type DistributionChannelAggregatedValues { """ - Aggregations over the `components` data. + Computed aggregate values for the `active` field. """ - component_aggregations( - """ - Used to forward-paginate through the `component_aggregations`. When provided, the next page after the - provided cursor will be returned. - - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - after: Cursor + active: NonNumericAggregatedValues - """ - Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the - provided cursor will be returned. + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - before: Cursor + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} - """ - Used to filter the `Component` documents that get aggregated over based on the provided criteria. - """ - filter: ComponentFilterInput +""" +Return type representing a bucket of `DistributionChannel` documents for an aggregations query. +""" +type DistributionChannelAggregation { + """ + Provides computed aggregated values over all `DistributionChannel` documents in an aggregation bucket. + """ + aggregated_values: DistributionChannelAggregatedValues + + """ + The count of `DistributionChannel` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `DistributionChannel` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: DistributionChannelGroupedBy +} + +""" +Represents a paginated collection of `DistributionChannelAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type DistributionChannelAggregationConnection { + """ + Wraps a specific `DistributionChannelAggregation` to pair it with its pagination cursor. + """ + edges: [DistributionChannelAggregationEdge!]! + + """ + The list of `DistributionChannelAggregation` results. + """ + nodes: [DistributionChannelAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `DistributionChannelAggregation` in the context of a `DistributionChannelAggregationConnection`, +providing access to both the `DistributionChannelAggregation` and query-specific +information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type DistributionChannelAggregationEdge { + """ + The `Cursor` of this `DistributionChannelAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `DistributionChannelAggregation`. + """ + cursor: Cursor + + """ + The `DistributionChannelAggregation` of this edge. + """ + node: DistributionChannelAggregation +} + +""" +Represents a paginated collection of `DistributionChannel` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type DistributionChannelConnection { + """ + Wraps a specific `DistributionChannel` to pair it with its pagination cursor. + """ + edges: [DistributionChannelEdge!]! + + """ + The list of `DistributionChannel` results. + """ + nodes: [DistributionChannel!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! + + """ + The total number of edges available in this connection to paginate over. + """ + total_edge_count: JsonSafeLong! +} + +""" +Represents a specific `DistributionChannel` in the context of a `DistributionChannelConnection`, +providing access to both the `DistributionChannel` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type DistributionChannelEdge { + """ + All search highlights for this `DistributionChannel`, indicating where in the indexed document the query matched. + """ + all_highlights: [SearchHighlight!]! + + """ + The `Cursor` of this `DistributionChannel`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `DistributionChannel`. + """ + cursor: Cursor + + """ + Specific search highlights for this `DistributionChannel`, providing matching snippets for the requested fields. + """ + highlights: DistributionChannelHighlights + + """ + The `DistributionChannel` of this edge. + """ + node: DistributionChannel +} + +""" +Input type used to specify filters on `DistributionChannel` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input DistributionChannelFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + + """ + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `DistributionChannelFilterInput` input because of + collisions between key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. + """ + all_of: [DistributionChannelFilterInput!] + + """ + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. + """ + any_of: [DistributionChannelFilterInput!] + + """ + Used to filter on the `established_on` field. + + When `null` or an empty object is passed, matches all documents. + """ + established_on: DateFilterInput + + """ + Used to filter on the `id` field. + + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput + + """ + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. + + When `null` or an empty object is passed, matches no documents. + """ + not: DistributionChannelFilterInput +} + +""" +Type used to specify the `DistributionChannel` fields to group by for aggregations. +""" +type DistributionChannelGroupedBy { + """ + The `active` field value for this group. + """ + active: Boolean + + """ + Offers the different grouping options for the `established_on` value within this group. + """ + established_on: DateGroupedBy +} + +""" +Type used to request desired `DistributionChannel` search highlight fields. +""" +type DistributionChannelHighlights { + """ + Search highlights for the `id`, providing snippets of the matching text. + """ + id: [String!]! +} + +""" +Enumerates the ways `DistributionChannel`s can be sorted. +""" +enum DistributionChannelSortOrderInput { + """ + Sorts ascending by the `established_on` field. + """ + established_on_ASC + + """ + Sorts descending by the `established_on` field. + """ + established_on_DESC + + """ + Sorts ascending by the `id` field. + """ + id_ASC + + """ + Sorts descending by the `id` field. + """ + id_DESC +} + +type ElectricalPart implements NamedEntity { + """ + Aggregations over the `components` data. + """ + component_aggregations( + """ + Used to forward-paginate through the `component_aggregations`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the `Component` documents that get aggregated over based on the provided criteria. + """ + filter: ComponentFilterInput """ Used in conjunction with the `after` argument to forward-paginate through the `component_aggregations`. @@ -7771,6 +7757,12 @@ type NonNumericAggregatedValues { approximate_distinct_value_count: JsonSafeLong } +type OnlineStore implements DistributionChannel & Retail & Store { + active: Boolean + established_on: Date + id: ID! +} + """ Provides information about the specific fetched page. This implements the `PageInfo` specification from the [Relay GraphQL Cursor Connections @@ -8151,84 +8143,202 @@ type PersonAggregatedValues { } """ -Return type representing a bucket of `Person` documents for an aggregations query. +Input type used to specify filters on `Person` fields. + +Will match all documents if passed as an empty object (or as `null`). """ -type PersonAggregation { - """ - Provides computed aggregated values over all `Person` documents in an aggregation bucket. +input PersonFilterInput { """ - aggregated_values: PersonAggregatedValues + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `PersonFilterInput` input because of collisions + between key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. """ - The count of `Person` documents in an aggregation bucket. + all_of: [PersonFilterInput!] + """ - count: JsonSafeLong! + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. """ - Used to specify the `Person` fields to group by. The returned values identify each aggregation bucket. + any_of: [PersonFilterInput!] + """ - grouped_by: PersonGroupedBy -} + Used to filter on the `id` field. -""" -Represents a paginated collection of `PersonAggregation` results. + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. -""" -type PersonAggregationConnection { """ - Wraps a specific `PersonAggregation` to pair it with its pagination cursor. + Used to filter on the `name` field. + + When `null` or an empty object is passed, matches all documents. """ - edges: [PersonAggregationEdge!]! + name: StringFilterInput """ - The list of `PersonAggregation` results. + Used to filter on the `nationality` field. + + When `null` or an empty object is passed, matches all documents. """ - nodes: [PersonAggregation!]! + nationality: StringFilterInput """ - Provides pagination-related information. + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. + + When `null` or an empty object is passed, matches no documents. """ - page_info: PageInfo! + not: PersonFilterInput } """ -Represents a specific `PersonAggregation` in the context of a `PersonAggregationConnection`, -providing access to both the `PersonAggregation` and query-specific information such as the pagination `Cursor`. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +Type used to specify the `Person` fields to group by for aggregations. """ -type PersonAggregationEdge { +type PersonGroupedBy { """ - The `Cursor` of this `PersonAggregation`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `PersonAggregation`. + The `name` field value for this group. """ - cursor: Cursor + name: String """ - The `PersonAggregation` of this edge. + The `nationality` field value for this group. """ - node: PersonAggregation + nationality: String } """ -Represents a paginated collection of `Person` results. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +Type used to request desired `Person` search highlight fields. """ -type PersonConnection { +type PersonHighlights { """ - Wraps a specific `Person` to pair it with its pagination cursor. + Search highlights for the `id`, providing snippets of the matching text. """ - edges: [PersonEdge!]! + id: [String!]! """ - The list of `Person` results. + Search highlights for the `name`, providing snippets of the matching text. + """ + name: [String!]! + + """ + Search highlights for the `nationality`, providing snippets of the matching text. + """ + nationality: [String!]! +} + +type PhysicalStore implements DistributionChannel & Retail & Store { + active: Boolean + established_on: Date + id: ID! +} + +""" +Type used to perform aggregation computations on `PhysicalStore` fields. +""" +type PhysicalStoreAggregatedValues { + """ + Computed aggregate values for the `active` field. + """ + active: NonNumericAggregatedValues + + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues + + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} + +""" +Return type representing a bucket of `PhysicalStore` documents for an aggregations query. +""" +type PhysicalStoreAggregation { + """ + Provides computed aggregated values over all `PhysicalStore` documents in an aggregation bucket. + """ + aggregated_values: PhysicalStoreAggregatedValues + + """ + The count of `PhysicalStore` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `PhysicalStore` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: PhysicalStoreGroupedBy +} + +""" +Represents a paginated collection of `PhysicalStoreAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type PhysicalStoreAggregationConnection { + """ + Wraps a specific `PhysicalStoreAggregation` to pair it with its pagination cursor. + """ + edges: [PhysicalStoreAggregationEdge!]! + + """ + The list of `PhysicalStoreAggregation` results. + """ + nodes: [PhysicalStoreAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `PhysicalStoreAggregation` in the context of a `PhysicalStoreAggregationConnection`, +providing access to both the `PhysicalStoreAggregation` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type PhysicalStoreAggregationEdge { + """ + The `Cursor` of this `PhysicalStoreAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `PhysicalStoreAggregation`. + """ + cursor: Cursor + + """ + The `PhysicalStoreAggregation` of this edge. + """ + node: PhysicalStoreAggregation +} + +""" +Represents a paginated collection of `PhysicalStore` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type PhysicalStoreConnection { + """ + Wraps a specific `PhysicalStore` to pair it with its pagination cursor. """ - nodes: [Person!]! + edges: [PhysicalStoreEdge!]! + + """ + The list of `PhysicalStore` results. + """ + nodes: [PhysicalStore!]! """ Provides pagination-related information. @@ -8242,52 +8352,59 @@ type PersonConnection { } """ -Represents a specific `Person` in the context of a `PersonConnection`, -providing access to both the `Person` and query-specific information such as the pagination `Cursor`. +Represents a specific `PhysicalStore` in the context of a `PhysicalStoreConnection`, +providing access to both the `PhysicalStore` and query-specific information such as the pagination `Cursor`. See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. """ -type PersonEdge { +type PhysicalStoreEdge { """ - All search highlights for this `Person`, indicating where in the indexed document the query matched. + All search highlights for this `PhysicalStore`, indicating where in the indexed document the query matched. """ all_highlights: [SearchHighlight!]! """ - The `Cursor` of this `Person`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `Person`. + The `Cursor` of this `PhysicalStore`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `PhysicalStore`. """ cursor: Cursor """ - Specific search highlights for this `Person`, providing matching snippets for the requested fields. + Specific search highlights for this `PhysicalStore`, providing matching snippets for the requested fields. """ - highlights: PersonHighlights + highlights: PhysicalStoreHighlights """ - The `Person` of this edge. + The `PhysicalStore` of this edge. """ - node: Person + node: PhysicalStore } """ -Input type used to specify filters on `Person` fields. +Input type used to specify filters on `PhysicalStore` fields. Will match all documents if passed as an empty object (or as `null`). """ -input PersonFilterInput { +input PhysicalStoreFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + """ Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't - be provided on a single `PersonFilterInput` input because of collisions + be provided on a single `PhysicalStoreFilterInput` input because of collisions between key names. For example, if you want to AND multiple OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. When `null` or an empty list is passed, matches all documents. """ - all_of: [PersonFilterInput!] + all_of: [PhysicalStoreFilterInput!] """ Matches records where any of the provided sub-filters evaluate to true. @@ -8296,28 +8413,21 @@ input PersonFilterInput { When `null` is passed, matches all documents. When an empty list is passed, this part of the filter matches no documents. """ - any_of: [PersonFilterInput!] - - """ - Used to filter on the `id` field. - - When `null` or an empty object is passed, matches all documents. - """ - id: IDFilterInput + any_of: [PhysicalStoreFilterInput!] """ - Used to filter on the `name` field. + Used to filter on the `established_on` field. When `null` or an empty object is passed, matches all documents. """ - name: StringFilterInput + established_on: DateFilterInput """ - Used to filter on the `nationality` field. + Used to filter on the `id` field. When `null` or an empty object is passed, matches all documents. """ - nationality: StringFilterInput + id: IDFilterInput """ Matches records where the provided sub-filter evaluates to false. @@ -8325,48 +8435,48 @@ input PersonFilterInput { When `null` or an empty object is passed, matches no documents. """ - not: PersonFilterInput + not: PhysicalStoreFilterInput } """ -Type used to specify the `Person` fields to group by for aggregations. +Type used to specify the `PhysicalStore` fields to group by for aggregations. """ -type PersonGroupedBy { +type PhysicalStoreGroupedBy { """ - The `name` field value for this group. + The `active` field value for this group. """ - name: String + active: Boolean """ - The `nationality` field value for this group. + Offers the different grouping options for the `established_on` value within this group. """ - nationality: String + established_on: DateGroupedBy } """ -Type used to request desired `Person` search highlight fields. +Type used to request desired `PhysicalStore` search highlight fields. """ -type PersonHighlights { +type PhysicalStoreHighlights { """ Search highlights for the `id`, providing snippets of the matching text. """ id: [String!]! +} +""" +Enumerates the ways `PhysicalStore`s can be sorted. +""" +enum PhysicalStoreSortOrderInput { """ - Search highlights for the `name`, providing snippets of the matching text. + Sorts ascending by the `established_on` field. """ - name: [String!]! + established_on_ASC """ - Search highlights for the `nationality`, providing snippets of the matching text. + Sorts descending by the `established_on` field. """ - nationality: [String!]! -} + established_on_DESC -""" -Enumerates the ways `Person`s can be sorted. -""" -enum PersonSortOrderInput { """ Sorts ascending by the `id` field. """ @@ -8376,26 +8486,6 @@ enum PersonSortOrderInput { Sorts descending by the `id` field. """ id_DESC - - """ - Sorts ascending by the `name` field. - """ - name_ASC - - """ - Sorts descending by the `name` field. - """ - name_DESC - - """ - Sorts ascending by the `nationality` field. - """ - nationality_ASC - - """ - Sorts descending by the `nationality` field. - """ - nationality_DESC } type Player { @@ -9144,11 +9234,13 @@ type Query { ): AddressConnection """ - Fetches `Company`s based on the provided arguments. + Aggregations over the `components` data: + + > Fetches `Component`s based on the provided arguments. """ - companies( + component_aggregations( """ - Used to forward-paginate through the `companies`. When provided, the next page after the + Used to forward-paginate through the `component_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9157,7 +9249,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `companies`. When provided, the previous page before the + Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9166,14 +9258,14 @@ type Query { before: Cursor """ - Used to filter the returned `companies` based on the provided criteria. + Used to filter the `Component` documents that get aggregated over based on the provided criteria. """ - filter: CompanyFilterInput + filter: ComponentFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `companies`. + Used in conjunction with the `after` argument to forward-paginate through the `component_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `companies`, if no `after` cursor is provided). + `after` cursor (or from the start of the `component_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9181,29 +9273,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `companies`. + Used in conjunction with the `before` argument to backward-paginate through the `component_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `companies`, if no `before` cursor is provided). + `before` cursor (or from the end of the `component_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - - """ - Used to specify how the returned `companies` should be sorted. - """ - order_by: [CompanySortOrderInput!] - ): CompanyConnection + ): ComponentAggregationConnection """ - Aggregations over the `companies` data: - - > Fetches `Company`s based on the provided arguments. + Fetches `Component`s based on the provided arguments. """ - company_aggregations( + components( """ - Used to forward-paginate through the `company_aggregations`. When provided, the next page after the + Used to forward-paginate through the `components`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9212,7 +9297,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `company_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `components`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9221,14 +9306,14 @@ type Query { before: Cursor """ - Used to filter the `Company` documents that get aggregated over based on the provided criteria. + Used to filter the returned `components` based on the provided criteria. """ - filter: CompanyFilterInput + filter: ComponentFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `company_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `components`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `company_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `components`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9236,24 +9321,29 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `company_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `components`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `company_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `components`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): CompanyAggregationConnection + + """ + Used to specify how the returned `components` should be sorted. + """ + order_by: [ComponentSortOrderInput!] + ): ComponentConnection """ - Aggregations over the `components` data: + Aggregations over the `distribution_channels` data: - > Fetches `Component`s based on the provided arguments. + > Fetches `DistributionChannel`s based on the provided arguments. """ - component_aggregations( + distribution_channel_aggregations( """ - Used to forward-paginate through the `component_aggregations`. When provided, the next page after the + Used to forward-paginate through the `distribution_channel_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9262,7 +9352,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `distribution_channel_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9271,14 +9361,14 @@ type Query { before: Cursor """ - Used to filter the `Component` documents that get aggregated over based on the provided criteria. + Used to filter the `DistributionChannel` documents that get aggregated over based on the provided criteria. """ - filter: ComponentFilterInput + filter: DistributionChannelFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `component_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `distribution_channel_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `component_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `distribution_channel_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9286,22 +9376,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `component_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `distribution_channel_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `component_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `distribution_channel_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): ComponentAggregationConnection + ): DistributionChannelAggregationConnection """ - Fetches `Component`s based on the provided arguments. + Fetches `DistributionChannel`s based on the provided arguments. """ - components( + distribution_channels( """ - Used to forward-paginate through the `components`. When provided, the next page after the + Used to forward-paginate through the `distribution_channels`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9310,7 +9400,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `components`. When provided, the previous page before the + Used to backward-paginate through the `distribution_channels`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9319,14 +9409,14 @@ type Query { before: Cursor """ - Used to filter the returned `components` based on the provided criteria. + Used to filter the returned `distribution_channels` based on the provided criteria. """ - filter: ComponentFilterInput + filter: DistributionChannelFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `components`. + Used in conjunction with the `after` argument to forward-paginate through the `distribution_channels`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `components`, if no `after` cursor is provided). + `after` cursor (or from the start of the `distribution_channels`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9334,9 +9424,9 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `components`. + Used in conjunction with the `before` argument to backward-paginate through the `distribution_channels`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `components`, if no `before` cursor is provided). + `before` cursor (or from the end of the `distribution_channels`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9344,10 +9434,10 @@ type Query { last: Int """ - Used to specify how the returned `components` should be sorted. + Used to specify how the returned `distribution_channels` should be sorted. """ - order_by: [ComponentSortOrderInput!] - ): ComponentConnection + order_by: [DistributionChannelSortOrderInput!] + ): DistributionChannelConnection """ Aggregations over the `electrical_parts` data: @@ -10071,11 +10161,13 @@ type Query { ): PartConnection """ - Fetches `Person`s based on the provided arguments. + Aggregations over the `physical_stores` data: + + > Fetches `PhysicalStore`s based on the provided arguments. """ - people( + physical_store_aggregations( """ - Used to forward-paginate through the `people`. When provided, the next page after the + Used to forward-paginate through the `physical_store_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10084,7 +10176,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `people`. When provided, the previous page before the + Used to backward-paginate through the `physical_store_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10093,14 +10185,14 @@ type Query { before: Cursor """ - Used to filter the returned `people` based on the provided criteria. + Used to filter the `PhysicalStore` documents that get aggregated over based on the provided criteria. """ - filter: PersonFilterInput + filter: PhysicalStoreFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `people`. + Used in conjunction with the `after` argument to forward-paginate through the `physical_store_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `people`, if no `after` cursor is provided). + `after` cursor (or from the start of the `physical_store_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10108,29 +10200,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `people`. + Used in conjunction with the `before` argument to backward-paginate through the `physical_store_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `people`, if no `before` cursor is provided). + `before` cursor (or from the end of the `physical_store_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - - """ - Used to specify how the returned `people` should be sorted. - """ - order_by: [PersonSortOrderInput!] - ): PersonConnection + ): PhysicalStoreAggregationConnection """ - Aggregations over the `people` data: - - > Fetches `Person`s based on the provided arguments. + Fetches `PhysicalStore`s based on the provided arguments. """ - person_aggregations( + physical_stores( """ - Used to forward-paginate through the `person_aggregations`. When provided, the next page after the + Used to forward-paginate through the `physical_stores`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10139,7 +10224,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `person_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `physical_stores`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10148,14 +10233,14 @@ type Query { before: Cursor """ - Used to filter the `Person` documents that get aggregated over based on the provided criteria. + Used to filter the returned `physical_stores` based on the provided criteria. """ - filter: PersonFilterInput + filter: PhysicalStoreFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `person_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `physical_stores`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `person_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `physical_stores`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10163,24 +10248,29 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `person_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `physical_stores`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `person_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `physical_stores`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): PersonAggregationConnection + + """ + Used to specify how the returned `physical_stores` should be sorted. + """ + order_by: [PhysicalStoreSortOrderInput!] + ): PhysicalStoreConnection """ - Aggregations over the `sponsors` data: + Aggregations over the `retailers` data: - > Fetches `Sponsor`s based on the provided arguments. + > Fetches `Retail`s based on the provided arguments. """ - sponsor_aggregations( + retail_aggregations( """ - Used to forward-paginate through the `sponsor_aggregations`. When provided, the next page after the + Used to forward-paginate through the `retail_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10189,7 +10279,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `sponsor_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `retail_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10198,14 +10288,14 @@ type Query { before: Cursor """ - Used to filter the `Sponsor` documents that get aggregated over based on the provided criteria. + Used to filter the `Retail` documents that get aggregated over based on the provided criteria. """ - filter: SponsorFilterInput + filter: RetailFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `sponsor_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `retail_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `sponsor_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `retail_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10213,22 +10303,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `sponsor_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `retail_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `sponsor_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `retail_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): SponsorAggregationConnection + ): RetailAggregationConnection """ - Fetches `Sponsor`s based on the provided arguments. + Fetches `Retail`s based on the provided arguments. """ - sponsors( + retailers( """ - Used to forward-paginate through the `sponsors`. When provided, the next page after the + Used to forward-paginate through the `retailers`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10237,7 +10327,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `sponsors`. When provided, the previous page before the + Used to backward-paginate through the `retailers`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10246,14 +10336,14 @@ type Query { before: Cursor """ - Used to filter the returned `sponsors` based on the provided criteria. + Used to filter the returned `retailers` based on the provided criteria. """ - filter: SponsorFilterInput + filter: RetailFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `sponsors`. + Used in conjunction with the `after` argument to forward-paginate through the `retailers`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `sponsors`, if no `after` cursor is provided). + `after` cursor (or from the start of the `retailers`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10261,9 +10351,9 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `sponsors`. + Used in conjunction with the `before` argument to backward-paginate through the `retailers`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `sponsors`, if no `before` cursor is provided). + `before` cursor (or from the end of the `retailers`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10271,19 +10361,19 @@ type Query { last: Int """ - Used to specify how the returned `sponsors` should be sorted. + Used to specify how the returned `retailers` should be sorted. """ - order_by: [SponsorSortOrderInput!] - ): SponsorConnection + order_by: [RetailSortOrderInput!] + ): RetailConnection """ - Aggregations over the `teams` data: + Aggregations over the `sponsors` data: - > Fetches `Team`s based on the provided arguments. + > Fetches `Sponsor`s based on the provided arguments. """ - team_aggregations( + sponsor_aggregations( """ - Used to forward-paginate through the `team_aggregations`. When provided, the next page after the + Used to forward-paginate through the `sponsor_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10292,7 +10382,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `team_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `sponsor_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10301,14 +10391,14 @@ type Query { before: Cursor """ - Used to filter the `Team` documents that get aggregated over based on the provided criteria. + Used to filter the `Sponsor` documents that get aggregated over based on the provided criteria. """ - filter: TeamFilterInput + filter: SponsorFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `team_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `sponsor_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `team_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `sponsor_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10316,15 +10406,221 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `team_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `sponsor_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `team_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `sponsor_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): TeamAggregationConnection + ): SponsorAggregationConnection + + """ + Fetches `Sponsor`s based on the provided arguments. + """ + sponsors( + """ + Used to forward-paginate through the `sponsors`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `sponsors`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the returned `sponsors` based on the provided criteria. + """ + filter: SponsorFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `sponsors`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `sponsors`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `sponsors`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `sponsors`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + + """ + Used to specify how the returned `sponsors` should be sorted. + """ + order_by: [SponsorSortOrderInput!] + ): SponsorConnection + + """ + Aggregations over the `stores` data: + + > Fetches `Store`s based on the provided arguments. + """ + store_aggregations( + """ + Used to forward-paginate through the `store_aggregations`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `store_aggregations`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the `Store` documents that get aggregated over based on the provided criteria. + """ + filter: StoreFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `store_aggregations`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `store_aggregations`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `store_aggregations`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `store_aggregations`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + ): StoreAggregationConnection + + """ + Fetches `Store`s based on the provided arguments. + """ + stores( + """ + Used to forward-paginate through the `stores`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `stores`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the returned `stores` based on the provided criteria. + """ + filter: StoreFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `stores`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `stores`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `stores`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `stores`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + + """ + Used to specify how the returned `stores` should be sorted. + """ + order_by: [StoreSortOrderInput!] + ): StoreConnection + + """ + Aggregations over the `teams` data: + + > Fetches `Team`s based on the provided arguments. + """ + team_aggregations( + """ + Used to forward-paginate through the `team_aggregations`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `team_aggregations`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the `Team` documents that get aggregated over based on the provided criteria. + """ + filter: TeamFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `team_aggregations`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `team_aggregations`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `team_aggregations`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `team_aggregations`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + ): TeamAggregationConnection """ Fetches `Team`s based on the provided arguments. @@ -10756,45 +11052,299 @@ type Query { """ after: Cursor - """ - Used to backward-paginate through the `widgets_or_addresses`. When provided, the previous page before the - provided cursor will be returned. + """ + Used to backward-paginate through the `widgets_or_addresses`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the returned `widgets_or_addresses` based on the provided criteria. + """ + filter: WidgetOrAddressFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `widgets_or_addresses`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `widgets_or_addresses`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `widgets_or_addresses`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `widgets_or_addresses`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + + """ + Used to specify how the returned `widgets_or_addresses` should be sorted. + """ + order_by: [WidgetOrAddressSortOrderInput!] + ): WidgetOrAddressConnection +} + +interface Retail implements DistributionChannel { + active: Boolean + established_on: Date + id: ID! +} + +""" +Type used to perform aggregation computations on `Retail` fields. +""" +type RetailAggregatedValues { + """ + Computed aggregate values for the `active` field. + """ + active: NonNumericAggregatedValues + + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues + + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} + +""" +Return type representing a bucket of `Retail` documents for an aggregations query. +""" +type RetailAggregation { + """ + Provides computed aggregated values over all `Retail` documents in an aggregation bucket. + """ + aggregated_values: RetailAggregatedValues + + """ + The count of `Retail` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `Retail` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: RetailGroupedBy +} + +""" +Represents a paginated collection of `RetailAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type RetailAggregationConnection { + """ + Wraps a specific `RetailAggregation` to pair it with its pagination cursor. + """ + edges: [RetailAggregationEdge!]! + + """ + The list of `RetailAggregation` results. + """ + nodes: [RetailAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `RetailAggregation` in the context of a `RetailAggregationConnection`, +providing access to both the `RetailAggregation` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type RetailAggregationEdge { + """ + The `Cursor` of this `RetailAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `RetailAggregation`. + """ + cursor: Cursor + + """ + The `RetailAggregation` of this edge. + """ + node: RetailAggregation +} + +""" +Represents a paginated collection of `Retail` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type RetailConnection { + """ + Wraps a specific `Retail` to pair it with its pagination cursor. + """ + edges: [RetailEdge!]! + + """ + The list of `Retail` results. + """ + nodes: [Retail!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! + + """ + The total number of edges available in this connection to paginate over. + """ + total_edge_count: JsonSafeLong! +} + +""" +Represents a specific `Retail` in the context of a `RetailConnection`, +providing access to both the `Retail` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type RetailEdge { + """ + All search highlights for this `Retail`, indicating where in the indexed document the query matched. + """ + all_highlights: [SearchHighlight!]! + + """ + The `Cursor` of this `Retail`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `Retail`. + """ + cursor: Cursor + + """ + Specific search highlights for this `Retail`, providing matching snippets for the requested fields. + """ + highlights: RetailHighlights + + """ + The `Retail` of this edge. + """ + node: Retail +} + +""" +Input type used to specify filters on `Retail` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input RetailFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + + """ + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `RetailFilterInput` input because of collisions + between key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. + """ + all_of: [RetailFilterInput!] + + """ + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. + """ + any_of: [RetailFilterInput!] + + """ + Used to filter on the `established_on` field. + + When `null` or an empty object is passed, matches all documents. + """ + established_on: DateFilterInput + + """ + Used to filter on the `id` field. + + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput + + """ + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - before: Cursor + When `null` or an empty object is passed, matches no documents. + """ + not: RetailFilterInput +} - """ - Used to filter the returned `widgets_or_addresses` based on the provided criteria. - """ - filter: WidgetOrAddressFilterInput +""" +Type used to specify the `Retail` fields to group by for aggregations. +""" +type RetailGroupedBy { + """ + The `active` field value for this group. + """ + active: Boolean - """ - Used in conjunction with the `after` argument to forward-paginate through the `widgets_or_addresses`. - When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `widgets_or_addresses`, if no `after` cursor is provided). + """ + Offers the different grouping options for the `established_on` value within this group. + """ + established_on: DateGroupedBy +} - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - first: Int +""" +Type used to request desired `Retail` search highlight fields. +""" +type RetailHighlights { + """ + Search highlights for the `id`, providing snippets of the matching text. + """ + id: [String!]! +} - """ - Used in conjunction with the `before` argument to backward-paginate through the `widgets_or_addresses`. - When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `widgets_or_addresses`, if no `before` cursor is provided). +""" +Enumerates the ways `Retail`s can be sorted. +""" +enum RetailSortOrderInput { + """ + Sorts ascending by the `established_on` field. + """ + established_on_ASC - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - last: Int + """ + Sorts descending by the `established_on` field. + """ + established_on_DESC - """ - Used to specify how the returned `widgets_or_addresses` should be sorted. - """ - order_by: [WidgetOrAddressSortOrderInput!] - ): WidgetOrAddressConnection + """ + Sorts ascending by the `id` field. + """ + id_ASC + + """ + Sorts descending by the `id` field. + """ + id_DESC } """ @@ -11608,6 +12158,260 @@ input SponsorshipListFilterInput { not: SponsorshipListFilterInput } +interface Store implements DistributionChannel & Retail { + active: Boolean + established_on: Date + id: ID! +} + +""" +Type used to perform aggregation computations on `Store` fields. +""" +type StoreAggregatedValues { + """ + Computed aggregate values for the `active` field. + """ + active: NonNumericAggregatedValues + + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues + + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} + +""" +Return type representing a bucket of `Store` documents for an aggregations query. +""" +type StoreAggregation { + """ + Provides computed aggregated values over all `Store` documents in an aggregation bucket. + """ + aggregated_values: StoreAggregatedValues + + """ + The count of `Store` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `Store` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: StoreGroupedBy +} + +""" +Represents a paginated collection of `StoreAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type StoreAggregationConnection { + """ + Wraps a specific `StoreAggregation` to pair it with its pagination cursor. + """ + edges: [StoreAggregationEdge!]! + + """ + The list of `StoreAggregation` results. + """ + nodes: [StoreAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `StoreAggregation` in the context of a `StoreAggregationConnection`, +providing access to both the `StoreAggregation` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type StoreAggregationEdge { + """ + The `Cursor` of this `StoreAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `StoreAggregation`. + """ + cursor: Cursor + + """ + The `StoreAggregation` of this edge. + """ + node: StoreAggregation +} + +""" +Represents a paginated collection of `Store` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type StoreConnection { + """ + Wraps a specific `Store` to pair it with its pagination cursor. + """ + edges: [StoreEdge!]! + + """ + The list of `Store` results. + """ + nodes: [Store!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! + + """ + The total number of edges available in this connection to paginate over. + """ + total_edge_count: JsonSafeLong! +} + +""" +Represents a specific `Store` in the context of a `StoreConnection`, +providing access to both the `Store` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type StoreEdge { + """ + All search highlights for this `Store`, indicating where in the indexed document the query matched. + """ + all_highlights: [SearchHighlight!]! + + """ + The `Cursor` of this `Store`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `Store`. + """ + cursor: Cursor + + """ + Specific search highlights for this `Store`, providing matching snippets for the requested fields. + """ + highlights: StoreHighlights + + """ + The `Store` of this edge. + """ + node: Store +} + +""" +Input type used to specify filters on `Store` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input StoreFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + + """ + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `StoreFilterInput` input because of collisions between + key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. + """ + all_of: [StoreFilterInput!] + + """ + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. + """ + any_of: [StoreFilterInput!] + + """ + Used to filter on the `established_on` field. + + When `null` or an empty object is passed, matches all documents. + """ + established_on: DateFilterInput + + """ + Used to filter on the `id` field. + + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput + + """ + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. + + When `null` or an empty object is passed, matches no documents. + """ + not: StoreFilterInput +} + +""" +Type used to specify the `Store` fields to group by for aggregations. +""" +type StoreGroupedBy { + """ + The `active` field value for this group. + """ + active: Boolean + + """ + Offers the different grouping options for the `established_on` value within this group. + """ + established_on: DateGroupedBy +} + +""" +Type used to request desired `Store` search highlight fields. +""" +type StoreHighlights { + """ + Search highlights for the `id`, providing snippets of the matching text. + """ + id: [String!]! +} + +""" +Enumerates the ways `Store`s can be sorted. +""" +enum StoreSortOrderInput { + """ + Sorts ascending by the `established_on` field. + """ + established_on_ASC + + """ + Sorts descending by the `established_on` field. + """ + established_on_DESC + + """ + Sorts ascending by the `id` field. + """ + id_ASC + + """ + Sorts descending by the `id` field. + """ + id_DESC +} + """ Represents a paginated collection of `String` results. @@ -14160,6 +14964,11 @@ input TextFilterInput { not: TextFilterInput } +type ThirdPartyWholesale implements DistributionChannel { + active: Boolean + id: ID! +} + """ An [IANA time zone identifier](https://www.iana.org/time-zones), such as `America/Los_Angeles` or `UTC`. diff --git a/config/schema/artifacts_with_apollo/data_warehouse.yaml b/config/schema/artifacts_with_apollo/data_warehouse.yaml index 3388a7164..e6d7bec07 100644 --- a/config/schema/artifacts_with_apollo/data_warehouse.yaml +++ b/config/schema/artifacts_with_apollo/data_warehouse.yaml @@ -14,13 +14,6 @@ tables: shapes ARRAY>>, manufacturer_id STRING ) - companies: - table_schema: |- - CREATE TABLE IF NOT EXISTS companies ( - id STRING, - name STRING, - stock_ticker STRING - ) components: table_schema: |- CREATE TABLE IF NOT EXISTS components ( @@ -38,6 +31,14 @@ tables: owner_ids ARRAY, owner_id STRING ) + distribution_channels: + table_schema: |- + CREATE TABLE IF NOT EXISTS distribution_channels ( + id STRING, + established_on DATE, + active BOOLEAN, + __typename STRING + ) electrical_parts: table_schema: |- CREATE TABLE IF NOT EXISTS electrical_parts ( @@ -53,7 +54,7 @@ tables: id STRING, name STRING, created_at TIMESTAMP, - ceo STRUCT + ceo STRUCT ) mechanical_parts: table_schema: |- @@ -64,12 +65,21 @@ tables: material STRING, manufacturer_id STRING ) - people: + named_inventors: table_schema: |- - CREATE TABLE IF NOT EXISTS people ( + CREATE TABLE IF NOT EXISTS named_inventors ( id STRING, name STRING, - nationality STRING + nationality STRING, + __typename STRING, + stock_ticker STRING + ) + physical_stores: + table_schema: |- + CREATE TABLE IF NOT EXISTS physical_stores ( + id STRING, + established_on DATE, + active BOOLEAN ) sponsors: table_schema: |- @@ -142,8 +152,8 @@ tables: internal_details STRUCT, internal_highlightable_details STRUCT, the_opts STRUCT, - inventor STRUCT, - named_inventor STRUCT, + inventor STRUCT, + named_inventor STRUCT, weight_in_ng_str BIGINT, weight_in_ng BIGINT, tags ARRAY, diff --git a/config/schema/artifacts_with_apollo/datastore_config.yaml b/config/schema/artifacts_with_apollo/datastore_config.yaml index 7976cf8a8..3ca61c0c5 100644 --- a/config/schema/artifacts_with_apollo/datastore_config.yaml +++ b/config/schema/artifacts_with_apollo/datastore_config.yaml @@ -1531,30 +1531,6 @@ indices: index.number_of_replicas: 1 index.number_of_shards: 1 index.max_result_window: 10000 - companies: - aliases: {} - mappings: - dynamic: strict - properties: - id: - type: keyword - name: - type: keyword - stock_ticker: - type: keyword - __sources: - type: keyword - __versions: - type: object - dynamic: 'false' - _size: - enabled: true - settings: - index.mapping.ignore_malformed: false - index.mapping.coerce: false - index.number_of_replicas: 1 - index.number_of_shards: 1 - index.max_result_window: 10000 components: aliases: {} mappings: @@ -1618,6 +1594,33 @@ indices: index.number_of_replicas: 1 index.number_of_shards: 1 index.max_result_window: 10000 + distribution_channels: + aliases: {} + mappings: + dynamic: strict + properties: + id: + type: keyword + established_on: + type: date + format: strict_date + active: + type: boolean + __typename: + type: keyword + __sources: + type: keyword + __versions: + type: object + dynamic: 'false' + _size: + enabled: true + settings: + index.mapping.ignore_malformed: false + index.mapping.coerce: false + index.number_of_replicas: 1 + index.number_of_shards: 1 + index.max_result_window: 10000 electrical_parts: aliases: {} mappings: @@ -1709,7 +1712,7 @@ indices: index.number_of_replicas: 1 index.number_of_shards: 1 index.max_result_window: 10000 - people: + named_inventors: aliases: {} mappings: dynamic: strict @@ -1720,6 +1723,35 @@ indices: type: keyword nationality: type: keyword + stock_ticker: + type: keyword + __typename: + type: keyword + __sources: + type: keyword + __versions: + type: object + dynamic: 'false' + _size: + enabled: true + settings: + index.mapping.ignore_malformed: false + index.mapping.coerce: false + index.number_of_replicas: 1 + index.number_of_shards: 1 + index.max_result_window: 10000 + physical_stores: + aliases: {} + mappings: + dynamic: strict + properties: + id: + type: keyword + established_on: + type: date + format: strict_date + active: + type: boolean __sources: type: keyword __versions: diff --git a/config/schema/artifacts_with_apollo/json_schemas.yaml b/config/schema/artifacts_with_apollo/json_schemas.yaml index f46e562cd..3f0a6f2a3 100644 --- a/config/schema/artifacts_with_apollo/json_schemas.yaml +++ b/config/schema/artifacts_with_apollo/json_schemas.yaml @@ -28,9 +28,12 @@ json_schema_version: 1 - ElectricalPart - Manufacturer - MechanicalPart + - OnlineStore - Person + - PhysicalStore - Sponsor - Team + - ThirdPartyWholesale - Widget - WidgetWorkspace id: @@ -445,6 +448,29 @@ json_schema_version: 1 oneOf: - "$ref": "#/$defs/Person" - "$ref": "#/$defs/Company" + OnlineStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + __typename: + type: string + const: OnlineStore + default: OnlineStore + required: + - id + - established_on + - active Person: type: object properties: @@ -472,6 +498,29 @@ json_schema_version: 1 - id - name - nationality + PhysicalStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + __typename: + type: string + const: PhysicalStore + default: PhysicalStore + required: + - id + - established_on + - active Player: type: object properties: @@ -819,6 +868,24 @@ json_schema_version: 1 - was_shortened - players_nested - players_object + ThirdPartyWholesale: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + __typename: + type: string + const: ThirdPartyWholesale + default: ThirdPartyWholesale + required: + - id + - active Untyped: type: - array diff --git a/config/schema/artifacts_with_apollo/json_schemas_by_version/v1.yaml b/config/schema/artifacts_with_apollo/json_schemas_by_version/v1.yaml index d657699e7..bb5079fc4 100644 --- a/config/schema/artifacts_with_apollo/json_schemas_by_version/v1.yaml +++ b/config/schema/artifacts_with_apollo/json_schemas_by_version/v1.yaml @@ -28,9 +28,12 @@ json_schema_version: 1 - ElectricalPart - Manufacturer - MechanicalPart + - OnlineStore - Person + - PhysicalStore - Sponsor - Team + - ThirdPartyWholesale - Widget - WidgetWorkspace id: @@ -565,6 +568,38 @@ json_schema_version: 1 oneOf: - "$ref": "#/$defs/Person" - "$ref": "#/$defs/Company" + OnlineStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + ElasticGraph: + type: ID! + nameInIndex: id + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + ElasticGraph: + type: Date + nameInIndex: established_on + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + ElasticGraph: + type: Boolean + nameInIndex: active + __typename: + type: string + const: OnlineStore + default: OnlineStore + required: + - id + - established_on + - active Person: type: object properties: @@ -601,6 +636,38 @@ json_schema_version: 1 - id - name - nationality + PhysicalStore: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + ElasticGraph: + type: ID! + nameInIndex: id + established_on: + anyOf: + - "$ref": "#/$defs/Date" + - type: 'null' + ElasticGraph: + type: Date + nameInIndex: established_on + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + ElasticGraph: + type: Boolean + nameInIndex: active + __typename: + type: string + const: PhysicalStore + default: PhysicalStore + required: + - id + - established_on + - active Player: type: object properties: @@ -1098,6 +1165,30 @@ json_schema_version: 1 - was_shortened - players_nested - players_object + ThirdPartyWholesale: + type: object + properties: + id: + allOf: + - "$ref": "#/$defs/ID" + - maxLength: 8191 + ElasticGraph: + type: ID! + nameInIndex: id + active: + anyOf: + - "$ref": "#/$defs/Boolean" + - type: 'null' + ElasticGraph: + type: Boolean + nameInIndex: active + __typename: + type: string + const: ThirdPartyWholesale + default: ThirdPartyWholesale + required: + - id + - active Untyped: type: - array diff --git a/config/schema/artifacts_with_apollo/runtime_metadata.yaml b/config/schema/artifacts_with_apollo/runtime_metadata.yaml index 905f02919..4fd4d59a5 100644 --- a/config/schema/artifacts_with_apollo/runtime_metadata.yaml +++ b/config/schema/artifacts_with_apollo/runtime_metadata.yaml @@ -21,32 +21,6 @@ enum_types_by_name: sort_field: direction: desc field_path: timestamps.created_at - CompanySortOrderInput: - values_by_name: - id_ASC: - sort_field: - direction: asc - field_path: id - id_DESC: - sort_field: - direction: desc - field_path: id - name_ASC: - sort_field: - direction: asc - field_path: name - name_DESC: - sort_field: - direction: desc - field_path: name - stock_ticker_ASC: - sort_field: - direction: asc - field_path: stock_ticker - stock_ticker_DESC: - sort_field: - direction: desc - field_path: stock_ticker ComponentSortOrderInput: values_by_name: created_at_ASC: @@ -201,6 +175,24 @@ enum_types_by_name: datastore_abbreviation: nmi YARD: datastore_abbreviation: yd + DistributionChannelSortOrderInput: + values_by_name: + established_on_ASC: + sort_field: + direction: asc + field_path: established_on + established_on_DESC: + sort_field: + direction: desc + field_path: established_on + id_ASC: + sort_field: + direction: asc + field_path: id + id_DESC: + sort_field: + direction: desc + field_path: id ElectricalPartSortOrderInput: values_by_name: created_at_ASC: @@ -871,8 +863,16 @@ enum_types_by_name: sort_field: direction: desc field_path: voltage - PersonSortOrderInput: + PhysicalStoreSortOrderInput: values_by_name: + established_on_ASC: + sort_field: + direction: asc + field_path: established_on + established_on_DESC: + sort_field: + direction: desc + field_path: established_on id_ASC: sort_field: direction: asc @@ -881,22 +881,24 @@ enum_types_by_name: sort_field: direction: desc field_path: id - name_ASC: + RetailSortOrderInput: + values_by_name: + established_on_ASC: sort_field: direction: asc - field_path: name - name_DESC: + field_path: established_on + established_on_DESC: sort_field: direction: desc - field_path: name - nationality_ASC: + field_path: established_on + id_ASC: sort_field: direction: asc - field_path: nationality - nationality_DESC: + field_path: id + id_DESC: sort_field: direction: desc - field_path: nationality + field_path: id SponsorSortOrderInput: values_by_name: id_ASC: @@ -915,6 +917,24 @@ enum_types_by_name: sort_field: direction: desc field_path: name + StoreSortOrderInput: + values_by_name: + established_on_ASC: + sort_field: + direction: asc + field_path: established_on + established_on_DESC: + sort_field: + direction: desc + field_path: established_on + id_ASC: + sort_field: + direction: asc + field_path: id + id_DESC: + sort_field: + direction: desc + field_path: id TeamSortOrderInput: values_by_name: country_code_ASC: @@ -1803,17 +1823,6 @@ index_definitions_by_name: timestamps.created_at: source: __self route_with: id - companies: - current_sources: - - __self - fields_by_path: - id: - source: __self - name: - source: __self - stock_ticker: - source: __self - route_with: id components: current_sources: - __self @@ -1862,6 +1871,17 @@ index_definitions_by_name: source: widget has_had_multiple_sources: true route_with: id + distribution_channels: + current_sources: + - __self + fields_by_path: + active: + source: __self + established_on: + source: __self + id: + source: __self + route_with: id electrical_parts: current_sources: - __self @@ -1918,7 +1938,7 @@ index_definitions_by_name: name: source: __self route_with: id - people: + named_inventors: current_sources: - __self fields_by_path: @@ -1928,6 +1948,19 @@ index_definitions_by_name: source: __self nationality: source: __self + stock_ticker: + source: __self + route_with: id + physical_stores: + current_sources: + - __self + fields_by_path: + active: + source: __self + established_on: + source: __self + id: + source: __self route_with: id sponsors: current_sources: @@ -3221,9 +3254,11 @@ object_types_by_name: resolver: name: get_record_field_value index_definition_names: - - companies + - named_inventors update_targets: - data_params: + __typename: + cardinality: one name: cardinality: one stock_ticker: @@ -3244,100 +3279,6 @@ object_types_by_name: routing_value_source: id script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a type: Company - CompanyAggregatedValues: - graphql_fields_by_name: - id: - resolver: - name: object_with_lookahead - name: - resolver: - name: object_with_lookahead - stock_ticker: - resolver: - name: object_with_lookahead - CompanyAggregation: - elasticgraph_category: indexed_aggregation - graphql_fields_by_name: - aggregated_values: - resolver: - name: object_without_lookahead - count: - resolver: - name: object_without_lookahead - grouped_by: - resolver: - name: object_without_lookahead - source_type: Company - CompanyAggregationConnection: - elasticgraph_category: relay_connection - graphql_fields_by_name: - edges: - resolver: - name: object_without_lookahead - nodes: - resolver: - name: object_without_lookahead - page_info: - resolver: - name: object_without_lookahead - CompanyAggregationEdge: - elasticgraph_category: relay_edge - graphql_fields_by_name: - cursor: - resolver: - name: object_without_lookahead - node: - resolver: - name: object_without_lookahead - CompanyConnection: - elasticgraph_category: relay_connection - graphql_fields_by_name: - edges: - resolver: - name: object_without_lookahead - nodes: - resolver: - name: object_without_lookahead - page_info: - resolver: - name: object_without_lookahead - total_edge_count: - resolver: - name: object_without_lookahead - CompanyEdge: - elasticgraph_category: relay_edge - graphql_fields_by_name: - all_highlights: - resolver: - name: object_without_lookahead - cursor: - resolver: - name: object_without_lookahead - highlights: - resolver: - name: object_without_lookahead - node: - resolver: - name: object_without_lookahead - CompanyGroupedBy: - graphql_fields_by_name: - name: - resolver: - name: object_with_lookahead - stock_ticker: - resolver: - name: object_with_lookahead - CompanyHighlights: - graphql_fields_by_name: - id: - resolver: - name: get_record_field_value - name: - resolver: - name: get_record_field_value - stock_ticker: - resolver: - name: get_record_field_value Component: graphql_fields_by_name: created_at: @@ -3787,81 +3728,31 @@ object_types_by_name: graphql_fields_by_name: count: name_in_index: __counts - ElectricalPart: + DistributionChannel: graphql_fields_by_name: - component_aggregations: - relation: - direction: in - foreign_key: part_ids - resolver: - name: nested_relationships - components: - relation: - direction: in - foreign_key: part_ids - resolver: - name: nested_relationships - created_at: + active: resolver: name: get_record_field_value - id: - resolver: - name: get_record_field_value - manufacturer: - relation: - direction: out - foreign_key: manufacturer_id - resolver: - name: nested_relationships - name: + established_on: resolver: name: get_record_field_value - voltage: + id: resolver: name: get_record_field_value index_definition_names: - - electrical_parts - update_targets: - - data_params: - created_at: - cardinality: one - manufacturer_id: - cardinality: one - name: - cardinality: one - voltage: - cardinality: one - id_source: id - metadata_params: - relationship: - value: __self - sourceId: - cardinality: one - source_path: id - sourceType: - cardinality: one - source_path: type - version: - cardinality: one - relationship: __self - routing_value_source: id - script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a - type: ElectricalPart - ElectricalPartAggregatedValues: + - distribution_channels + DistributionChannelAggregatedValues: graphql_fields_by_name: - created_at: - resolver: - name: object_with_lookahead - id: + active: resolver: name: object_with_lookahead - name: + established_on: resolver: name: object_with_lookahead - voltage: + id: resolver: name: object_with_lookahead - ElectricalPartAggregation: + DistributionChannelAggregation: elasticgraph_category: indexed_aggregation graphql_fields_by_name: aggregated_values: @@ -3873,8 +3764,8 @@ object_types_by_name: grouped_by: resolver: name: object_without_lookahead - source_type: ElectricalPart - ElectricalPartAggregationConnection: + source_type: DistributionChannel + DistributionChannelAggregationConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -3886,7 +3777,7 @@ object_types_by_name: page_info: resolver: name: object_without_lookahead - ElectricalPartAggregationEdge: + DistributionChannelAggregationEdge: elasticgraph_category: relay_edge graphql_fields_by_name: cursor: @@ -3895,7 +3786,7 @@ object_types_by_name: node: resolver: name: object_without_lookahead - ElectricalPartConnection: + DistributionChannelConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -3910,7 +3801,7 @@ object_types_by_name: total_edge_count: resolver: name: object_without_lookahead - ElectricalPartEdge: + DistributionChannelEdge: elasticgraph_category: relay_edge graphql_fields_by_name: all_highlights: @@ -3925,18 +3816,169 @@ object_types_by_name: node: resolver: name: object_without_lookahead - ElectricalPartGroupedBy: + DistributionChannelGroupedBy: graphql_fields_by_name: - created_at: - resolver: - name: object_with_lookahead - name: + active: resolver: name: object_with_lookahead - voltage: + established_on: resolver: name: object_with_lookahead - ElectricalPartHighlights: + DistributionChannelHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value + ElectricalPart: + graphql_fields_by_name: + component_aggregations: + relation: + direction: in + foreign_key: part_ids + resolver: + name: nested_relationships + components: + relation: + direction: in + foreign_key: part_ids + resolver: + name: nested_relationships + created_at: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + manufacturer: + relation: + direction: out + foreign_key: manufacturer_id + resolver: + name: nested_relationships + name: + resolver: + name: get_record_field_value + voltage: + resolver: + name: get_record_field_value + index_definition_names: + - electrical_parts + update_targets: + - data_params: + created_at: + cardinality: one + manufacturer_id: + cardinality: one + name: + cardinality: one + voltage: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: ElectricalPart + ElectricalPartAggregatedValues: + graphql_fields_by_name: + created_at: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + name: + resolver: + name: object_with_lookahead + voltage: + resolver: + name: object_with_lookahead + ElectricalPartAggregation: + elasticgraph_category: indexed_aggregation + graphql_fields_by_name: + aggregated_values: + resolver: + name: object_without_lookahead + count: + resolver: + name: object_without_lookahead + grouped_by: + resolver: + name: object_without_lookahead + source_type: ElectricalPart + ElectricalPartAggregationConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + ElectricalPartAggregationEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + cursor: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + ElectricalPartConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + total_edge_count: + resolver: + name: object_without_lookahead + ElectricalPartEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + all_highlights: + resolver: + name: object_without_lookahead + cursor: + resolver: + name: object_without_lookahead + highlights: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + ElectricalPartGroupedBy: + graphql_fields_by_name: + created_at: + resolver: + name: object_with_lookahead + name: + resolver: + name: object_with_lookahead + voltage: + resolver: + name: object_with_lookahead + ElectricalPartHighlights: graphql_fields_by_name: id: resolver: @@ -5311,6 +5353,8 @@ object_types_by_name: stock_ticker: resolver: name: get_record_field_value + index_definition_names: + - named_inventors NamedInventorAggregatedValues: graphql_fields_by_name: id: @@ -5424,6 +5468,43 @@ object_types_by_name: resolver: name: object_with_lookahead graphql_only_return_type: true + OnlineStore: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + update_targets: + - data_params: + __typename: + cardinality: one + active: + cardinality: one + established_on: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: OnlineStore PageInfo: graphql_fields_by_name: end_cursor: @@ -5592,9 +5673,11 @@ object_types_by_name: resolver: name: get_record_field_value index_definition_names: - - people + - named_inventors update_targets: - data_params: + __typename: + cardinality: one name: cardinality: one nationality: @@ -5626,7 +5709,72 @@ object_types_by_name: nationality: resolver: name: object_with_lookahead - PersonAggregation: + PersonGroupedBy: + graphql_fields_by_name: + name: + resolver: + name: object_with_lookahead + nationality: + resolver: + name: object_with_lookahead + PersonHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value + name: + resolver: + name: get_record_field_value + nationality: + resolver: + name: get_record_field_value + PhysicalStore: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - physical_stores + update_targets: + - data_params: + active: + cardinality: one + established_on: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: PhysicalStore + PhysicalStoreAggregatedValues: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + PhysicalStoreAggregation: elasticgraph_category: indexed_aggregation graphql_fields_by_name: aggregated_values: @@ -5638,8 +5786,8 @@ object_types_by_name: grouped_by: resolver: name: object_without_lookahead - source_type: Person - PersonAggregationConnection: + source_type: PhysicalStore + PhysicalStoreAggregationConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -5651,7 +5799,7 @@ object_types_by_name: page_info: resolver: name: object_without_lookahead - PersonAggregationEdge: + PhysicalStoreAggregationEdge: elasticgraph_category: relay_edge graphql_fields_by_name: cursor: @@ -5660,7 +5808,7 @@ object_types_by_name: node: resolver: name: object_without_lookahead - PersonConnection: + PhysicalStoreConnection: elasticgraph_category: relay_connection graphql_fields_by_name: edges: @@ -5675,7 +5823,7 @@ object_types_by_name: total_edge_count: resolver: name: object_without_lookahead - PersonEdge: + PhysicalStoreEdge: elasticgraph_category: relay_edge graphql_fields_by_name: all_highlights: @@ -5690,25 +5838,19 @@ object_types_by_name: node: resolver: name: object_without_lookahead - PersonGroupedBy: + PhysicalStoreGroupedBy: graphql_fields_by_name: - name: + active: resolver: name: object_with_lookahead - nationality: + established_on: resolver: name: object_with_lookahead - PersonHighlights: + PhysicalStoreHighlights: graphql_fields_by_name: id: resolver: name: get_record_field_value - name: - resolver: - name: get_record_field_value - nationality: - resolver: - name: get_record_field_value Player: graphql_fields_by_name: affiliations: @@ -5857,16 +5999,16 @@ object_types_by_name: addresses: resolver: name: list_records - companies: + component_aggregations: resolver: name: list_records - company_aggregations: + components: resolver: name: list_records - component_aggregations: + distribution_channel_aggregations: resolver: name: list_records - components: + distribution_channels: resolver: name: list_records electrical_part_aggregations: @@ -5911,10 +6053,16 @@ object_types_by_name: parts: resolver: name: list_records - people: + physical_store_aggregations: resolver: name: list_records - person_aggregations: + physical_stores: + resolver: + name: list_records + retail_aggregations: + resolver: + name: list_records + retailers: resolver: name: list_records sponsor_aggregations: @@ -5923,6 +6071,12 @@ object_types_by_name: sponsors: resolver: name: list_records + store_aggregations: + resolver: + name: list_records + stores: + resolver: + name: list_records team_aggregations: resolver: name: list_records @@ -5953,6 +6107,107 @@ object_types_by_name: widgets_or_addresses: resolver: name: list_records + Retail: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + RetailAggregatedValues: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + RetailAggregation: + elasticgraph_category: indexed_aggregation + graphql_fields_by_name: + aggregated_values: + resolver: + name: object_without_lookahead + count: + resolver: + name: object_without_lookahead + grouped_by: + resolver: + name: object_without_lookahead + source_type: Retail + RetailAggregationConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + RetailAggregationEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + cursor: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + RetailConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + total_edge_count: + resolver: + name: object_without_lookahead + RetailEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + all_highlights: + resolver: + name: object_without_lookahead + cursor: + resolver: + name: object_without_lookahead + highlights: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + RetailGroupedBy: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + RetailHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value SearchHighlight: graphql_fields_by_name: path: @@ -6151,6 +6406,107 @@ object_types_by_name: graphql_fields_by_name: count: name_in_index: __counts + Store: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + established_on: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + StoreAggregatedValues: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + id: + resolver: + name: object_with_lookahead + StoreAggregation: + elasticgraph_category: indexed_aggregation + graphql_fields_by_name: + aggregated_values: + resolver: + name: object_without_lookahead + count: + resolver: + name: object_without_lookahead + grouped_by: + resolver: + name: object_without_lookahead + source_type: Store + StoreAggregationConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + StoreAggregationEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + cursor: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + StoreConnection: + elasticgraph_category: relay_connection + graphql_fields_by_name: + edges: + resolver: + name: object_without_lookahead + nodes: + resolver: + name: object_without_lookahead + page_info: + resolver: + name: object_without_lookahead + total_edge_count: + resolver: + name: object_without_lookahead + StoreEdge: + elasticgraph_category: relay_edge + graphql_fields_by_name: + all_highlights: + resolver: + name: object_without_lookahead + cursor: + resolver: + name: object_without_lookahead + highlights: + resolver: + name: object_without_lookahead + node: + resolver: + name: object_without_lookahead + StoreGroupedBy: + graphql_fields_by_name: + active: + resolver: + name: object_with_lookahead + established_on: + resolver: + name: object_with_lookahead + StoreHighlights: + graphql_fields_by_name: + id: + resolver: + name: get_record_field_value StringConnection: elasticgraph_category: relay_connection graphql_fields_by_name: @@ -7084,6 +7440,38 @@ object_types_by_name: players_object: resolver: name: object_with_lookahead + ThirdPartyWholesale: + graphql_fields_by_name: + active: + resolver: + name: get_record_field_value + id: + resolver: + name: get_record_field_value + index_definition_names: + - distribution_channels + update_targets: + - data_params: + __typename: + cardinality: one + active: + cardinality: one + id_source: id + metadata_params: + relationship: + value: __self + sourceId: + cardinality: one + source_path: id + sourceType: + cardinality: one + source_path: type + version: + cardinality: one + relationship: __self + routing_value_source: id + script_id: update_index_data_1fdfaf1c9261c96019decc89b515bd9a + type: ThirdPartyWholesale Widget: graphql_fields_by_name: amount_cents: diff --git a/config/schema/artifacts_with_apollo/schema.graphql b/config/schema/artifacts_with_apollo/schema.graphql index 41439d217..bf57a0c9e 100644 --- a/config/schema/artifacts_with_apollo/schema.graphql +++ b/config/schema/artifacts_with_apollo/schema.graphql @@ -853,274 +853,6 @@ type Company implements NamedInventor @key(fields: "id") { stock_ticker: String } -""" -Type used to perform aggregation computations on `Company` fields. -""" -type CompanyAggregatedValues { - """ - Computed aggregate values for the `id` field. - """ - id: NonNumericAggregatedValues - - """ - Computed aggregate values for the `name` field. - """ - name: NonNumericAggregatedValues - - """ - Computed aggregate values for the `stock_ticker` field. - """ - stock_ticker: NonNumericAggregatedValues -} - -""" -Return type representing a bucket of `Company` documents for an aggregations query. -""" -type CompanyAggregation { - """ - Provides computed aggregated values over all `Company` documents in an aggregation bucket. - """ - aggregated_values: CompanyAggregatedValues - - """ - The count of `Company` documents in an aggregation bucket. - """ - count: JsonSafeLong! - - """ - Used to specify the `Company` fields to group by. The returned values identify each aggregation bucket. - """ - grouped_by: CompanyGroupedBy -} - -""" -Represents a paginated collection of `CompanyAggregation` results. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. -""" -type CompanyAggregationConnection { - """ - Wraps a specific `CompanyAggregation` to pair it with its pagination cursor. - """ - edges: [CompanyAggregationEdge!]! - - """ - The list of `CompanyAggregation` results. - """ - nodes: [CompanyAggregation!]! - - """ - Provides pagination-related information. - """ - page_info: PageInfo! -} - -""" -Represents a specific `CompanyAggregation` in the context of a `CompanyAggregationConnection`, -providing access to both the `CompanyAggregation` and query-specific information such as the pagination `Cursor`. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. -""" -type CompanyAggregationEdge { - """ - The `Cursor` of this `CompanyAggregation`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `CompanyAggregation`. - """ - cursor: Cursor - - """ - The `CompanyAggregation` of this edge. - """ - node: CompanyAggregation -} - -""" -Represents a paginated collection of `Company` results. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. -""" -type CompanyConnection { - """ - Wraps a specific `Company` to pair it with its pagination cursor. - """ - edges: [CompanyEdge!]! - - """ - The list of `Company` results. - """ - nodes: [Company!]! - - """ - Provides pagination-related information. - """ - page_info: PageInfo! - - """ - The total number of edges available in this connection to paginate over. - """ - total_edge_count: JsonSafeLong! -} - -""" -Represents a specific `Company` in the context of a `CompanyConnection`, -providing access to both the `Company` and query-specific information such as the pagination `Cursor`. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. -""" -type CompanyEdge { - """ - All search highlights for this `Company`, indicating where in the indexed document the query matched. - """ - all_highlights: [SearchHighlight!]! - - """ - The `Cursor` of this `Company`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `Company`. - """ - cursor: Cursor - - """ - Specific search highlights for this `Company`, providing matching snippets for the requested fields. - """ - highlights: CompanyHighlights - - """ - The `Company` of this edge. - """ - node: Company -} - -""" -Input type used to specify filters on `Company` fields. - -Will match all documents if passed as an empty object (or as `null`). -""" -input CompanyFilterInput { - """ - Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. - - Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't - be provided on a single `CompanyFilterInput` input because of collisions - between key names. For example, if you want to AND multiple - OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. - - When `null` or an empty list is passed, matches all documents. - """ - all_of: [CompanyFilterInput!] - - """ - Matches records where any of the provided sub-filters evaluate to true. - This works just like an OR operator in SQL. - - When `null` is passed, matches all documents. - When an empty list is passed, this part of the filter matches no documents. - """ - any_of: [CompanyFilterInput!] - - """ - Used to filter on the `id` field. - - When `null` or an empty object is passed, matches all documents. - """ - id: IDFilterInput - - """ - Used to filter on the `name` field. - - When `null` or an empty object is passed, matches all documents. - """ - name: StringFilterInput - - """ - Matches records where the provided sub-filter evaluates to false. - This works just like a NOT operator in SQL. - - When `null` or an empty object is passed, matches no documents. - """ - not: CompanyFilterInput - - """ - Used to filter on the `stock_ticker` field. - - When `null` or an empty object is passed, matches all documents. - """ - stock_ticker: StringFilterInput -} - -""" -Type used to specify the `Company` fields to group by for aggregations. -""" -type CompanyGroupedBy { - """ - The `name` field value for this group. - """ - name: String - - """ - The `stock_ticker` field value for this group. - """ - stock_ticker: String -} - -""" -Type used to request desired `Company` search highlight fields. -""" -type CompanyHighlights { - """ - Search highlights for the `id`, providing snippets of the matching text. - """ - id: [String!]! - - """ - Search highlights for the `name`, providing snippets of the matching text. - """ - name: [String!]! - - """ - Search highlights for the `stock_ticker`, providing snippets of the matching text. - """ - stock_ticker: [String!]! -} - -""" -Enumerates the ways `Company`s can be sorted. -""" -enum CompanySortOrderInput { - """ - Sorts ascending by the `id` field. - """ - id_ASC - - """ - Sorts descending by the `id` field. - """ - id_DESC - - """ - Sorts ascending by the `name` field. - """ - name_ASC - - """ - Sorts descending by the `name` field. - """ - name_DESC - - """ - Sorts ascending by the `stock_ticker` field. - """ - stock_ticker_ASC - - """ - Sorts descending by the `stock_ticker` field. - """ - stock_ticker_DESC -} - type Component implements NamedEntity @key(fields: "id") { created_at: DateTime! dollar_widget: Widget @@ -3061,33 +2793,287 @@ enum DistanceUnitInput { YARD } -type ElectricalPart implements NamedEntity @key(fields: "id") { +interface DistributionChannel { + active: Boolean + id: ID! +} + +""" +Type used to perform aggregation computations on `DistributionChannel` fields. +""" +type DistributionChannelAggregatedValues { """ - Aggregations over the `components` data. + Computed aggregate values for the `active` field. """ - component_aggregations( - """ - Used to forward-paginate through the `component_aggregations`. When provided, the next page after the - provided cursor will be returned. - - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - after: Cursor + active: NonNumericAggregatedValues - """ - Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the - provided cursor will be returned. + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - before: Cursor + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} - """ - Used to filter the `Component` documents that get aggregated over based on the provided criteria. - """ - filter: ComponentFilterInput +""" +Return type representing a bucket of `DistributionChannel` documents for an aggregations query. +""" +type DistributionChannelAggregation { + """ + Provides computed aggregated values over all `DistributionChannel` documents in an aggregation bucket. + """ + aggregated_values: DistributionChannelAggregatedValues + + """ + The count of `DistributionChannel` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `DistributionChannel` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: DistributionChannelGroupedBy +} + +""" +Represents a paginated collection of `DistributionChannelAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type DistributionChannelAggregationConnection { + """ + Wraps a specific `DistributionChannelAggregation` to pair it with its pagination cursor. + """ + edges: [DistributionChannelAggregationEdge!]! + + """ + The list of `DistributionChannelAggregation` results. + """ + nodes: [DistributionChannelAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `DistributionChannelAggregation` in the context of a `DistributionChannelAggregationConnection`, +providing access to both the `DistributionChannelAggregation` and query-specific +information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type DistributionChannelAggregationEdge { + """ + The `Cursor` of this `DistributionChannelAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `DistributionChannelAggregation`. + """ + cursor: Cursor + + """ + The `DistributionChannelAggregation` of this edge. + """ + node: DistributionChannelAggregation +} + +""" +Represents a paginated collection of `DistributionChannel` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type DistributionChannelConnection { + """ + Wraps a specific `DistributionChannel` to pair it with its pagination cursor. + """ + edges: [DistributionChannelEdge!]! + + """ + The list of `DistributionChannel` results. + """ + nodes: [DistributionChannel!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! + + """ + The total number of edges available in this connection to paginate over. + """ + total_edge_count: JsonSafeLong! +} + +""" +Represents a specific `DistributionChannel` in the context of a `DistributionChannelConnection`, +providing access to both the `DistributionChannel` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type DistributionChannelEdge { + """ + All search highlights for this `DistributionChannel`, indicating where in the indexed document the query matched. + """ + all_highlights: [SearchHighlight!]! + + """ + The `Cursor` of this `DistributionChannel`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `DistributionChannel`. + """ + cursor: Cursor + + """ + Specific search highlights for this `DistributionChannel`, providing matching snippets for the requested fields. + """ + highlights: DistributionChannelHighlights + + """ + The `DistributionChannel` of this edge. + """ + node: DistributionChannel +} + +""" +Input type used to specify filters on `DistributionChannel` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input DistributionChannelFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + + """ + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `DistributionChannelFilterInput` input because of + collisions between key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. + """ + all_of: [DistributionChannelFilterInput!] + + """ + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. + """ + any_of: [DistributionChannelFilterInput!] + + """ + Used to filter on the `established_on` field. + + When `null` or an empty object is passed, matches all documents. + """ + established_on: DateFilterInput + + """ + Used to filter on the `id` field. + + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput + + """ + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. + + When `null` or an empty object is passed, matches no documents. + """ + not: DistributionChannelFilterInput +} + +""" +Type used to specify the `DistributionChannel` fields to group by for aggregations. +""" +type DistributionChannelGroupedBy { + """ + The `active` field value for this group. + """ + active: Boolean + + """ + Offers the different grouping options for the `established_on` value within this group. + """ + established_on: DateGroupedBy +} + +""" +Type used to request desired `DistributionChannel` search highlight fields. +""" +type DistributionChannelHighlights { + """ + Search highlights for the `id`, providing snippets of the matching text. + """ + id: [String!]! +} + +""" +Enumerates the ways `DistributionChannel`s can be sorted. +""" +enum DistributionChannelSortOrderInput { + """ + Sorts ascending by the `established_on` field. + """ + established_on_ASC + + """ + Sorts descending by the `established_on` field. + """ + established_on_DESC + + """ + Sorts ascending by the `id` field. + """ + id_ASC + + """ + Sorts descending by the `id` field. + """ + id_DESC +} + +type ElectricalPart implements NamedEntity @key(fields: "id") { + """ + Aggregations over the `components` data. + """ + component_aggregations( + """ + Used to forward-paginate through the `component_aggregations`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the `Component` documents that get aggregated over based on the provided criteria. + """ + filter: ComponentFilterInput """ Used in conjunction with the `after` argument to forward-paginate through the `component_aggregations`. @@ -8053,6 +8039,12 @@ type NonNumericAggregatedValues @shareable { approximate_distinct_value_count: JsonSafeLong } +type OnlineStore implements DistributionChannel & Retail & Store @key(fields: "id") { + active: Boolean + established_on: Date + id: ID! +} + """ Provides information about the specific fetched page. This implements the `PageInfo` specification from the [Relay GraphQL Cursor Connections @@ -8433,84 +8425,202 @@ type PersonAggregatedValues { } """ -Return type representing a bucket of `Person` documents for an aggregations query. +Input type used to specify filters on `Person` fields. + +Will match all documents if passed as an empty object (or as `null`). """ -type PersonAggregation { - """ - Provides computed aggregated values over all `Person` documents in an aggregation bucket. +input PersonFilterInput { """ - aggregated_values: PersonAggregatedValues + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `PersonFilterInput` input because of collisions + between key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. """ - The count of `Person` documents in an aggregation bucket. + all_of: [PersonFilterInput!] + """ - count: JsonSafeLong! + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. """ - Used to specify the `Person` fields to group by. The returned values identify each aggregation bucket. + any_of: [PersonFilterInput!] + """ - grouped_by: PersonGroupedBy -} + Used to filter on the `id` field. -""" -Represents a paginated collection of `PersonAggregation` results. + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. -""" -type PersonAggregationConnection { """ - Wraps a specific `PersonAggregation` to pair it with its pagination cursor. + Used to filter on the `name` field. + + When `null` or an empty object is passed, matches all documents. """ - edges: [PersonAggregationEdge!]! + name: StringFilterInput """ - The list of `PersonAggregation` results. + Used to filter on the `nationality` field. + + When `null` or an empty object is passed, matches all documents. """ - nodes: [PersonAggregation!]! + nationality: StringFilterInput """ - Provides pagination-related information. + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. + + When `null` or an empty object is passed, matches no documents. """ - page_info: PageInfo! + not: PersonFilterInput } """ -Represents a specific `PersonAggregation` in the context of a `PersonAggregationConnection`, -providing access to both the `PersonAggregation` and query-specific information such as the pagination `Cursor`. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +Type used to specify the `Person` fields to group by for aggregations. """ -type PersonAggregationEdge { +type PersonGroupedBy { """ - The `Cursor` of this `PersonAggregation`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `PersonAggregation`. + The `name` field value for this group. """ - cursor: Cursor + name: String """ - The `PersonAggregation` of this edge. + The `nationality` field value for this group. """ - node: PersonAggregation + nationality: String } """ -Represents a paginated collection of `Person` results. - -See the [Relay GraphQL Cursor Connections -Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +Type used to request desired `Person` search highlight fields. """ -type PersonConnection { +type PersonHighlights { """ - Wraps a specific `Person` to pair it with its pagination cursor. + Search highlights for the `id`, providing snippets of the matching text. """ - edges: [PersonEdge!]! + id: [String!]! """ - The list of `Person` results. + Search highlights for the `name`, providing snippets of the matching text. + """ + name: [String!]! + + """ + Search highlights for the `nationality`, providing snippets of the matching text. + """ + nationality: [String!]! +} + +type PhysicalStore implements DistributionChannel & Retail & Store @key(fields: "id") { + active: Boolean + established_on: Date + id: ID! +} + +""" +Type used to perform aggregation computations on `PhysicalStore` fields. +""" +type PhysicalStoreAggregatedValues { + """ + Computed aggregate values for the `active` field. + """ + active: NonNumericAggregatedValues + + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues + + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} + +""" +Return type representing a bucket of `PhysicalStore` documents for an aggregations query. +""" +type PhysicalStoreAggregation { + """ + Provides computed aggregated values over all `PhysicalStore` documents in an aggregation bucket. + """ + aggregated_values: PhysicalStoreAggregatedValues + + """ + The count of `PhysicalStore` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `PhysicalStore` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: PhysicalStoreGroupedBy +} + +""" +Represents a paginated collection of `PhysicalStoreAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type PhysicalStoreAggregationConnection { + """ + Wraps a specific `PhysicalStoreAggregation` to pair it with its pagination cursor. + """ + edges: [PhysicalStoreAggregationEdge!]! + + """ + The list of `PhysicalStoreAggregation` results. + """ + nodes: [PhysicalStoreAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `PhysicalStoreAggregation` in the context of a `PhysicalStoreAggregationConnection`, +providing access to both the `PhysicalStoreAggregation` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type PhysicalStoreAggregationEdge { + """ + The `Cursor` of this `PhysicalStoreAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `PhysicalStoreAggregation`. + """ + cursor: Cursor + + """ + The `PhysicalStoreAggregation` of this edge. + """ + node: PhysicalStoreAggregation +} + +""" +Represents a paginated collection of `PhysicalStore` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type PhysicalStoreConnection { + """ + Wraps a specific `PhysicalStore` to pair it with its pagination cursor. """ - nodes: [Person!]! + edges: [PhysicalStoreEdge!]! + + """ + The list of `PhysicalStore` results. + """ + nodes: [PhysicalStore!]! """ Provides pagination-related information. @@ -8524,52 +8634,59 @@ type PersonConnection { } """ -Represents a specific `Person` in the context of a `PersonConnection`, -providing access to both the `Person` and query-specific information such as the pagination `Cursor`. +Represents a specific `PhysicalStore` in the context of a `PhysicalStoreConnection`, +providing access to both the `PhysicalStore` and query-specific information such as the pagination `Cursor`. See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. """ -type PersonEdge { +type PhysicalStoreEdge { """ - All search highlights for this `Person`, indicating where in the indexed document the query matched. + All search highlights for this `PhysicalStore`, indicating where in the indexed document the query matched. """ all_highlights: [SearchHighlight!]! """ - The `Cursor` of this `Person`. This can be passed in the next query as - a `before` or `after` argument to continue paginating from this `Person`. + The `Cursor` of this `PhysicalStore`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `PhysicalStore`. """ cursor: Cursor """ - Specific search highlights for this `Person`, providing matching snippets for the requested fields. + Specific search highlights for this `PhysicalStore`, providing matching snippets for the requested fields. """ - highlights: PersonHighlights + highlights: PhysicalStoreHighlights """ - The `Person` of this edge. + The `PhysicalStore` of this edge. """ - node: Person + node: PhysicalStore } """ -Input type used to specify filters on `Person` fields. +Input type used to specify filters on `PhysicalStore` fields. Will match all documents if passed as an empty object (or as `null`). """ -input PersonFilterInput { +input PhysicalStoreFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + """ Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't - be provided on a single `PersonFilterInput` input because of collisions + be provided on a single `PhysicalStoreFilterInput` input because of collisions between key names. For example, if you want to AND multiple OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. When `null` or an empty list is passed, matches all documents. """ - all_of: [PersonFilterInput!] + all_of: [PhysicalStoreFilterInput!] """ Matches records where any of the provided sub-filters evaluate to true. @@ -8578,28 +8695,21 @@ input PersonFilterInput { When `null` is passed, matches all documents. When an empty list is passed, this part of the filter matches no documents. """ - any_of: [PersonFilterInput!] - - """ - Used to filter on the `id` field. - - When `null` or an empty object is passed, matches all documents. - """ - id: IDFilterInput + any_of: [PhysicalStoreFilterInput!] """ - Used to filter on the `name` field. + Used to filter on the `established_on` field. When `null` or an empty object is passed, matches all documents. """ - name: StringFilterInput + established_on: DateFilterInput """ - Used to filter on the `nationality` field. + Used to filter on the `id` field. When `null` or an empty object is passed, matches all documents. """ - nationality: StringFilterInput + id: IDFilterInput """ Matches records where the provided sub-filter evaluates to false. @@ -8607,48 +8717,48 @@ input PersonFilterInput { When `null` or an empty object is passed, matches no documents. """ - not: PersonFilterInput + not: PhysicalStoreFilterInput } """ -Type used to specify the `Person` fields to group by for aggregations. +Type used to specify the `PhysicalStore` fields to group by for aggregations. """ -type PersonGroupedBy { +type PhysicalStoreGroupedBy { """ - The `name` field value for this group. + The `active` field value for this group. """ - name: String + active: Boolean """ - The `nationality` field value for this group. + Offers the different grouping options for the `established_on` value within this group. """ - nationality: String + established_on: DateGroupedBy } """ -Type used to request desired `Person` search highlight fields. +Type used to request desired `PhysicalStore` search highlight fields. """ -type PersonHighlights { +type PhysicalStoreHighlights { """ Search highlights for the `id`, providing snippets of the matching text. """ id: [String!]! +} +""" +Enumerates the ways `PhysicalStore`s can be sorted. +""" +enum PhysicalStoreSortOrderInput { """ - Search highlights for the `name`, providing snippets of the matching text. + Sorts ascending by the `established_on` field. """ - name: [String!]! + established_on_ASC """ - Search highlights for the `nationality`, providing snippets of the matching text. + Sorts descending by the `established_on` field. """ - nationality: [String!]! -} + established_on_DESC -""" -Enumerates the ways `Person`s can be sorted. -""" -enum PersonSortOrderInput { """ Sorts ascending by the `id` field. """ @@ -8658,26 +8768,6 @@ enum PersonSortOrderInput { Sorts descending by the `id` field. """ id_DESC - - """ - Sorts ascending by the `name` field. - """ - name_ASC - - """ - Sorts descending by the `name` field. - """ - name_DESC - - """ - Sorts ascending by the `nationality` field. - """ - nationality_ASC - - """ - Sorts descending by the `nationality` field. - """ - nationality_DESC } type Player { @@ -9467,11 +9557,13 @@ type Query { ): AddressConnection """ - Fetches `Company`s based on the provided arguments. + Aggregations over the `components` data: + + > Fetches `Component`s based on the provided arguments. """ - companies( + component_aggregations( """ - Used to forward-paginate through the `companies`. When provided, the next page after the + Used to forward-paginate through the `component_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9480,7 +9572,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `companies`. When provided, the previous page before the + Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9489,14 +9581,14 @@ type Query { before: Cursor """ - Used to filter the returned `companies` based on the provided criteria. + Used to filter the `Component` documents that get aggregated over based on the provided criteria. """ - filter: CompanyFilterInput + filter: ComponentFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `companies`. + Used in conjunction with the `after` argument to forward-paginate through the `component_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `companies`, if no `after` cursor is provided). + `after` cursor (or from the start of the `component_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9504,29 +9596,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `companies`. + Used in conjunction with the `before` argument to backward-paginate through the `component_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `companies`, if no `before` cursor is provided). + `before` cursor (or from the end of the `component_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - - """ - Used to specify how the returned `companies` should be sorted. - """ - order_by: [CompanySortOrderInput!] - ): CompanyConnection + ): ComponentAggregationConnection """ - Aggregations over the `companies` data: - - > Fetches `Company`s based on the provided arguments. + Fetches `Component`s based on the provided arguments. """ - company_aggregations( + components( """ - Used to forward-paginate through the `company_aggregations`. When provided, the next page after the + Used to forward-paginate through the `components`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9535,7 +9620,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `company_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `components`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9544,14 +9629,14 @@ type Query { before: Cursor """ - Used to filter the `Company` documents that get aggregated over based on the provided criteria. + Used to filter the returned `components` based on the provided criteria. """ - filter: CompanyFilterInput + filter: ComponentFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `company_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `components`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `company_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `components`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9559,24 +9644,29 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `company_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `components`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `company_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `components`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): CompanyAggregationConnection + + """ + Used to specify how the returned `components` should be sorted. + """ + order_by: [ComponentSortOrderInput!] + ): ComponentConnection """ - Aggregations over the `components` data: + Aggregations over the `distribution_channels` data: - > Fetches `Component`s based on the provided arguments. + > Fetches `DistributionChannel`s based on the provided arguments. """ - component_aggregations( + distribution_channel_aggregations( """ - Used to forward-paginate through the `component_aggregations`. When provided, the next page after the + Used to forward-paginate through the `distribution_channel_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9585,7 +9675,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `component_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `distribution_channel_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9594,14 +9684,14 @@ type Query { before: Cursor """ - Used to filter the `Component` documents that get aggregated over based on the provided criteria. + Used to filter the `DistributionChannel` documents that get aggregated over based on the provided criteria. """ - filter: ComponentFilterInput + filter: DistributionChannelFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `component_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `distribution_channel_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `component_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `distribution_channel_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9609,22 +9699,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `component_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `distribution_channel_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `component_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `distribution_channel_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): ComponentAggregationConnection + ): DistributionChannelAggregationConnection """ - Fetches `Component`s based on the provided arguments. + Fetches `DistributionChannel`s based on the provided arguments. """ - components( + distribution_channels( """ - Used to forward-paginate through the `components`. When provided, the next page after the + Used to forward-paginate through the `distribution_channels`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9633,7 +9723,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `components`. When provided, the previous page before the + Used to backward-paginate through the `distribution_channels`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -9642,14 +9732,14 @@ type Query { before: Cursor """ - Used to filter the returned `components` based on the provided criteria. + Used to filter the returned `distribution_channels` based on the provided criteria. """ - filter: ComponentFilterInput + filter: DistributionChannelFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `components`. + Used in conjunction with the `after` argument to forward-paginate through the `distribution_channels`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `components`, if no `after` cursor is provided). + `after` cursor (or from the start of the `distribution_channels`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9657,9 +9747,9 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `components`. + Used in conjunction with the `before` argument to backward-paginate through the `distribution_channels`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `components`, if no `before` cursor is provided). + `before` cursor (or from the end of the `distribution_channels`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -9667,10 +9757,10 @@ type Query { last: Int """ - Used to specify how the returned `components` should be sorted. + Used to specify how the returned `distribution_channels` should be sorted. """ - order_by: [ComponentSortOrderInput!] - ): ComponentConnection + order_by: [DistributionChannelSortOrderInput!] + ): DistributionChannelConnection """ Aggregations over the `electrical_parts` data: @@ -10394,11 +10484,13 @@ type Query { ): PartConnection """ - Fetches `Person`s based on the provided arguments. + Aggregations over the `physical_stores` data: + + > Fetches `PhysicalStore`s based on the provided arguments. """ - people( + physical_store_aggregations( """ - Used to forward-paginate through the `people`. When provided, the next page after the + Used to forward-paginate through the `physical_store_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10407,7 +10499,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `people`. When provided, the previous page before the + Used to backward-paginate through the `physical_store_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10416,14 +10508,14 @@ type Query { before: Cursor """ - Used to filter the returned `people` based on the provided criteria. + Used to filter the `PhysicalStore` documents that get aggregated over based on the provided criteria. """ - filter: PersonFilterInput + filter: PhysicalStoreFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `people`. + Used in conjunction with the `after` argument to forward-paginate through the `physical_store_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `people`, if no `after` cursor is provided). + `after` cursor (or from the start of the `physical_store_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10431,29 +10523,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `people`. + Used in conjunction with the `before` argument to backward-paginate through the `physical_store_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `people`, if no `before` cursor is provided). + `before` cursor (or from the end of the `physical_store_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - - """ - Used to specify how the returned `people` should be sorted. - """ - order_by: [PersonSortOrderInput!] - ): PersonConnection + ): PhysicalStoreAggregationConnection """ - Aggregations over the `people` data: - - > Fetches `Person`s based on the provided arguments. + Fetches `PhysicalStore`s based on the provided arguments. """ - person_aggregations( + physical_stores( """ - Used to forward-paginate through the `person_aggregations`. When provided, the next page after the + Used to forward-paginate through the `physical_stores`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10462,7 +10547,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `person_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `physical_stores`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10471,14 +10556,14 @@ type Query { before: Cursor """ - Used to filter the `Person` documents that get aggregated over based on the provided criteria. + Used to filter the returned `physical_stores` based on the provided criteria. """ - filter: PersonFilterInput + filter: PhysicalStoreFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `person_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `physical_stores`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `person_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `physical_stores`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10486,24 +10571,29 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `person_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `physical_stores`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `person_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `physical_stores`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): PersonAggregationConnection + + """ + Used to specify how the returned `physical_stores` should be sorted. + """ + order_by: [PhysicalStoreSortOrderInput!] + ): PhysicalStoreConnection """ - Aggregations over the `sponsors` data: + Aggregations over the `retailers` data: - > Fetches `Sponsor`s based on the provided arguments. + > Fetches `Retail`s based on the provided arguments. """ - sponsor_aggregations( + retail_aggregations( """ - Used to forward-paginate through the `sponsor_aggregations`. When provided, the next page after the + Used to forward-paginate through the `retail_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10512,7 +10602,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `sponsor_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `retail_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10521,14 +10611,14 @@ type Query { before: Cursor """ - Used to filter the `Sponsor` documents that get aggregated over based on the provided criteria. + Used to filter the `Retail` documents that get aggregated over based on the provided criteria. """ - filter: SponsorFilterInput + filter: RetailFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `sponsor_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `retail_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `sponsor_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `retail_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10536,22 +10626,22 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `sponsor_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `retail_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `sponsor_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `retail_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): SponsorAggregationConnection + ): RetailAggregationConnection """ - Fetches `Sponsor`s based on the provided arguments. + Fetches `Retail`s based on the provided arguments. """ - sponsors( + retailers( """ - Used to forward-paginate through the `sponsors`. When provided, the next page after the + Used to forward-paginate through the `retailers`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10560,7 +10650,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `sponsors`. When provided, the previous page before the + Used to backward-paginate through the `retailers`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10569,14 +10659,14 @@ type Query { before: Cursor """ - Used to filter the returned `sponsors` based on the provided criteria. + Used to filter the returned `retailers` based on the provided criteria. """ - filter: SponsorFilterInput + filter: RetailFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `sponsors`. + Used in conjunction with the `after` argument to forward-paginate through the `retailers`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `sponsors`, if no `after` cursor is provided). + `after` cursor (or from the start of the `retailers`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10584,9 +10674,9 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `sponsors`. + Used in conjunction with the `before` argument to backward-paginate through the `retailers`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `sponsors`, if no `before` cursor is provided). + `before` cursor (or from the end of the `retailers`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10594,19 +10684,19 @@ type Query { last: Int """ - Used to specify how the returned `sponsors` should be sorted. + Used to specify how the returned `retailers` should be sorted. """ - order_by: [SponsorSortOrderInput!] - ): SponsorConnection + order_by: [RetailSortOrderInput!] + ): RetailConnection """ - Aggregations over the `teams` data: + Aggregations over the `sponsors` data: - > Fetches `Team`s based on the provided arguments. + > Fetches `Sponsor`s based on the provided arguments. """ - team_aggregations( + sponsor_aggregations( """ - Used to forward-paginate through the `team_aggregations`. When provided, the next page after the + Used to forward-paginate through the `sponsor_aggregations`. When provided, the next page after the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10615,7 +10705,7 @@ type Query { after: Cursor """ - Used to backward-paginate through the `team_aggregations`. When provided, the previous page before the + Used to backward-paginate through the `sponsor_aggregations`. When provided, the previous page before the provided cursor will be returned. See the [Relay GraphQL Cursor Connections @@ -10624,14 +10714,14 @@ type Query { before: Cursor """ - Used to filter the `Team` documents that get aggregated over based on the provided criteria. + Used to filter the `Sponsor` documents that get aggregated over based on the provided criteria. """ - filter: TeamFilterInput + filter: SponsorFilterInput """ - Used in conjunction with the `after` argument to forward-paginate through the `team_aggregations`. + Used in conjunction with the `after` argument to forward-paginate through the `sponsor_aggregations`. When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `team_aggregations`, if no `after` cursor is provided). + `after` cursor (or from the start of the `sponsor_aggregations`, if no `after` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. @@ -10639,15 +10729,221 @@ type Query { first: Int """ - Used in conjunction with the `before` argument to backward-paginate through the `team_aggregations`. + Used in conjunction with the `before` argument to backward-paginate through the `sponsor_aggregations`. When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `team_aggregations`, if no `before` cursor is provided). + `before` cursor (or from the end of the `sponsor_aggregations`, if no `before` cursor is provided). See the [Relay GraphQL Cursor Connections Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. """ last: Int - ): TeamAggregationConnection + ): SponsorAggregationConnection + + """ + Fetches `Sponsor`s based on the provided arguments. + """ + sponsors( + """ + Used to forward-paginate through the `sponsors`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `sponsors`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the returned `sponsors` based on the provided criteria. + """ + filter: SponsorFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `sponsors`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `sponsors`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `sponsors`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `sponsors`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + + """ + Used to specify how the returned `sponsors` should be sorted. + """ + order_by: [SponsorSortOrderInput!] + ): SponsorConnection + + """ + Aggregations over the `stores` data: + + > Fetches `Store`s based on the provided arguments. + """ + store_aggregations( + """ + Used to forward-paginate through the `store_aggregations`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `store_aggregations`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the `Store` documents that get aggregated over based on the provided criteria. + """ + filter: StoreFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `store_aggregations`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `store_aggregations`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `store_aggregations`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `store_aggregations`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + ): StoreAggregationConnection + + """ + Fetches `Store`s based on the provided arguments. + """ + stores( + """ + Used to forward-paginate through the `stores`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `stores`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the returned `stores` based on the provided criteria. + """ + filter: StoreFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `stores`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `stores`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `stores`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `stores`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + + """ + Used to specify how the returned `stores` should be sorted. + """ + order_by: [StoreSortOrderInput!] + ): StoreConnection + + """ + Aggregations over the `teams` data: + + > Fetches `Team`s based on the provided arguments. + """ + team_aggregations( + """ + Used to forward-paginate through the `team_aggregations`. When provided, the next page after the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + after: Cursor + + """ + Used to backward-paginate through the `team_aggregations`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the `Team` documents that get aggregated over based on the provided criteria. + """ + filter: TeamFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `team_aggregations`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `team_aggregations`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `team_aggregations`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `team_aggregations`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + ): TeamAggregationConnection """ Fetches `Team`s based on the provided arguments. @@ -11079,45 +11375,299 @@ type Query { """ after: Cursor - """ - Used to backward-paginate through the `widgets_or_addresses`. When provided, the previous page before the - provided cursor will be returned. + """ + Used to backward-paginate through the `widgets_or_addresses`. When provided, the previous page before the + provided cursor will be returned. + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + before: Cursor + + """ + Used to filter the returned `widgets_or_addresses` based on the provided criteria. + """ + filter: WidgetOrAddressFilterInput + + """ + Used in conjunction with the `after` argument to forward-paginate through the `widgets_or_addresses`. + When provided, limits the number of returned results to the first `n` after the provided + `after` cursor (or from the start of the `widgets_or_addresses`, if no `after` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + first: Int + + """ + Used in conjunction with the `before` argument to backward-paginate through the `widgets_or_addresses`. + When provided, limits the number of returned results to the last `n` before the provided + `before` cursor (or from the end of the `widgets_or_addresses`, if no `before` cursor is provided). + + See the [Relay GraphQL Cursor Connections + Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. + """ + last: Int + + """ + Used to specify how the returned `widgets_or_addresses` should be sorted. + """ + order_by: [WidgetOrAddressSortOrderInput!] + ): WidgetOrAddressConnection +} + +interface Retail implements DistributionChannel { + active: Boolean + established_on: Date + id: ID! +} + +""" +Type used to perform aggregation computations on `Retail` fields. +""" +type RetailAggregatedValues { + """ + Computed aggregate values for the `active` field. + """ + active: NonNumericAggregatedValues + + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues + + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} + +""" +Return type representing a bucket of `Retail` documents for an aggregations query. +""" +type RetailAggregation { + """ + Provides computed aggregated values over all `Retail` documents in an aggregation bucket. + """ + aggregated_values: RetailAggregatedValues + + """ + The count of `Retail` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `Retail` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: RetailGroupedBy +} + +""" +Represents a paginated collection of `RetailAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type RetailAggregationConnection { + """ + Wraps a specific `RetailAggregation` to pair it with its pagination cursor. + """ + edges: [RetailAggregationEdge!]! + + """ + The list of `RetailAggregation` results. + """ + nodes: [RetailAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `RetailAggregation` in the context of a `RetailAggregationConnection`, +providing access to both the `RetailAggregation` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type RetailAggregationEdge { + """ + The `Cursor` of this `RetailAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `RetailAggregation`. + """ + cursor: Cursor + + """ + The `RetailAggregation` of this edge. + """ + node: RetailAggregation +} + +""" +Represents a paginated collection of `Retail` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type RetailConnection { + """ + Wraps a specific `Retail` to pair it with its pagination cursor. + """ + edges: [RetailEdge!]! + + """ + The list of `Retail` results. + """ + nodes: [Retail!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! + + """ + The total number of edges available in this connection to paginate over. + """ + total_edge_count: JsonSafeLong! +} + +""" +Represents a specific `Retail` in the context of a `RetailConnection`, +providing access to both the `Retail` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type RetailEdge { + """ + All search highlights for this `Retail`, indicating where in the indexed document the query matched. + """ + all_highlights: [SearchHighlight!]! + + """ + The `Cursor` of this `Retail`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `Retail`. + """ + cursor: Cursor + + """ + Specific search highlights for this `Retail`, providing matching snippets for the requested fields. + """ + highlights: RetailHighlights + + """ + The `Retail` of this edge. + """ + node: Retail +} + +""" +Input type used to specify filters on `Retail` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input RetailFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + + """ + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `RetailFilterInput` input because of collisions + between key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. + """ + all_of: [RetailFilterInput!] + + """ + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. + """ + any_of: [RetailFilterInput!] + + """ + Used to filter on the `established_on` field. + + When `null` or an empty object is passed, matches all documents. + """ + established_on: DateFilterInput + + """ + Used to filter on the `id` field. + + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput + + """ + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - before: Cursor + When `null` or an empty object is passed, matches no documents. + """ + not: RetailFilterInput +} - """ - Used to filter the returned `widgets_or_addresses` based on the provided criteria. - """ - filter: WidgetOrAddressFilterInput +""" +Type used to specify the `Retail` fields to group by for aggregations. +""" +type RetailGroupedBy { + """ + The `active` field value for this group. + """ + active: Boolean - """ - Used in conjunction with the `after` argument to forward-paginate through the `widgets_or_addresses`. - When provided, limits the number of returned results to the first `n` after the provided - `after` cursor (or from the start of the `widgets_or_addresses`, if no `after` cursor is provided). + """ + Offers the different grouping options for the `established_on` value within this group. + """ + established_on: DateGroupedBy +} - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - first: Int +""" +Type used to request desired `Retail` search highlight fields. +""" +type RetailHighlights { + """ + Search highlights for the `id`, providing snippets of the matching text. + """ + id: [String!]! +} - """ - Used in conjunction with the `before` argument to backward-paginate through the `widgets_or_addresses`. - When provided, limits the number of returned results to the last `n` before the provided - `before` cursor (or from the end of the `widgets_or_addresses`, if no `before` cursor is provided). +""" +Enumerates the ways `Retail`s can be sorted. +""" +enum RetailSortOrderInput { + """ + Sorts ascending by the `established_on` field. + """ + established_on_ASC - See the [Relay GraphQL Cursor Connections - Specification](https://relay.dev/graphql/connections.htm#sec-Arguments) for more info. - """ - last: Int + """ + Sorts descending by the `established_on` field. + """ + established_on_DESC - """ - Used to specify how the returned `widgets_or_addresses` should be sorted. - """ - order_by: [WidgetOrAddressSortOrderInput!] - ): WidgetOrAddressConnection + """ + Sorts ascending by the `id` field. + """ + id_ASC + + """ + Sorts descending by the `id` field. + """ + id_DESC } """ @@ -11931,6 +12481,260 @@ input SponsorshipListFilterInput { not: SponsorshipListFilterInput } +interface Store implements DistributionChannel & Retail { + active: Boolean + established_on: Date + id: ID! +} + +""" +Type used to perform aggregation computations on `Store` fields. +""" +type StoreAggregatedValues { + """ + Computed aggregate values for the `active` field. + """ + active: NonNumericAggregatedValues + + """ + Computed aggregate values for the `established_on` field. + """ + established_on: DateAggregatedValues + + """ + Computed aggregate values for the `id` field. + """ + id: NonNumericAggregatedValues +} + +""" +Return type representing a bucket of `Store` documents for an aggregations query. +""" +type StoreAggregation { + """ + Provides computed aggregated values over all `Store` documents in an aggregation bucket. + """ + aggregated_values: StoreAggregatedValues + + """ + The count of `Store` documents in an aggregation bucket. + """ + count: JsonSafeLong! + + """ + Used to specify the `Store` fields to group by. The returned values identify each aggregation bucket. + """ + grouped_by: StoreGroupedBy +} + +""" +Represents a paginated collection of `StoreAggregation` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type StoreAggregationConnection { + """ + Wraps a specific `StoreAggregation` to pair it with its pagination cursor. + """ + edges: [StoreAggregationEdge!]! + + """ + The list of `StoreAggregation` results. + """ + nodes: [StoreAggregation!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! +} + +""" +Represents a specific `StoreAggregation` in the context of a `StoreAggregationConnection`, +providing access to both the `StoreAggregation` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type StoreAggregationEdge { + """ + The `Cursor` of this `StoreAggregation`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `StoreAggregation`. + """ + cursor: Cursor + + """ + The `StoreAggregation` of this edge. + """ + node: StoreAggregation +} + +""" +Represents a paginated collection of `Store` results. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Connection-Types) for more info. +""" +type StoreConnection { + """ + Wraps a specific `Store` to pair it with its pagination cursor. + """ + edges: [StoreEdge!]! + + """ + The list of `Store` results. + """ + nodes: [Store!]! + + """ + Provides pagination-related information. + """ + page_info: PageInfo! + + """ + The total number of edges available in this connection to paginate over. + """ + total_edge_count: JsonSafeLong! +} + +""" +Represents a specific `Store` in the context of a `StoreConnection`, +providing access to both the `Store` and query-specific information such as the pagination `Cursor`. + +See the [Relay GraphQL Cursor Connections +Specification](https://relay.dev/graphql/connections.htm#sec-Edge-Types) for more info. +""" +type StoreEdge { + """ + All search highlights for this `Store`, indicating where in the indexed document the query matched. + """ + all_highlights: [SearchHighlight!]! + + """ + The `Cursor` of this `Store`. This can be passed in the next query as + a `before` or `after` argument to continue paginating from this `Store`. + """ + cursor: Cursor + + """ + Specific search highlights for this `Store`, providing matching snippets for the requested fields. + """ + highlights: StoreHighlights + + """ + The `Store` of this edge. + """ + node: Store +} + +""" +Input type used to specify filters on `Store` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input StoreFilterInput { + """ + Used to filter on the `active` field. + + When `null` or an empty object is passed, matches all documents. + """ + active: BooleanFilterInput + + """ + Matches records where all of the provided sub-filters evaluate to true. This works just like an AND operator in SQL. + + Note: multiple filters are automatically ANDed together. This is only needed when you have multiple filters that can't + be provided on a single `StoreFilterInput` input because of collisions between + key names. For example, if you want to AND multiple + OR'd sub-filters (the equivalent of (A OR B) AND (C OR D)), you could do all_of: [{any_of: [...]}, {any_of: [...]}]. + + When `null` or an empty list is passed, matches all documents. + """ + all_of: [StoreFilterInput!] + + """ + Matches records where any of the provided sub-filters evaluate to true. + This works just like an OR operator in SQL. + + When `null` is passed, matches all documents. + When an empty list is passed, this part of the filter matches no documents. + """ + any_of: [StoreFilterInput!] + + """ + Used to filter on the `established_on` field. + + When `null` or an empty object is passed, matches all documents. + """ + established_on: DateFilterInput + + """ + Used to filter on the `id` field. + + When `null` or an empty object is passed, matches all documents. + """ + id: IDFilterInput + + """ + Matches records where the provided sub-filter evaluates to false. + This works just like a NOT operator in SQL. + + When `null` or an empty object is passed, matches no documents. + """ + not: StoreFilterInput +} + +""" +Type used to specify the `Store` fields to group by for aggregations. +""" +type StoreGroupedBy { + """ + The `active` field value for this group. + """ + active: Boolean + + """ + Offers the different grouping options for the `established_on` value within this group. + """ + established_on: DateGroupedBy +} + +""" +Type used to request desired `Store` search highlight fields. +""" +type StoreHighlights { + """ + Search highlights for the `id`, providing snippets of the matching text. + """ + id: [String!]! +} + +""" +Enumerates the ways `Store`s can be sorted. +""" +enum StoreSortOrderInput { + """ + Sorts ascending by the `established_on` field. + """ + established_on_ASC + + """ + Sorts descending by the `established_on` field. + """ + established_on_DESC + + """ + Sorts ascending by the `id` field. + """ + id_ASC + + """ + Sorts descending by the `id` field. + """ + id_DESC +} + """ Represents a paginated collection of `String` results. @@ -14483,6 +15287,11 @@ input TextFilterInput { not: TextFilterInput } +type ThirdPartyWholesale implements DistributionChannel @key(fields: "id") { + active: Boolean + id: ID! +} + """ An [IANA time zone identifier](https://www.iana.org/time-zones), such as `America/Los_Angeles` or `UTC`. @@ -18624,7 +19433,7 @@ In an ElasticGraph schema, this is a union of all indexed types. Not intended for use by clients other than Apollo. """ -union _Entity = Company | Component | Country | ElectricalPart | Manufacturer | MechanicalPart | Person | Sponsor | Team | Widget | WidgetCurrency | WidgetWorkspace +union _Entity = Company | Component | Country | ElectricalPart | Manufacturer | MechanicalPart | OnlineStore | Person | PhysicalStore | Sponsor | Team | ThirdPartyWholesale | Widget | WidgetCurrency | WidgetWorkspace """ An object type required by the [Apollo Federation subgraph diff --git a/config/schema/widgets.rb b/config/schema/widgets.rb index 233793b10..162ea4785 100644 --- a/config/schema/widgets.rb +++ b/config/schema/widgets.rb @@ -35,33 +35,31 @@ schema.object_type "Person" do |t| t.implements "NamedInventor" - t.root_query_fields plural: "people" t.field "id", "ID!" t.field "name", "String" t.field "nationality", "String" - t.index "people" end schema.object_type "Company" do |t| t.implements "NamedInventor" - t.root_query_fields plural: "companies" t.field "id", "ID!" t.field "name", "String" t.field "stock_ticker", "String" - t.index "companies" end schema.union_type "Inventor" do |t| t.subtypes "Person", "Company" end - # Interface type used both as an embedded field and as a root document type. + # Indexed interface type. Person and Company inherit the `named_inventors` index via + # index inheritance rather than declaring it themselves. schema.interface_type "NamedInventor" do |t| t.field "id", "ID!" t.field "name", "String" + t.index "named_inventors" end - # Indexed interfae type. + # Indexed interface type. schema.interface_type "NamedEntity" do |t| t.root_query_fields plural: "named_entities" t.field "id", "ID!" @@ -343,6 +341,53 @@ t.subtypes "MechanicalPart", "ElectricalPart" end + schema.interface_type "DistributionChannel" do |t| + t.field "id", "ID!" + t.field "active", "Boolean" + t.index "distribution_channels" + end + + # Retail and Store form a two-level interface chain under DistributionChannel. This depth is + # intentional: it exercises that __typename filtering works correctly when querying at any + # level of a multi-level hierarchy, not just one level from the root. + schema.interface_type "Retail" do |t| + t.implements "DistributionChannel" + t.root_query_fields plural: "retailers" + t.field "id", "ID!" + t.field "active", "Boolean" + t.field "established_on", "Date" + end + + schema.interface_type "Store" do |t| + t.implements "Retail" + t.field "id", "ID!" + t.field "active", "Boolean" + t.field "established_on", "Date" + end + + # ThirdPartyWholesale - concrete type in parallel to Retail branch + schema.object_type "ThirdPartyWholesale" do |t| + t.implements "DistributionChannel" + t.field "id", "ID!" + t.field "active", "Boolean" + end + + schema.object_type "OnlineStore" do |t| + t.implements "Store" + t.field "id", "ID!" + t.field "established_on", "Date" + t.field "active", "Boolean" + end + + schema.object_type "PhysicalStore" do |t| + t.implements "Store" + t.field "id", "ID!" + t.field "established_on", "Date" + t.field "active", "Boolean" + + t.index "physical_stores" + end + # Note: `Manufacturer` is used in our tests as an example of an indexed type that has no list fields, so we should # not add any list fields to this type in the future. schema.object_type "Manufacturer" do |t| diff --git a/config/settings/development.yaml b/config/settings/development.yaml index 778058f95..2f2129e69 100644 --- a/config/settings/development.yaml +++ b/config/settings/development.yaml @@ -18,8 +18,7 @@ datastore: setting_overrides_by_timestamp: {} components: *main_index_settings electrical_parts: *main_index_settings - companies: *main_index_settings - people: *main_index_settings + named_inventors: *main_index_settings manufacturers: *main_index_settings mechanical_parts: *main_index_settings teams: *main_index_settings @@ -27,6 +26,8 @@ datastore: widgets: *main_index_settings widget_workspaces: *main_index_settings sponsors: *main_index_settings + distribution_channels: *main_index_settings + physical_stores: *main_index_settings max_client_retries: 3 graphql: default_page_size: 50 diff --git a/config/settings/development_with_apollo.yaml b/config/settings/development_with_apollo.yaml index 52c1e886e..820386368 100644 --- a/config/settings/development_with_apollo.yaml +++ b/config/settings/development_with_apollo.yaml @@ -18,8 +18,7 @@ datastore: setting_overrides_by_timestamp: {} components: *main_index_settings electrical_parts: *main_index_settings - companies: *main_index_settings - people: *main_index_settings + named_inventors: *main_index_settings manufacturers: *main_index_settings mechanical_parts: *main_index_settings teams: *main_index_settings @@ -27,6 +26,8 @@ datastore: widgets: *main_index_settings widget_workspaces: *main_index_settings sponsors: *main_index_settings + physical_stores: *main_index_settings + distribution_channels: *main_index_settings max_client_retries: 3 graphql: default_page_size: 50 diff --git a/config/settings/test.yaml.template b/config/settings/test.yaml.template index d7ff00042..603e8221c 100644 --- a/config/settings/test.yaml.template +++ b/config/settings/test.yaml.template @@ -36,8 +36,7 @@ datastore: setting_overrides_by_timestamp: {} components: *main_index_settings electrical_parts: *main_index_settings - companies: *main_index_settings - people: *main_index_settings + named_inventors: *main_index_settings manufacturers: *main_index_settings mechanical_parts: *main_index_settings teams: *main_index_settings @@ -75,6 +74,8 @@ datastore: "2021-01-01T00:00:00Z": {} widget_workspaces: *main_index_settings sponsors: *main_index_settings + physical_stores: *main_index_settings + distribution_channels: *main_index_settings max_client_retries: 3 graphql: # default_page_size of 50 is duplicated in `elasticgraph/spec/support/aggregations_helpers.rb`. diff --git a/elasticgraph-graphql/lib/elastic_graph/graphql.rb b/elasticgraph-graphql/lib/elastic_graph/graphql.rb index 2f21ab2ec..3b12810a8 100644 --- a/elasticgraph-graphql/lib/elastic_graph/graphql.rb +++ b/elasticgraph-graphql/lib/elastic_graph/graphql.rb @@ -192,6 +192,7 @@ def named_graphql_resolvers def datastore_query_adapters @datastore_query_adapters ||= begin require "elastic_graph/graphql/aggregation/query_adapter" + require "elastic_graph/graphql/query_adapter/abstract_type_filter" require "elastic_graph/graphql/query_adapter/filters" require "elastic_graph/graphql/query_adapter/pagination" require "elastic_graph/graphql/query_adapter/sort" @@ -200,6 +201,7 @@ def datastore_query_adapters schema_element_names = runtime_metadata.schema_element_names [ + GraphQL::QueryAdapter::AbstractTypeFilter.new, GraphQL::QueryAdapter::Pagination.new(schema_element_names: schema_element_names), GraphQL::QueryAdapter::Filters.new( schema_element_names: schema_element_names, diff --git a/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/abstract_type_filter.rb b/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/abstract_type_filter.rb new file mode 100644 index 000000000..a0c32a47c --- /dev/null +++ b/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/abstract_type_filter.rb @@ -0,0 +1,41 @@ +# Copyright 2024 - 2026 Block, Inc. +# +# Use of this source code is governed by an MIT-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/MIT. +# +# frozen_string_literal: true + +module ElasticGraph + class GraphQL + class QueryAdapter + # Query adapter that injects a `__typename` filter when querying an abstract type (interface + # or union) that shares an index with types that fall outside the set of its subtypes. Without + # this filter, documents belonging to those other types would incorrectly appear in results. + # + # For example, if `Store` and `ThirdPartyWholesale` both share the `distribution_channels` + # index, a query for `stores` must filter to only return documents whose `__typename` is one + # of `Store`'s concrete subtypes. + # + # Subtypes with a dedicated index will not have `__typename` in their documents — the index + # itself identifies the type — so `nil` is included to allow those documents through. + class AbstractTypeFilter + def call(field:, query:, args:, lookahead:, context:) + type = field.type.unwrap_fully + + # For indexed aggregation fields, resolve the underlying document type so we can + # apply the same __typename scoping as we do for document queries. + doc_type = type.indexed_aggregation? ? type.aggregation_source_type : type + + return query unless doc_type.abstract? + return query unless doc_type.non_subtypes_in_shared_index.any? + + subtypes = doc_type.subtypes # Note: subtypes returns all concrete subtypes at any depth + query.merge_with(internal_filters: [{ + "__typename" => {query.schema_element_names.equal_to_any_of => [nil] + subtypes.map(&:name)} + }]) + end + end + end + end +end diff --git a/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/requested_fields.rb b/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/requested_fields.rb index 7378616c5..3dc12a4d3 100644 --- a/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/requested_fields.rb +++ b/elasticgraph-graphql/lib/elastic_graph/graphql/query_adapter/requested_fields.rb @@ -86,7 +86,10 @@ def requested_fields_under(node, index_field_paths, path_prefix: "") requested_fields_for(child, index_field_paths, path_prefix: path_prefix) end - fields << "#{path_prefix}__typename" if field_for(node.field)&.type&.abstract? + # For abstract types (unions/interfaces), we need __typename to resolve the concrete type. + # We must fully unwrap the type to check the innermost type, since the field type could be + # wrapped in non-null or list wrappers (e.g., `[NamedInventor!]!` on a `nodes` relay connection field). + fields << "#{path_prefix}__typename" if field_for(node.field)&.type&.unwrap_fully&.abstract? fields end diff --git a/elasticgraph-graphql/lib/elastic_graph/graphql/resolvers/graphql_adapter_builder.rb b/elasticgraph-graphql/lib/elastic_graph/graphql/resolvers/graphql_adapter_builder.rb index 59a83384f..fbc118e32 100644 --- a/elasticgraph-graphql/lib/elastic_graph/graphql/resolvers/graphql_adapter_builder.rb +++ b/elasticgraph-graphql/lib/elastic_graph/graphql/resolvers/graphql_adapter_builder.rb @@ -110,8 +110,10 @@ def object_type_hash # In order to support unions and interfaces, we must implement `resolve_type`. def resolve_type(supertype, object, context) schema = context.fetch(:elastic_graph_schema) - # If `__typename` is available, use that to resolve. It should be available on any embedded abstract types... - # (See `Inventor` in `config/schema.graphql` for an example of this kind of type union.) + # If `__typename` is available, use that to resolve. It will be present on embedded abstract + # types, and also on root documents indexed in a shared interface/union index (e.g. `NamedInventor`). + # (See `Inventor` in `config/schema/widgets.rb` for an example of an embedded abstract type, + # and `NamedInventor` for an example of a shared interface index.) if (typename = object["__typename"]) schema .graphql_schema diff --git a/elasticgraph-graphql/lib/elastic_graph/graphql/schema.rb b/elasticgraph-graphql/lib/elastic_graph/graphql/schema.rb index 2fbe0d6dc..ee123bbca 100644 --- a/elasticgraph-graphql/lib/elastic_graph/graphql/schema.rb +++ b/elasticgraph-graphql/lib/elastic_graph/graphql/schema.rb @@ -127,7 +127,7 @@ def document_type_stored_in(index_definition_name) else raise Errors::NotFoundError, "The index definition `#{index_definition_name}` does not appear to exist. Is it misspelled?" end - end + end.first end def field_named(type_name, field_name) @@ -152,6 +152,17 @@ def to_s end alias_method :inspect, :to_s + # Returns a hash mapping each index definition name to all indexed document types that use that index. + # Multiple types may map to the same index when abstract types share an index with their concrete subtypes + # via index inheritance. + def indexed_document_types_by_index_definition_name + @indexed_document_types_by_index_definition_name ||= indexed_document_types.each_with_object({}) do |type, hash| + type.index_definitions.each do |index_def| + (hash[index_def.name] ||= []) << type + end + end.freeze + end + private def build_base_object_class @@ -190,14 +201,6 @@ def build_types_by_name end end - def indexed_document_types_by_index_definition_name - @indexed_document_types_by_index_definition_name ||= indexed_document_types.each_with_object({}) do |type, hash| - type.index_definitions.each do |index_def| - hash[index_def.name] ||= type - end - end.freeze - end - def log_hidden_types hidden_types = @types_by_name.values.select(&:hidden_from_queries?) return if hidden_types.empty? diff --git a/elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb b/elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb index d35e73e88..02c50b17d 100644 --- a/elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb +++ b/elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb @@ -117,7 +117,7 @@ def unwrap_fully end end - # Returns the subtypes of this type, if it has any. This is like `#possible_types` provided by the + # Returns all concrete subtypes, at any depth. This is like `#possible_types` provided by the # GraphQL gem, but that includes a type itself when you ask for the possible types of a non-abstract type. def subtypes @subtypes ||= @schema @@ -126,6 +126,23 @@ def subtypes .map { |t| @schema.type_from(t) } - [self] end + # For indexed aggregation types, returns the underlying source document type. + def aggregation_source_type + @schema.type_named(@object_runtime_metadata.source_type) + end + + # Returns the set of indexed document types that share any of this type's search indexes + # but are not subtypes of this type. Used to determine whether a `__typename` filter is + # needed when querying an abstract type. + def non_subtypes_in_shared_index + @non_subtypes_in_shared_index ||= begin + all_subtypes = subtypes.to_set # all concrete subtypes at any depth + search_index_definitions.flat_map do |index_def| + @schema.indexed_document_types_by_index_definition_name.fetch(index_def.name, []) + end.reject { |t| t == self || all_subtypes.include?(t) }.to_set + end + end + def field_named(field_name) @fields_by_name.fetch(field_name) rescue KeyError => e diff --git a/elasticgraph-graphql/sig/elastic_graph/graphql/schema.rbs b/elasticgraph-graphql/sig/elastic_graph/graphql/schema.rbs index ecdd631a2..82cdab2aa 100644 --- a/elasticgraph-graphql/sig/elastic_graph/graphql/schema.rbs +++ b/elasticgraph-graphql/sig/elastic_graph/graphql/schema.rbs @@ -32,6 +32,7 @@ module ElasticGraph def document_type_stored_in: (::String) -> Type def field_named: (::String, ::String) -> Field def indexed_document_types: () -> ::Array[Type] + def indexed_document_types_by_index_definition_name: () -> ::Hash[::String, ::Array[Type]] def log_hidden_types: (Logger) -> void end end diff --git a/elasticgraph-graphql/sig/elastic_graph/graphql/schema/type.rbs b/elasticgraph-graphql/sig/elastic_graph/graphql/schema/type.rbs index a3d840c2f..7dc7a24fe 100644 --- a/elasticgraph-graphql/sig/elastic_graph/graphql/schema/type.rbs +++ b/elasticgraph-graphql/sig/elastic_graph/graphql/schema/type.rbs @@ -9,6 +9,8 @@ module ElasticGraph attr_reader graphql_type: ::GraphQL::Schema::_Type attr_reader grouping_missing_value_placeholder: ::String? | ::Numeric? def search_index_definitions: () -> ::Array[DatastoreCore::_IndexDefinition] + def aggregation_source_type: () -> Type + def non_subtypes_in_shared_index: () -> ::Set[Type] def unwrap_fully: () -> Type def field_named: (::String) -> Field def fields_by_name_in_index: () -> ::Hash[::String, ::Array[Field]] diff --git a/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb b/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb index a42a8ea61..26fcc2f23 100644 --- a/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb +++ b/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb @@ -78,10 +78,12 @@ module ElasticGraph all_types_related_to("WidgetCurrency") + all_types_related_to("Team") + all_types_related_to("Sponsor") + - all_types_related_to("Person") + - all_types_related_to("Company") + all_types_related_to("Inventor") + all_types_related_to("NamedInventor") + + all_types_related_to("Store") + + all_types_related_to("DistributionChannel") + + all_types_related_to("Retail") + + all_types_related_to("PhysicalStore") + relay_types_related_to("String", include_list_filter: true) - ["StringSortOrderInput"] + type_and_filters_for("Boolean", include_list: true) + type_and_filters_for("Color", include_list: true, as_input_enum: true) + @@ -96,6 +98,7 @@ module ElasticGraph type_and_filters_for("TeamNestedFields") + ["TeamNestedFieldsHighlights"] + type_and_filters_for("Affiliations") + type_and_filters_for("ID", include_list: true) + + type_filter_and_non_indexed_aggregation_types_for("Person") + type_filter_and_non_indexed_aggregation_types_for("TeamDetails") + type_filter_and_non_indexed_aggregation_types_for("AddressTimestamps", include_highlights: false) - ["AddressTimestamps"] + type_filter_and_non_indexed_aggregation_types_for("Affiliations", include_fields_list_filter: true) + @@ -116,7 +119,7 @@ module ElasticGraph %w[ FloatAggregatedValues IntAggregatedValues JsonSafeLongAggregatedValues LongStringAggregatedValues NonNumericAggregatedValues DateAggregatedValues DateTimeAggregatedValues LocalTimeAggregatedValues - Cursor PageInfo Query TextFilterInput GeoLocation + Company Cursor PageInfo Query TextFilterInput GeoLocation OnlineStore ThirdPartyWholesale DateTimeGroupingOffsetInput DateTimeUnitInput DateTimeTimeOfDayFilterInput DateGroupedBy DateGroupingOffsetInput DateGroupingTruncationUnitInput DateUnitInput DateTimeGroupedBy DateTimeGroupingTruncationUnitInput TimeZone diff --git a/elasticgraph-graphql/spec/acceptance/search_spec.rb b/elasticgraph-graphql/spec/acceptance/search_spec.rb index 0ad2aceb0..c4862897b 100644 --- a/elasticgraph-graphql/spec/acceptance/search_spec.rb +++ b/elasticgraph-graphql/spec/acceptance/search_spec.rb @@ -698,6 +698,100 @@ module ElasticGraph test_widget_search_highlighting(widget1, widget2, widget3) end + it "correctly scopes results to the queried interface level across a multi-level type hierarchy", :expect_search_routing do + established_on_asc = :"#{case_correctly("established_on")}_ASC" + id_desc = :"#{case_correctly("id")}_DESC" + + # The DistributionChannel hierarchy has two branches: + # DistributionChannel (index: distribution_channels) + # ├── ThirdPartyWholesale (concrete, distribution_channels index) + # └── Retail (interface, inherits distribution_channels) + # └── Store (interface, inherits distribution_channels) + # ├── OnlineStore (concrete, distribution_channels index) + # └── PhysicalStore (concrete, physical_stores index) + # + # The key invariant: querying at a sub-interface level (e.g. retailers, stores) must + # filter OUT sibling types in the shared index (e.g. ThirdPartyWholesale when querying stores). + index_records( + physical_store1 = build(:physical_store, established_on: "2019-03-10", active: true), + physical_store2 = build(:physical_store, established_on: "2022-08-05", active: true), + online_store1 = build(:online_store, established_on: "2020-01-15", active: true), + online_store2 = build(:online_store, established_on: "2021-06-20", active: true), + build(:third_party_wholesale, active: true), + wholesale2 = build(:third_party_wholesale, active: false) + ) + + store_fragments = [ + "...on PhysicalStore { id __typename established_on }", + "...on OnlineStore { id __typename established_on }" + ] + all_channel_fragments = store_fragments + ["...on ThirdPartyWholesale { id __typename active }"] + + store_typenames = %w[PhysicalStore PhysicalStore OnlineStore OnlineStore] + + # Querying at the top-level DistributionChannel interface returns all 3 concrete types, + # including ThirdPartyWholesale. + channels = list_distribution_channels_with(*all_channel_fragments) + expect(channels.map { |c| c["__typename"] }).to contain_exactly( + *store_typenames, "ThirdPartyWholesale", "ThirdPartyWholesale" + ) + + # Querying at the Retail interface excludes ThirdPartyWholesale, even though it lives in + # the same distribution_channels index. The __typename filter handles this. + retailers = list_retailers_with(*store_fragments) + expect(retailers.map { |r| r["__typename"] }).to contain_exactly(*store_typenames) + + # Querying at the Store interface likewise excludes ThirdPartyWholesale. + stores = list_stores_with(*store_fragments) + expect(stores.map { |s| s["__typename"] }).to contain_exactly(*store_typenames) + + # Filters apply within the correct scope at each level. + # At distribution_channels: active=false matches only wholesale2. + inactive = list_distribution_channels_with(*all_channel_fragments, filter: {active: {equal_to_any_of: [false]}}) + expect(inactive.map { |c| c["__typename"] }).to contain_exactly("ThirdPartyWholesale") + expect(inactive.map { |c| c["id"] }).to contain_exactly(wholesale2.fetch(:id)) + + # At retailers: established_on filter applies, and ThirdPartyWholesale is still excluded. + retailers_after_2020 = list_retailers_with(*store_fragments, filter: {established_on: {gte: "2020-01-01"}}) + expect(retailers_after_2020.map { |r| r["id"] }).to contain_exactly( + online_store1.fetch(:id), online_store2.fetch(:id), + physical_store2.fetch(:id) + ) + + # Sort by established_on at the stores level spans both indices correctly. + stores_sorted = list_stores_with(*store_fragments, order_by: [established_on_asc]) + expect(stores_sorted.map { |s| s["id"] }).to eq([ + physical_store1.fetch(:id), + online_store1.fetch(:id), + online_store2.fetch(:id), + physical_store2.fetch(:id) + ]) + + # Pagination at the distribution_channels level covers all types. + channels_page, page_info = list_distribution_channels_and_page_info_with( + *all_channel_fragments, + first: 4, + order_by: [id_desc] + ) + expect(channels_page.size).to eq(4) + expect(page_info).to include(case_correctly("has_next_page") => true) + + # Filter by ID spans indices and respects the __typename scope at each query level. + stores_by_id = list_stores_with( + *store_fragments, + filter: {id: {equal_to_any_of: [physical_store1.fetch(:id), online_store1.fetch(:id)]}} + ) + expect(stores_by_id.map { |s| [s["id"], s["__typename"]] }).to contain_exactly( + [physical_store1.fetch(:id), "PhysicalStore"], + [online_store1.fetch(:id), "OnlineStore"] + ) + + # Aggregations respect the same __typename scoping as document queries. + store_agg_count = call_graphql_query("query { #{case_correctly("store_aggregations")} { nodes { #{case_correctly("count")} } } }") + .dig("data", case_correctly("store_aggregations"), "nodes", 0, case_correctly("count")) + expect(store_agg_count).to eq(store_typenames.size) + end + it "supports fetching interface fields" do index_into( graphql, @@ -1490,6 +1584,45 @@ def list_widgets_via_widgets_or_addresses(**query_args) QUERY end + def list_distribution_channels_with(*fragments, **query_args) + field = case_correctly("distribution_channels") + query_abstract_type_with(field, *fragments, **query_args).dig("data", field, "edges").map { |e| e.fetch("node") } + end + + def list_distribution_channels_and_page_info_with(*fragments, **query_args) + field = case_correctly("distribution_channels") + response = query_abstract_type_with(field, *fragments, **query_args).dig("data", field) + [response.fetch("edges").map { |e| e.fetch("node") }, response.fetch(case_correctly("page_info"))] + end + + def list_retailers_with(*fragments, **query_args) + query_abstract_type_with("retailers", *fragments, **query_args).dig("data", "retailers", "edges").map { |e| e.fetch("node") } + end + + def list_stores_with(*fragments, **query_args) + query_abstract_type_with("stores", *fragments, **query_args).dig("data", "stores", "edges").map { |e| e.fetch("node") } + end + + def query_abstract_type_with(field, *fragments, allow_errors: false, **query_args) + fragment_string = fragments.join("\n") + call_graphql_query(<<~QUERY, allow_errors: allow_errors) + query { + #{field}#{graphql_args(query_args)} { + #{case_correctly("page_info")} { + #{case_correctly("end_cursor")} + #{case_correctly("has_next_page")} + #{case_correctly("has_previous_page")} + } + edges { + node { + #{fragment_string} + } + } + } + } + QUERY + end + def list_widgets_by_nodes_with(fieldname, **query_args) query_widgets_by_nodes_with(fieldname, **query_args).dig("data", "widgets", "nodes") end diff --git a/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/abstract_type_filter_spec.rb b/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/abstract_type_filter_spec.rb new file mode 100644 index 000000000..cabe256c0 --- /dev/null +++ b/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/abstract_type_filter_spec.rb @@ -0,0 +1,154 @@ +# Copyright 2024 - 2026 Block, Inc. +# +# Use of this source code is governed by an MIT-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/MIT. +# +# frozen_string_literal: true + +require "elastic_graph/graphql/query_adapter/abstract_type_filter" + +module ElasticGraph + class GraphQL + class QueryAdapter + RSpec.describe AbstractTypeFilter, :query_adapter do + attr_accessor :schema_artifacts + + before(:context) do + self.schema_artifacts = generate_schema_artifacts do |schema| + # A concrete type with its own dedicated index. + schema.object_type "Widget" do |t| + t.field "id", "ID!" + t.root_query_fields plural: "widgets" + t.index "widgets" + end + + # A union whose subtypes all share one index — no __typename filter needed. + schema.object_type "Person" do |t| + t.field "id", "ID!" + end + + schema.object_type "Company" do |t| + t.field "id", "ID!" + end + + schema.union_type "Inventor" do |t| + t.subtypes "Person", "Company" + t.root_query_fields plural: "inventors" + t.index "inventors" + end + + # An interface hierarchy where `Store` shares the `channels` index with `Wholesaler`, + # requiring a __typename filter when querying stores. + # `PhysicalStore` has its own dedicated index, so its documents will not have __typename. + schema.interface_type "Channel" do |t| + t.field "id", "ID!" + t.root_query_fields plural: "channels" + t.index "channels" + end + + schema.object_type "Wholesaler" do |t| + t.implements "Channel" + t.field "id", "ID!" + end + + schema.interface_type "Store" do |t| + t.implements "Channel" + t.field "id", "ID!" + t.root_query_fields plural: "stores" + end + + schema.object_type "OnlineStore" do |t| + t.implements "Store" + t.field "id", "ID!" + end + + schema.object_type "PhysicalStore" do |t| + t.implements "Store" + t.field "id", "ID!" + t.index "physical_stores" + end + end + end + + context "when querying a concrete type" do + it "does not apply a __typename filter" do + query = datastore_query_for(:Query, :widgets, <<~QUERY) + query { widgets { edges { node { id } } } } + QUERY + + expect(query.internal_filters).to be_empty + end + end + + context "when querying an abstract type whose subtypes all share one index" do + it "does not apply a __typename filter" do + query = datastore_query_for(:Query, :inventors, <<~QUERY) + query { inventors { edges { node { ... on Person { id } ... on Company { id } } } } } + QUERY + + expect(query.internal_filters).to be_empty + end + end + + context "when querying an abstract type that shares an index with a sibling type" do + it "applies a __typename filter scoped to the queried type's concrete subtypes, including nil for subtypes with dedicated indexes" do + query = datastore_query_for(:Query, :stores, <<~QUERY) + query { stores { edges { node { id } } } } + QUERY + + typename_filter = query.internal_filters.find { |f| f.key?("__typename") } + expect(typename_filter).not_to be_nil + expect(typename_filter.dig("__typename", "equal_to_any_of")).to contain_exactly(nil, "OnlineStore", "PhysicalStore") + end + + it "applies a __typename filter when querying the root abstract type" do + query = datastore_query_for(:Query, :channels, <<~QUERY) + query { channels { edges { node { id } } } } + QUERY + + expect(query.internal_filters).not_to be_empty + end + + it "applies a __typename filter on aggregations of the abstract type" do + query = datastore_query_for(:Query, :store_aggregations, <<~QUERY) + query { store_aggregations { nodes { count } } } + QUERY + + typename_filter = query.internal_filters.find { |f| f.key?("__typename") } + expect(typename_filter).not_to be_nil + expect(typename_filter.dig("__typename", "equal_to_any_of")).to contain_exactly(nil, "OnlineStore", "PhysicalStore") + end + end + + context "when calling non_subtypes_in_shared_index" do + it "excludes the type itself and its subtypes from the result" do + schema = build_graphql(schema_artifacts: schema_artifacts).schema + store = schema.type_named("Store") + + result = store.non_subtypes_in_shared_index + expect(result).not_to include(store) + expect(result).not_to include(schema.type_named("OnlineStore")) + expect(result).not_to include(schema.type_named("PhysicalStore")) + expect(result).to include(schema.type_named("Wholesaler")) + end + end + + private + + def graphql_and_datastore_queries_by_field_for(graphql_query, **graphql_opts) + super(graphql_query, schema_artifacts: schema_artifacts, **graphql_opts) + end + + def datastore_query_for(type, field, graphql_query) + super( + schema_artifacts: schema_artifacts, + graphql_query: graphql_query, + type: type, + field: field + ) + end + end + end + end +end diff --git a/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/requested_fields_spec.rb b/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/requested_fields_spec.rb index b94381d27..e3f39b72d 100644 --- a/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/requested_fields_spec.rb +++ b/elasticgraph-graphql/spec/unit/elastic_graph/graphql/query_adapter/requested_fields_spec.rb @@ -43,7 +43,30 @@ class QueryAdapter t.field "name", "String" end - # Indexed interfae type. + # Indexed interface type used solely as a root document type (not embedded anywhere). + # Author and Scientist inherit the `creators` index via index inheritance rather than + # declaring it themselves. + schema.interface_type "Creator" do |t| + t.field "id", "ID!" + t.field "name", "String" + t.index "creators" + end + + schema.object_type "Author" do |t| + t.implements "Creator" + t.field "id", "ID!" + t.field "name", "String" + t.field "genre", "String" + end + + schema.object_type "Scientist" do |t| + t.implements "Creator" + t.field "id", "ID!" + t.field "name", "String" + t.field "field_of_study", "String" + end + + # Indexed interface type. schema.interface_type "NamedEntity" do |t| t.root_query_fields plural: "named_entities" t.field "id", "ID" @@ -369,6 +392,21 @@ class QueryAdapter expect(query.request_all_highlights).to be false end + it "requests __typename when using `nodes` on an abstract indexed type" do + query = datastore_query_for(:Query, :creators, <<~QUERY) + query { + creators { + nodes { + ... on Author { genre } + ... on Scientist { field_of_study } + } + } + } + QUERY + + expect(query.requested_fields).to include("__typename") + end + it "ignores relay connection sub-fields that are not directly under `edges.node` (e.g. `page_info`)" do query = datastore_query_for(:Query, :widgets, <<~QUERY) query { diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/api.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/api.rb index 4b61944c2..912f28a15 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/api.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/api.rb @@ -139,6 +139,10 @@ def object_type(name, &block) # one or more fields that concrete implementations of the interface must also define. Each implementation can be an # {SchemaElements::ObjectType} or {SchemaElements::InterfaceType}. # + # @note An interface type can declare an index with {Mixins::HasIndices#index}. All concrete types that implement + # the interface will automatically share that index unless they declare their own. This is the primary way to define a + # _mixed-type index_ where multiple concrete types coexist in a single datastore index. + # # @param name [String] name of the interface # @yield [SchemaElements::InterfaceType] interface type object # @return [void] @@ -164,6 +168,35 @@ def object_type(name, &block) # t.field "pointsPerGame", "Float" # end # end + # + # @example Define an indexed interface so subtypes share a single index + # ElasticGraph.define_schema do |schema| + # schema.interface_type "Athlete" do |t| + # t.field "id", "ID!" + # t.field "name", "String" + # t.field "team", "String" + # t.root_query_fields plural: "athletes" + # t.index "athletes" + # end + # + # # Inherits the `athletes` index automatically. + # schema.object_type "BaseballPlayer" do |t| + # t.implements "Athlete" + # t.field "id", "ID!" + # t.field "name", "String" + # t.field "team", "String" + # t.field "battingAvg", "Float" + # end + # + # # Also inherits the `athletes` index. + # schema.object_type "BasketballPlayer" do |t| + # t.implements "Athlete" + # t.field "id", "ID!" + # t.field "name", "String" + # t.field "team", "String" + # t.field "pointsPerGame", "Float" + # end + # end def interface_type(name, &block) @state.register_object_interface_or_union_type @factory.new_interface_type(name.to_s, &block) nil diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/has_indices.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/has_indices.rb index bdc63a137..df242f6ad 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/has_indices.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/has_indices.rb @@ -29,12 +29,19 @@ def initialize(*args, **options) initialize_has_indices { yield self } end - # Converts the current type from being an _embedded_ type (that is, a type that is embedded within another indexed type) to an - # _indexed_ type that resides in the named index definition. Indexed types are directly indexed into the datastore, and will be - # queryable from the root `Query` type. + # Declares a datastore index for the current type. The behavior depends on whether this is called + # on a concrete type or an abstract type: + # + # - On a concrete `object_type`: converts it from an _embedded_ type to an _indexed_ type that is + # directly queryable from the root `Query` type. + # - On an abstract `interface_type` or `union_type`: declares a _shared index_ that all concrete + # subtypes automatically inherit. Subtypes that inherit an index do not need to call `t.index` + # themselves — they share the same physical index. A concrete subtype can still call `t.index` + # with a different name to opt out of inheritance and get a dedicated index instead. # # @note Use {#root_query_fields} on indexed types to name the field that will be exposed on `Query`. # @note Indexed types must also define an `id` field, which ElasticGraph will use as the primary key. + # When an abstract type declares the index, each concrete subtype must also define `id`. # @note Datastore index settings can also be defined (or overridden) in an environment-specific settings YAML file. Index settings # that you want to configure differently for different environments (such as `index.number_of_shards`—-production and staging # will probably need different numbers!) should be configured in the per-environment YAML configuration files rather than here. @@ -46,7 +53,7 @@ def initialize(*args, **options) # @yield [Indexing::Index] the index, so it can be customized further # @return [void] # - # @example Define a `campaigns` index + # @example Define a `campaigns` index on a concrete type # ElasticGraph.define_schema do |schema| # schema.object_type "Campaign" do |t| # t.field "id", "ID" @@ -62,6 +69,34 @@ def initialize(*args, **options) # end # end # end + # + # @example Declare a shared index on an interface so subtypes inherit it + # ElasticGraph.define_schema do |schema| + # schema.interface_type "Vehicle" do |t| + # t.field "id", "ID" + # t.field "make", "String" + # t.root_query_fields plural: "vehicles" + # # Car and Motorcycle will share this index automatically. + # t.index "vehicles" + # end + # + # # Inherits the `vehicles` index — no need to call `t.index`. + # schema.object_type "Car" do |t| + # t.implements "Vehicle" + # t.field "id", "ID" + # t.field "make", "String" + # t.field "numDoors", "Int" + # end + # + # # Opts out of the shared index and gets its own dedicated index instead. + # schema.object_type "Motorcycle" do |t| + # t.implements "Vehicle" + # t.field "id", "ID" + # t.field "make", "String" + # t.field "engineCC", "Int" + # t.index "motorcycles" + # end + # end def index(name, **settings, &block) unless @can_configure_index raise Errors::SchemaError, "Cannot define an index on `#{self.name}` after initialization is complete. " \ @@ -133,6 +168,9 @@ def root_document_type? end # @return [Boolean] true if this type is directly queryable via a type-specific field on the root `Query` type. + # @note A concrete subtype that inherits an index from an abstract parent is NOT directly queryable on its own — + # only the abstract type that declared the index is. Use {#root_document_type?} to check whether a type + # participates in any index (own or inherited). def directly_queryable? has_own_index_def? end diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/implements_interfaces.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/implements_interfaces.rb index 837ba3680..1e5c1a708 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/implements_interfaces.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/mixins/implements_interfaces.rb @@ -16,6 +16,11 @@ module ImplementsInterfaces # Declares that the current type implements the specified interface, making the current type a subtype of the interface. The # current type must define all of the fields of the named interface, with the exact same field types. # + # @note If the named interface has declared an index (via {Mixins::HasIndices#index}), calling `implements` + # causes this type to automatically inherit that index — it will be stored in the same datastore index as all other + # implementers. To override this and use a dedicated index, call {Mixins::HasIndices#index} on this type + # after `implements`. + # # @param interface_names [Array] names of interface types implemented by this type # @return [void] # diff --git a/spec_support/lib/elastic_graph/spec_support/factories/widgets.rb b/spec_support/lib/elastic_graph/spec_support/factories/widgets.rb index 9d00a042a..c8c94efe6 100644 --- a/spec_support/lib/elastic_graph/spec_support/factories/widgets.rb +++ b/spec_support/lib/elastic_graph/spec_support/factories/widgets.rb @@ -47,12 +47,14 @@ factory :person, parent: :indexed_type do __typename { "Person" } + id { Faker::Alphanumeric.alpha(number: 20) } name { Faker::Name.name } nationality { Faker::Nation.nationality } end factory :company, parent: :indexed_type do __typename { "Company" } + id { Faker::Alphanumeric.alpha(number: 20) } name { Faker::Company.name } stock_ticker { name[0..3].upcase } end @@ -210,4 +212,21 @@ parts { [] } end end + + factory :online_store, parent: :indexed_type do + __typename { "OnlineStore" } + established_on { Faker::Date.between(from: recent_date - 365, to: recent_date).iso8601 } + active { true } + end + + factory :physical_store, parent: :indexed_type do + __typename { "PhysicalStore" } + established_on { Faker::Date.between(from: recent_date - 365, to: recent_date).iso8601 } + active { true } + end + + factory :third_party_wholesale, parent: :indexed_type do + __typename { "ThirdPartyWholesale" } + active { true } + end end