Skip to content

feat(execution): add execution outcome metadata - #2007

Open
simPod wants to merge 1 commit into
masterfrom
feat/http-execution-results
Open

simPod wants to merge 1 commit into
masterfrom
feat/http-execution-results

Conversation

@simPod

@simPod simPod commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

A validation failure and a completed operation whose non-null field error makes the whole result null both currently produce data = null plus errors. HTTP handling must distinguish them: the first is a request error with no data entry; the second is an execution result with an explicit data: null entry.

Add ExecutionResult::$executed so HTTP response handling can choose the correct response body and status without guessing from errors. This PR alone changes neither result serialization nor HTTP responses. Keep the executor change separate so it can be reviewed independently of HTTP handling.

This is the first HTTP change. Response negotiation, status mapping, and strict request parsing follow separately.

Stack: #2007 → #2008 → #2009 → #2010.

Changelog

  • Add execution outcome metadata to distinguish request errors from completed execution.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The tests do not assert executed === true after asynchronous null propagation when resolver promises reject or resolve to null, leaving the explicit override unverified.

1 open issue
What changed in this PR

Adds execution outcome metadata so later HTTP handling can distinguish request failures from completed execution with null data. This PR leaves result serialization and HTTP responses unchanged.

Changes:

  • Adds ExecutionResult::$executed, initialized from whether data is non-null.
  • Marks reference-executor results as executed, including null results.
  • Documents the property and tests default, successful, and synchronous null-result outcomes.
File Description
tests/​GraphQLTest.php Tests execution metadata and preserves null-result serialization behavior.
tests/​Executor/​ExecutionResultTest.php Verifies an empty result defaults to not executed.
src/​Executor/​ReferenceExecutor.php Marks completed execution results as executed.
src/​Executor/​ExecutionResult.php Adds and initializes the public outcome flag.
docs/​class-reference.md Documents the new public property.

Review effort: Balanced

Comment thread src/Executor/ReferenceExecutor.php Resolved
@simPod
simPod force-pushed the feat/http-execution-results branch from 286cb78 to 397e22f Compare November 14, 2026 21:02
@simPod
simPod requested a balanced review from Copilot November 14, 2026 21:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The execution outcome metadata change has no active review issues.

1 open issue

Review effort: Balanced

@simPod
simPod requested a review from spawnia November 15, 2026 08:22
@simPod
simPod added this pull request to stack #2011 November 15, 2026 08:23
@simPod
simPod marked this pull request as ready for review November 15, 2026 08:30
@spawnia
spawnia deleted the branch ci/refresh-benchmark-apt-index November 18, 2026 11:22
@spawnia spawnia closed this Nov 18, 2026
@simPod simPod reopened this Nov 18, 2026
@simPod
simPod removed this pull request from stack #2011 November 18, 2026 11:26
@simPod
simPod changed the base branch from ci/refresh-benchmark-apt-index to master November 18, 2026 11:26
@simPod
simPod force-pushed the feat/http-execution-results branch from 397e22f to 860bafd Compare November 18, 2026 11:26
@simPod
simPod added this pull request to stack #2016 November 18, 2026 11:27

This branch has not been deployed

No deployments
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.

3 participants