Skip to content

Phase 3: Wire up grouping_missing_value_placeholder in GraphQL layer - #894

Merged
myronmarston merged 1 commit into
mainfrom
mattmarston/phase-3-graphql-wiring
Oct 31, 2025
Merged

Phase 3: Wire up grouping_missing_value_placeholder in GraphQL layer#894
myronmarston merged 1 commit into
mainfrom
mattmarston/phase-3-graphql-wiring

Conversation

@mmarston

@mmarston mmarston commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

This is 3rd in a series of new pull requests that are working toward a new approach to handling missing values in subaggregations as described in #882. For an outline of the steps see the comment from @myronmarston here. For context see the first PR in the sequence,
#890. The 2nd PR is #1 (I need to move these PRs to block/elasticgraph).

This replaces the Phase 3, mattmarston/elasticgraph#2 PR that was in my forked repo. This PR addresses the comments there.

This commit makes the grouping_missing_value_placeholder attribute available from ElasticGraph::GraphQL::Schema::Type by wiring it through from runtime metadata for both scalar and enum types.

Changes:

  • Add scalar_runtime_metadata as required positional parameter to Type.initialize
  • Add grouping_missing_value_placeholder method to Type that checks both scalar and enum runtime metadata
  • Update GraphQL::Schema to pass scalar runtime metadata when creating Type instances
  • Add tests for the new functionality

Other PRs

Phase 1: Add grouping_missing_value_placeholder runtime metadata
Phase 2: Infer grouping_missing_value_placeholder based on mapping_type
Phase 3: Wire up grouping_missing_value_placeholder in GraphQL layer (this PR)
Phase 4: Use grouping_missing_value_placeholder in aggregation logic

Comment thread elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb Outdated
Comment thread elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb Outdated
Comment thread elasticgraph-graphql/lib/elastic_graph/graphql/schema/type.rb Outdated
Comment thread elasticgraph-graphql/sig/elastic_graph/graphql/schema/type.rbs Outdated
@mmarston
mmarston force-pushed the mattmarston/phase-2-schema-definition branch from b38b7ef to 50d7a79 Compare October 31, 2025 15:16
Base automatically changed from mattmarston/phase-2-schema-definition to main October 31, 2025 16:26
@mmarston
mmarston force-pushed the mattmarston/phase-3-graphql-wiring branch from 4319ee7 to 61eeb79 Compare October 31, 2025 16:39
This commit makes the grouping_missing_value_placeholder attribute available
from ElasticGraph::GraphQL::Schema::Type by wiring it through from runtime
metadata for both scalar and enum types.

Changes:
- Add scalar_runtime_metadata as required positional parameter to Type.initialize
- Add grouping_missing_value_placeholder method to Type that checks both
  scalar and enum runtime metadata
- Update GraphQL::Schema to pass scalar runtime metadata when creating Type instances
- Add tests for the new functionality
@mmarston
mmarston force-pushed the mattmarston/phase-3-graphql-wiring branch from 61eeb79 to f7ece77 Compare October 31, 2025 18:44
@mmarston

Copy link
Copy Markdown
Contributor Author

All comments have been addressed.

@myronmarston
myronmarston merged commit 94a27eb into main Oct 31, 2025
18 checks passed
@myronmarston
myronmarston deleted the mattmarston/phase-3-graphql-wiring branch October 31, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants