diff --git a/config/schema/artifacts/data_warehouse.yaml b/config/schema/artifacts/data_warehouse.yaml index fae53c1c3..b836f3f74 100644 --- a/config/schema/artifacts/data_warehouse.yaml +++ b/config/schema/artifacts/data_warehouse.yaml @@ -113,6 +113,7 @@ tables: cost_currency_primary_continent STRING, cost_currency_introduced_on DATE, name STRING, + internal_name STRING, name_text STRING, description STRING, created_at TIMESTAMP, @@ -122,6 +123,7 @@ tables: release_dates ARRAY, component_ids ARRAY, options STRUCT, + internal_details STRUCT, the_opts STRUCT, inventor STRUCT, named_inventor STRUCT, diff --git a/config/schema/artifacts/datastore_config.yaml b/config/schema/artifacts/datastore_config.yaml index 8ed565868..aff3dad29 100644 --- a/config/schema/artifacts/datastore_config.yaml +++ b/config/schema/artifacts/datastore_config.yaml @@ -1355,6 +1355,8 @@ index_templates: format: strict_date name: type: keyword + internal_name: + type: keyword name_text: type: text description: @@ -1386,6 +1388,10 @@ index_templates: type: keyword is_draft: type: boolean + internal_details: + properties: + name: + type: keyword the_opts: properties: size: @@ -1463,6 +1469,10 @@ index_templates: required: true _size: enabled: true + _source: + excludes: + - internal_name + - internal_details.* settings: index.mapping.ignore_malformed: false index.mapping.coerce: false diff --git a/config/schema/artifacts/json_schemas.yaml b/config/schema/artifacts/json_schemas.yaml index 0d6bc4410..85524ef68 100644 --- a/config/schema/artifacts/json_schemas.yaml +++ b/config/schema/artifacts/json_schemas.yaml @@ -862,6 +862,12 @@ json_schema_version: 1 - "$ref": "#/$defs/String" - maxLength: 8191 - type: 'null' + internal_name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' name_text: anyOf: - allOf: @@ -902,6 +908,10 @@ json_schema_version: 1 anyOf: - "$ref": "#/$defs/WidgetOptions" - type: 'null' + internal_details: + anyOf: + - "$ref": "#/$defs/WidgetInternalDetails" + - type: 'null' the_options: anyOf: - "$ref": "#/$defs/WidgetOptions" @@ -953,6 +963,7 @@ json_schema_version: 1 - cost_currency_primary_continent - cost_currency_introduced_on - name + - internal_name - name_text - description - created_at @@ -962,6 +973,7 @@ json_schema_version: 1 - release_dates - component_ids - options + - internal_details - the_options - inventor - named_inventor @@ -973,6 +985,21 @@ json_schema_version: 1 - metadata description: For more performant queries on this type, please filter on `workspace_id` if possible. + WidgetInternalDetails: + type: object + properties: + name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' + __typename: + type: string + const: WidgetInternalDetails + default: WidgetInternalDetails + required: + - name WidgetOptions: type: object properties: diff --git a/config/schema/artifacts/json_schemas_by_version/v1.yaml b/config/schema/artifacts/json_schemas_by_version/v1.yaml index aaca97ed0..03135fa6b 100644 --- a/config/schema/artifacts/json_schemas_by_version/v1.yaml +++ b/config/schema/artifacts/json_schemas_by_version/v1.yaml @@ -1162,6 +1162,15 @@ json_schema_version: 1 ElasticGraph: type: String nameInIndex: name + internal_name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' + ElasticGraph: + type: String + nameInIndex: internal_name name_text: anyOf: - allOf: @@ -1229,6 +1238,13 @@ json_schema_version: 1 ElasticGraph: type: WidgetOptions nameInIndex: options + internal_details: + anyOf: + - "$ref": "#/$defs/WidgetInternalDetails" + - type: 'null' + ElasticGraph: + type: WidgetInternalDetails + nameInIndex: internal_details the_options: anyOf: - "$ref": "#/$defs/WidgetOptions" @@ -1307,6 +1323,7 @@ json_schema_version: 1 - cost_currency_primary_continent - cost_currency_introduced_on - name + - internal_name - name_text - description - created_at @@ -1316,6 +1333,7 @@ json_schema_version: 1 - release_dates - component_ids - options + - internal_details - the_options - inventor - named_inventor @@ -1327,6 +1345,24 @@ json_schema_version: 1 - metadata description: For more performant queries on this type, please filter on `workspace_id` if possible. + WidgetInternalDetails: + type: object + properties: + name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' + ElasticGraph: + type: String + nameInIndex: name + __typename: + type: string + const: WidgetInternalDetails + default: WidgetInternalDetails + required: + - name WidgetOptions: type: object properties: diff --git a/config/schema/artifacts/runtime_metadata.yaml b/config/schema/artifacts/runtime_metadata.yaml index 3e367ec99..5febbf857 100644 --- a/config/schema/artifacts/runtime_metadata.yaml +++ b/config/schema/artifacts/runtime_metadata.yaml @@ -415,6 +415,22 @@ enum_types_by_name: sort_field: direction: desc field_path: id + internal_details_name_ASC: + sort_field: + direction: asc + field_path: internal_details.name + internal_details_name_DESC: + sort_field: + direction: desc + field_path: internal_details.name + internal_name_ASC: + sort_field: + direction: asc + field_path: internal_name + internal_name_DESC: + sort_field: + direction: desc + field_path: internal_name inventor_name_ASC: sort_field: direction: asc @@ -945,6 +961,22 @@ enum_types_by_name: sort_field: direction: desc field_path: id + internal_details_name_ASC: + sort_field: + direction: asc + field_path: internal_details.name + internal_details_name_DESC: + sort_field: + direction: desc + field_path: internal_details.name + internal_name_ASC: + sort_field: + direction: asc + field_path: internal_name + internal_name_DESC: + sort_field: + direction: desc + field_path: internal_name inventor_name_ASC: sort_field: direction: asc @@ -1219,6 +1251,22 @@ enum_types_by_name: sort_field: direction: desc field_path: id + internal_details_name_ASC: + sort_field: + direction: asc + field_path: internal_details.name + internal_details_name_DESC: + sort_field: + direction: desc + field_path: internal_details.name + internal_name_ASC: + sort_field: + direction: asc + field_path: internal_name + internal_name_DESC: + sort_field: + direction: desc + field_path: internal_name inventor_name_ASC: sort_field: direction: asc @@ -2568,6 +2616,10 @@ index_definitions_by_name: source: __self id: source: __self + internal_details.name: + source: __self + internal_name: + source: __self inventor.name: source: __self inventor.nationality: @@ -4042,6 +4094,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -4218,6 +4276,12 @@ object_types_by_name: id: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -4409,6 +4473,12 @@ object_types_by_name: fees: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -4505,6 +4575,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -6187,6 +6263,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -6305,6 +6387,10 @@ object_types_by_name: cardinality: one fees: cardinality: one + internal_details: + cardinality: one + internal_name: + cardinality: one inventor: cardinality: one metadata: @@ -6428,6 +6514,12 @@ object_types_by_name: id: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -6850,6 +6942,12 @@ object_types_by_name: fees: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -6924,6 +7022,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -6960,6 +7064,21 @@ object_types_by_name: workspace_name: resolver: name: get_record_field_value + WidgetInternalDetailsAggregatedValues: + graphql_fields_by_name: + name: + resolver: + name: object_with_lookahead + WidgetInternalDetailsGroupedBy: + graphql_fields_by_name: + name: + resolver: + name: object_with_lookahead + WidgetInternalDetailsHighlights: + graphql_fields_by_name: + name: + resolver: + name: get_record_field_value WidgetOptionSets: graphql_fields_by_name: colors: @@ -7115,6 +7234,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -7236,6 +7361,12 @@ object_types_by_name: id: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -7409,6 +7540,12 @@ object_types_by_name: full_address: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -7489,6 +7626,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value diff --git a/config/schema/artifacts/schema.graphql b/config/schema/artifacts/schema.graphql index 0005e2d94..2be07ad84 100644 --- a/config/schema/artifacts/schema.graphql +++ b/config/schema/artifacts/schema.graphql @@ -5459,6 +5459,16 @@ type NamedEntityAggregatedValues { """ id: NonNumericAggregatedValues + """ + Computed aggregate values for the `internal_details` field. + """ + internal_details: WidgetInternalDetailsAggregatedValues + + """ + Computed aggregate values for the `internal_name` field. + """ + internal_name: NonNumericAggregatedValues + """ Computed aggregate values for the `inventor` field. """ @@ -5830,6 +5840,20 @@ input NamedEntityFilterInput { """ id: IDFilterInput + """ + Used to filter on the `internal_details` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_details: WidgetInternalDetailsFilterInput + + """ + Used to filter on the `internal_name` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_name: StringFilterInput + """ Used to filter on the `inventor` field. @@ -6076,6 +6100,16 @@ type NamedEntityGroupedBy { """ fees: MoneyGroupedBy + """ + The `internal_details` field value for this group. + """ + internal_details: WidgetInternalDetailsGroupedBy + + """ + The `internal_name` field value for this group. + """ + internal_name: String + """ The `inventor` field value for this group. """ @@ -6245,6 +6279,16 @@ type NamedEntityHighlights { """ id: [String!]! + """ + Search highlights for the `internal_details`, providing snippets of the matching text. + """ + internal_details: WidgetInternalDetailsHighlights + + """ + Search highlights for the `internal_name`, providing snippets of the matching text. + """ + internal_name: [String!]! + """ Search highlights for the `inventor`, providing snippets of the matching text. """ @@ -6475,6 +6519,26 @@ enum NamedEntitySortOrderInput { """ id_DESC + """ + Sorts ascending by the `internal_details.name` field. + """ + internal_details_name_ASC + + """ + Sorts descending by the `internal_details.name` field. + """ + internal_details_name_DESC + + """ + Sorts ascending by the `internal_name` field. + """ + internal_name_ASC + + """ + Sorts descending by the `internal_name` field. + """ + internal_name_DESC + """ Sorts ascending by the `inventor.name` field. """ @@ -12881,6 +12945,16 @@ type WidgetAggregatedValues { """ id: NonNumericAggregatedValues + """ + Computed aggregate values for the `internal_details` field. + """ + internal_details: WidgetInternalDetailsAggregatedValues + + """ + Computed aggregate values for the `internal_name` field. + """ + internal_name: NonNumericAggregatedValues + """ Computed aggregate values for the `inventor` field. """ @@ -13832,6 +13906,20 @@ input WidgetFilterInput { """ id: IDFilterInput + """ + Used to filter on the `internal_details` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_details: WidgetInternalDetailsFilterInput + + """ + Used to filter on the `internal_name` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_name: StringFilterInput + """ Used to filter on the `inventor` field. @@ -14022,6 +14110,16 @@ type WidgetGroupedBy { """ fees: MoneyGroupedBy + """ + The `internal_details` field value for this group. + """ + internal_details: WidgetInternalDetailsGroupedBy + + """ + The `internal_name` field value for this group. + """ + internal_name: String + """ The `inventor` field value for this group. """ @@ -14156,6 +14254,16 @@ type WidgetHighlights { """ id: [String!]! + """ + Search highlights for the `internal_details`, providing snippets of the matching text. + """ + internal_details: WidgetInternalDetailsHighlights + + """ + Search highlights for the `internal_name`, providing snippets of the matching text. + """ + internal_name: [String!]! + """ Search highlights for the `inventor`, providing snippets of the matching text. """ @@ -14212,6 +14320,79 @@ type WidgetHighlights { workspace_name: [String!]! } +""" +Type used to perform aggregation computations on `WidgetInternalDetails` fields. +""" +type WidgetInternalDetailsAggregatedValues { + """ + Computed aggregate values for the `name` field. + """ + name: NonNumericAggregatedValues +} + +""" +Input type used to specify filters on `WidgetInternalDetails` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input WidgetInternalDetailsFilterInput { + """ + 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 `WidgetInternalDetailsFilterInput` 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: [WidgetInternalDetailsFilterInput!] + + """ + 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: [WidgetInternalDetailsFilterInput!] + + """ + 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: WidgetInternalDetailsFilterInput +} + +""" +Type used to specify the `WidgetInternalDetails` fields to group by for aggregations. +""" +type WidgetInternalDetailsGroupedBy { + """ + The `name` field value for this group. + """ + name: String +} + +""" +Type used to request desired `WidgetInternalDetails` search highlight fields. +""" +type WidgetInternalDetailsHighlights { + """ + Search highlights for the `name`, providing snippets of the matching text. + """ + name: [String!]! +} + type WidgetOptionSets { colors: [Color!]! sizes: [Size!]! @@ -14529,6 +14710,16 @@ type WidgetOrAddressAggregatedValues { """ id: NonNumericAggregatedValues + """ + Computed aggregate values for the `internal_details` field. + """ + internal_details: WidgetInternalDetailsAggregatedValues + + """ + Computed aggregate values for the `internal_name` field. + """ + internal_name: NonNumericAggregatedValues + """ Computed aggregate values for the `inventor` field. """ @@ -14884,6 +15075,20 @@ input WidgetOrAddressFilterInput { """ id: IDFilterInput + """ + Used to filter on the `internal_details` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_details: WidgetInternalDetailsFilterInput + + """ + Used to filter on the `internal_name` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_name: StringFilterInput + """ Used to filter on the `inventor` field. @@ -15086,6 +15291,16 @@ type WidgetOrAddressGroupedBy { """ full_address: String + """ + The `internal_details` field value for this group. + """ + internal_details: WidgetInternalDetailsGroupedBy + + """ + The `internal_name` field value for this group. + """ + internal_name: String + """ The `inventor` field value for this group. """ @@ -15230,6 +15445,16 @@ type WidgetOrAddressHighlights { """ id: [String!]! + """ + Search highlights for the `internal_details`, providing snippets of the matching text. + """ + internal_details: WidgetInternalDetailsHighlights + + """ + Search highlights for the `internal_name`, providing snippets of the matching text. + """ + internal_name: [String!]! + """ Search highlights for the `inventor`, providing snippets of the matching text. """ @@ -15440,6 +15665,26 @@ enum WidgetOrAddressSortOrderInput { """ id_DESC + """ + Sorts ascending by the `internal_details.name` field. + """ + internal_details_name_ASC + + """ + Sorts descending by the `internal_details.name` field. + """ + internal_details_name_DESC + + """ + Sorts ascending by the `internal_name` field. + """ + internal_name_ASC + + """ + Sorts descending by the `internal_name` field. + """ + internal_name_DESC + """ Sorts ascending by the `inventor.name` field. """ @@ -15785,6 +16030,26 @@ enum WidgetSortOrderInput { """ id_DESC + """ + Sorts ascending by the `internal_details.name` field. + """ + internal_details_name_ASC + + """ + Sorts descending by the `internal_details.name` field. + """ + internal_details_name_DESC + + """ + Sorts ascending by the `internal_name` field. + """ + internal_name_ASC + + """ + Sorts descending by the `internal_name` field. + """ + internal_name_DESC + """ Sorts ascending by the `inventor.name` field. """ diff --git a/config/schema/artifacts_with_apollo/data_warehouse.yaml b/config/schema/artifacts_with_apollo/data_warehouse.yaml index fae53c1c3..b836f3f74 100644 --- a/config/schema/artifacts_with_apollo/data_warehouse.yaml +++ b/config/schema/artifacts_with_apollo/data_warehouse.yaml @@ -113,6 +113,7 @@ tables: cost_currency_primary_continent STRING, cost_currency_introduced_on DATE, name STRING, + internal_name STRING, name_text STRING, description STRING, created_at TIMESTAMP, @@ -122,6 +123,7 @@ tables: release_dates ARRAY, component_ids ARRAY, options STRUCT, + internal_details STRUCT, the_opts STRUCT, inventor STRUCT, named_inventor STRUCT, diff --git a/config/schema/artifacts_with_apollo/datastore_config.yaml b/config/schema/artifacts_with_apollo/datastore_config.yaml index 8ed565868..aff3dad29 100644 --- a/config/schema/artifacts_with_apollo/datastore_config.yaml +++ b/config/schema/artifacts_with_apollo/datastore_config.yaml @@ -1355,6 +1355,8 @@ index_templates: format: strict_date name: type: keyword + internal_name: + type: keyword name_text: type: text description: @@ -1386,6 +1388,10 @@ index_templates: type: keyword is_draft: type: boolean + internal_details: + properties: + name: + type: keyword the_opts: properties: size: @@ -1463,6 +1469,10 @@ index_templates: required: true _size: enabled: true + _source: + excludes: + - internal_name + - internal_details.* settings: index.mapping.ignore_malformed: false index.mapping.coerce: false diff --git a/config/schema/artifacts_with_apollo/json_schemas.yaml b/config/schema/artifacts_with_apollo/json_schemas.yaml index 0d6bc4410..85524ef68 100644 --- a/config/schema/artifacts_with_apollo/json_schemas.yaml +++ b/config/schema/artifacts_with_apollo/json_schemas.yaml @@ -862,6 +862,12 @@ json_schema_version: 1 - "$ref": "#/$defs/String" - maxLength: 8191 - type: 'null' + internal_name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' name_text: anyOf: - allOf: @@ -902,6 +908,10 @@ json_schema_version: 1 anyOf: - "$ref": "#/$defs/WidgetOptions" - type: 'null' + internal_details: + anyOf: + - "$ref": "#/$defs/WidgetInternalDetails" + - type: 'null' the_options: anyOf: - "$ref": "#/$defs/WidgetOptions" @@ -953,6 +963,7 @@ json_schema_version: 1 - cost_currency_primary_continent - cost_currency_introduced_on - name + - internal_name - name_text - description - created_at @@ -962,6 +973,7 @@ json_schema_version: 1 - release_dates - component_ids - options + - internal_details - the_options - inventor - named_inventor @@ -973,6 +985,21 @@ json_schema_version: 1 - metadata description: For more performant queries on this type, please filter on `workspace_id` if possible. + WidgetInternalDetails: + type: object + properties: + name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' + __typename: + type: string + const: WidgetInternalDetails + default: WidgetInternalDetails + required: + - name WidgetOptions: type: object properties: 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 aaca97ed0..03135fa6b 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 @@ -1162,6 +1162,15 @@ json_schema_version: 1 ElasticGraph: type: String nameInIndex: name + internal_name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' + ElasticGraph: + type: String + nameInIndex: internal_name name_text: anyOf: - allOf: @@ -1229,6 +1238,13 @@ json_schema_version: 1 ElasticGraph: type: WidgetOptions nameInIndex: options + internal_details: + anyOf: + - "$ref": "#/$defs/WidgetInternalDetails" + - type: 'null' + ElasticGraph: + type: WidgetInternalDetails + nameInIndex: internal_details the_options: anyOf: - "$ref": "#/$defs/WidgetOptions" @@ -1307,6 +1323,7 @@ json_schema_version: 1 - cost_currency_primary_continent - cost_currency_introduced_on - name + - internal_name - name_text - description - created_at @@ -1316,6 +1333,7 @@ json_schema_version: 1 - release_dates - component_ids - options + - internal_details - the_options - inventor - named_inventor @@ -1327,6 +1345,24 @@ json_schema_version: 1 - metadata description: For more performant queries on this type, please filter on `workspace_id` if possible. + WidgetInternalDetails: + type: object + properties: + name: + anyOf: + - allOf: + - "$ref": "#/$defs/String" + - maxLength: 8191 + - type: 'null' + ElasticGraph: + type: String + nameInIndex: name + __typename: + type: string + const: WidgetInternalDetails + default: WidgetInternalDetails + required: + - name WidgetOptions: type: object properties: diff --git a/config/schema/artifacts_with_apollo/runtime_metadata.yaml b/config/schema/artifacts_with_apollo/runtime_metadata.yaml index fa616bfb3..d07247d13 100644 --- a/config/schema/artifacts_with_apollo/runtime_metadata.yaml +++ b/config/schema/artifacts_with_apollo/runtime_metadata.yaml @@ -415,6 +415,22 @@ enum_types_by_name: sort_field: direction: desc field_path: id + internal_details_name_ASC: + sort_field: + direction: asc + field_path: internal_details.name + internal_details_name_DESC: + sort_field: + direction: desc + field_path: internal_details.name + internal_name_ASC: + sort_field: + direction: asc + field_path: internal_name + internal_name_DESC: + sort_field: + direction: desc + field_path: internal_name inventor_name_ASC: sort_field: direction: asc @@ -945,6 +961,22 @@ enum_types_by_name: sort_field: direction: desc field_path: id + internal_details_name_ASC: + sort_field: + direction: asc + field_path: internal_details.name + internal_details_name_DESC: + sort_field: + direction: desc + field_path: internal_details.name + internal_name_ASC: + sort_field: + direction: asc + field_path: internal_name + internal_name_DESC: + sort_field: + direction: desc + field_path: internal_name inventor_name_ASC: sort_field: direction: asc @@ -1219,6 +1251,22 @@ enum_types_by_name: sort_field: direction: desc field_path: id + internal_details_name_ASC: + sort_field: + direction: asc + field_path: internal_details.name + internal_details_name_DESC: + sort_field: + direction: desc + field_path: internal_details.name + internal_name_ASC: + sort_field: + direction: asc + field_path: internal_name + internal_name_DESC: + sort_field: + direction: desc + field_path: internal_name inventor_name_ASC: sort_field: direction: asc @@ -2597,6 +2645,10 @@ index_definitions_by_name: source: __self id: source: __self + internal_details.name: + source: __self + internal_name: + source: __self inventor.name: source: __self inventor.nationality: @@ -4144,6 +4196,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -4341,6 +4399,12 @@ object_types_by_name: id: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -4532,6 +4596,12 @@ object_types_by_name: fees: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -4628,6 +4698,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -6316,6 +6392,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -6434,6 +6516,10 @@ object_types_by_name: cardinality: one fees: cardinality: one + internal_details: + cardinality: one + internal_name: + cardinality: one inventor: cardinality: one metadata: @@ -6557,6 +6643,12 @@ object_types_by_name: id: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -6979,6 +7071,12 @@ object_types_by_name: fees: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -7053,6 +7151,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -7089,6 +7193,21 @@ object_types_by_name: workspace_name: resolver: name: get_record_field_value + WidgetInternalDetailsAggregatedValues: + graphql_fields_by_name: + name: + resolver: + name: object_with_lookahead + WidgetInternalDetailsGroupedBy: + graphql_fields_by_name: + name: + resolver: + name: object_with_lookahead + WidgetInternalDetailsHighlights: + graphql_fields_by_name: + name: + resolver: + name: get_record_field_value WidgetOptionSets: graphql_fields_by_name: colors: @@ -7244,6 +7363,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value @@ -7365,6 +7490,12 @@ object_types_by_name: id: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -7538,6 +7669,12 @@ object_types_by_name: full_address: resolver: name: object_with_lookahead + internal_details: + resolver: + name: object_with_lookahead + internal_name: + resolver: + name: object_with_lookahead inventor: resolver: name: object_with_lookahead @@ -7618,6 +7755,12 @@ object_types_by_name: id: resolver: name: get_record_field_value + internal_details: + resolver: + name: get_record_field_value + internal_name: + resolver: + name: get_record_field_value inventor: resolver: name: get_record_field_value diff --git a/config/schema/artifacts_with_apollo/schema.graphql b/config/schema/artifacts_with_apollo/schema.graphql index f320bf359..6afda1772 100644 --- a/config/schema/artifacts_with_apollo/schema.graphql +++ b/config/schema/artifacts_with_apollo/schema.graphql @@ -5741,6 +5741,16 @@ type NamedEntityAggregatedValues { """ id: NonNumericAggregatedValues + """ + Computed aggregate values for the `internal_details` field. + """ + internal_details: WidgetInternalDetailsAggregatedValues + + """ + Computed aggregate values for the `internal_name` field. + """ + internal_name: NonNumericAggregatedValues + """ Computed aggregate values for the `inventor` field. """ @@ -6112,6 +6122,20 @@ input NamedEntityFilterInput { """ id: IDFilterInput + """ + Used to filter on the `internal_details` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_details: WidgetInternalDetailsFilterInput + + """ + Used to filter on the `internal_name` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_name: StringFilterInput + """ Used to filter on the `inventor` field. @@ -6358,6 +6382,16 @@ type NamedEntityGroupedBy { """ fees: MoneyGroupedBy + """ + The `internal_details` field value for this group. + """ + internal_details: WidgetInternalDetailsGroupedBy + + """ + The `internal_name` field value for this group. + """ + internal_name: String + """ The `inventor` field value for this group. """ @@ -6527,6 +6561,16 @@ type NamedEntityHighlights { """ id: [String!]! + """ + Search highlights for the `internal_details`, providing snippets of the matching text. + """ + internal_details: WidgetInternalDetailsHighlights + + """ + Search highlights for the `internal_name`, providing snippets of the matching text. + """ + internal_name: [String!]! + """ Search highlights for the `inventor`, providing snippets of the matching text. """ @@ -6757,6 +6801,26 @@ enum NamedEntitySortOrderInput { """ id_DESC + """ + Sorts ascending by the `internal_details.name` field. + """ + internal_details_name_ASC + + """ + Sorts descending by the `internal_details.name` field. + """ + internal_details_name_DESC + + """ + Sorts ascending by the `internal_name` field. + """ + internal_name_ASC + + """ + Sorts descending by the `internal_name` field. + """ + internal_name_DESC + """ Sorts ascending by the `inventor.name` field. """ @@ -13204,6 +13268,16 @@ type WidgetAggregatedValues { """ id: NonNumericAggregatedValues + """ + Computed aggregate values for the `internal_details` field. + """ + internal_details: WidgetInternalDetailsAggregatedValues + + """ + Computed aggregate values for the `internal_name` field. + """ + internal_name: NonNumericAggregatedValues + """ Computed aggregate values for the `inventor` field. """ @@ -14155,6 +14229,20 @@ input WidgetFilterInput { """ id: IDFilterInput + """ + Used to filter on the `internal_details` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_details: WidgetInternalDetailsFilterInput + + """ + Used to filter on the `internal_name` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_name: StringFilterInput + """ Used to filter on the `inventor` field. @@ -14345,6 +14433,16 @@ type WidgetGroupedBy { """ fees: MoneyGroupedBy + """ + The `internal_details` field value for this group. + """ + internal_details: WidgetInternalDetailsGroupedBy + + """ + The `internal_name` field value for this group. + """ + internal_name: String + """ The `inventor` field value for this group. """ @@ -14479,6 +14577,16 @@ type WidgetHighlights { """ id: [String!]! + """ + Search highlights for the `internal_details`, providing snippets of the matching text. + """ + internal_details: WidgetInternalDetailsHighlights + + """ + Search highlights for the `internal_name`, providing snippets of the matching text. + """ + internal_name: [String!]! + """ Search highlights for the `inventor`, providing snippets of the matching text. """ @@ -14535,6 +14643,79 @@ type WidgetHighlights { workspace_name: [String!]! } +""" +Type used to perform aggregation computations on `WidgetInternalDetails` fields. +""" +type WidgetInternalDetailsAggregatedValues { + """ + Computed aggregate values for the `name` field. + """ + name: NonNumericAggregatedValues +} + +""" +Input type used to specify filters on `WidgetInternalDetails` fields. + +Will match all documents if passed as an empty object (or as `null`). +""" +input WidgetInternalDetailsFilterInput { + """ + 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 `WidgetInternalDetailsFilterInput` 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: [WidgetInternalDetailsFilterInput!] + + """ + 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: [WidgetInternalDetailsFilterInput!] + + """ + 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: WidgetInternalDetailsFilterInput +} + +""" +Type used to specify the `WidgetInternalDetails` fields to group by for aggregations. +""" +type WidgetInternalDetailsGroupedBy { + """ + The `name` field value for this group. + """ + name: String +} + +""" +Type used to request desired `WidgetInternalDetails` search highlight fields. +""" +type WidgetInternalDetailsHighlights { + """ + Search highlights for the `name`, providing snippets of the matching text. + """ + name: [String!]! +} + type WidgetOptionSets { colors: [Color!]! sizes: [Size!]! @@ -14852,6 +15033,16 @@ type WidgetOrAddressAggregatedValues { """ id: NonNumericAggregatedValues + """ + Computed aggregate values for the `internal_details` field. + """ + internal_details: WidgetInternalDetailsAggregatedValues + + """ + Computed aggregate values for the `internal_name` field. + """ + internal_name: NonNumericAggregatedValues + """ Computed aggregate values for the `inventor` field. """ @@ -15207,6 +15398,20 @@ input WidgetOrAddressFilterInput { """ id: IDFilterInput + """ + Used to filter on the `internal_details` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_details: WidgetInternalDetailsFilterInput + + """ + Used to filter on the `internal_name` field. + + When `null` or an empty object is passed, matches all documents. + """ + internal_name: StringFilterInput + """ Used to filter on the `inventor` field. @@ -15409,6 +15614,16 @@ type WidgetOrAddressGroupedBy { """ full_address: String + """ + The `internal_details` field value for this group. + """ + internal_details: WidgetInternalDetailsGroupedBy + + """ + The `internal_name` field value for this group. + """ + internal_name: String + """ The `inventor` field value for this group. """ @@ -15553,6 +15768,16 @@ type WidgetOrAddressHighlights { """ id: [String!]! + """ + Search highlights for the `internal_details`, providing snippets of the matching text. + """ + internal_details: WidgetInternalDetailsHighlights + + """ + Search highlights for the `internal_name`, providing snippets of the matching text. + """ + internal_name: [String!]! + """ Search highlights for the `inventor`, providing snippets of the matching text. """ @@ -15763,6 +15988,26 @@ enum WidgetOrAddressSortOrderInput { """ id_DESC + """ + Sorts ascending by the `internal_details.name` field. + """ + internal_details_name_ASC + + """ + Sorts descending by the `internal_details.name` field. + """ + internal_details_name_DESC + + """ + Sorts ascending by the `internal_name` field. + """ + internal_name_ASC + + """ + Sorts descending by the `internal_name` field. + """ + internal_name_DESC + """ Sorts ascending by the `inventor.name` field. """ @@ -16108,6 +16353,26 @@ enum WidgetSortOrderInput { """ id_DESC + """ + Sorts ascending by the `internal_details.name` field. + """ + internal_details_name_ASC + + """ + Sorts descending by the `internal_details.name` field. + """ + internal_details_name_DESC + + """ + Sorts ascending by the `internal_name` field. + """ + internal_name_ASC + + """ + Sorts descending by the `internal_name` field. + """ + internal_name_DESC + """ Sorts ascending by the `inventor.name` field. """ diff --git a/config/schema/widgets.rb b/config/schema/widgets.rb index 7df5223fc..caa986a01 100644 --- a/config/schema/widgets.rb +++ b/config/schema/widgets.rb @@ -29,6 +29,10 @@ t.field "is_draft", "Boolean" end + schema.object_type "WidgetInternalDetails" do |t| + t.field "name", "String" + end + schema.object_type "Person" do |t| t.implements "NamedInventor" t.field "name", "String" @@ -91,6 +95,7 @@ t.field "cost_currency_primary_continent", "String" t.field "cost_currency_introduced_on", "Date" t.field "name", "String" + t.field "internal_name", "String", returnable: false t.field "name_text", "String" do |f| f.mapping type: "text" end @@ -107,6 +112,7 @@ t.field "release_dates", "[Date!]!", singular: "release_date" t.relates_to_many "components", "Component", via: "component_ids", dir: :out, singular: "component" t.field "options", "WidgetOptions" + t.field "internal_details", "WidgetInternalDetails", returnable: false # Demonstrate using `name_in_index` with a graphql-only embedded field. t.field "size", "Size", name_in_index: "options.size", graphql_only: true diff --git a/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb b/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb index 82b9ee7a2..09a94b95b 100644 --- a/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb +++ b/elasticgraph-graphql/spec/acceptance/hidden_types_spec.rb @@ -106,6 +106,7 @@ module ElasticGraph type_filter_and_non_indexed_aggregation_types_for("TeamSeason", include_list_filter: true, include_fields_list_filter: true) - ["TeamSeasonListElementFilterInput"] + type_filter_and_non_indexed_aggregation_types_for("WidgetOptions") + type_filter_and_non_indexed_aggregation_types_for("WidgetOptionSets") - ["WidgetOptionSetsGroupedBy"] + + type_filter_and_non_indexed_aggregation_types_for("WidgetInternalDetails") - ["WidgetInternalDetails"] + type_filter_and_non_indexed_aggregation_types_for("WidgetCurrencyNestedFields", include_highlights: false) + type_filter_and_non_indexed_aggregation_types_for("WorkspaceWidget") + type_filter_and_non_indexed_aggregation_types_for("Sponsorship", include_list_filter: true, include_fields_list_filter: true) - ["SponsorshipListElementFilterInput"] + diff --git a/elasticgraph-schema_definition/spec/integration/elastic_graph/schema_definition/rake_tasks_spec.rb b/elasticgraph-schema_definition/spec/integration/elastic_graph/schema_definition/rake_tasks_spec.rb index 8466e2e61..57beb73a0 100644 --- a/elasticgraph-schema_definition/spec/integration/elastic_graph/schema_definition/rake_tasks_spec.rb +++ b/elasticgraph-schema_definition/spec/integration/elastic_graph/schema_definition/rake_tasks_spec.rb @@ -385,6 +385,7 @@ module SchemaDefinition LocalTimeGroupingOffsetInput LocalTimeGroupingTruncationUnitInput LocalTimeUnitInput NonNumericAggregatedValues TextFilterInput MatchesQueryFilterInput MatchesQueryAllowedEditsPerTermInput MatchesPhraseFilterInput MatchesQueryWithPrefixFilterInput + WidgetInternalDetailsAggregatedValues WidgetInternalDetailsFilterInput WidgetInternalDetailsGroupedBy WidgetInternalDetailsHighlights ] expect(filtered_types).to match_array(allowed_list) 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 f618add28..e68b85255 100644 --- a/spec_support/lib/elastic_graph/spec_support/factories/widgets.rb +++ b/spec_support/lib/elastic_graph/spec_support/factories/widgets.rb @@ -38,6 +38,11 @@ is_draft { false } end + factory :widget_internal_details, parent: :hash_base do + __typename { "WidgetInternalDetails" } + name { Faker::Device.model_name } + end + factory :person, parent: :hash_base do __typename { "Person" } name { Faker::Name.name } @@ -91,6 +96,7 @@ cost_currency_introduced_on { cost&.fetch(:currency)&.then { |code| currencies_by_code.dig(code, :introduced_on) } } cost_currency_symbol { cost&.fetch(:currency)&.then { |code| currencies_by_code.dig(code, :symbol) } } name { Faker::Device.model_name } + internal_name { "#{name} secret" } name_text { name } description { "this is #{Faker::Device.model_name}" } created_at { Faker::Time.between(from: recent_date - 30, to: recent_date).utc.iso8601 } @@ -99,6 +105,7 @@ release_timestamps { Array.new(Faker::Number.between(from: 0, to: 4)) { Faker::Time.between(from: recent_date - 30, to: recent_date).utc.iso8601 } } release_dates { release_timestamps.map { |ts| ::Time.iso8601(ts).to_date.iso8601 } } options { build :widget_options } + internal_details { build :widget_internal_details } the_options { options } component_ids do