[GAP-10] Apply various improvements/clarifications to @mock spec#46
Open
rebello95 wants to merge 4 commits into
Open
[GAP-10] Apply various improvements/clarifications to @mock spec#46rebello95 wants to merge 4 commits into
@mock spec#46rebello95 wants to merge 4 commits into
Conversation
…ILL.md` - Fix `ValidateNoNestedMocks` logic (AND -> OR) so mocked state propagates to children - Add clarifying note that "No Empty Operation Root" doesn't apply to operation-level `@mock` - Revert auto-numbered steps back to `1.` in `TransformOperation` formal spec - Fix SKILL.md error example to include variant id wrapper and required `__path__` - Add `__` prefix constraint to SKILL.md mock variant id instructions - Retitle inline fragment FAQ section to clarify it explains why the feature is unsupported
- Clarify that mocked fields must be defined locally, not just "not exist" - Remove "fields not defined in schema are skipped" — validation always uses local schema - Add non-normative note that validation timing is implementation-defined - Remove "Future Proposal" section (conflicts with Order Instability rationale) - Remove "New types are unreachable" section from inline fragment FAQ - Fix schema language in README to use "defined locally but not yet deployed"
- Clarify error merging: client must append errors array, mock author owns `path`/`location` - Condense "Why isn't array position supported?" from verbose examples to concise numbered list - Retitle FAQ sections as questions - Add `<summary>` to details disclosure - Remove informal tone (emoji, `:)`, "send a PR")
1be304c to
1842a2e
Compare
@mock RFC@mock spec
rebello95
commented
May 29, 2026
| This is valid for both operation-level and field-level `@mock` directives. | ||
|
|
||
| The client must merge {"errors"} into the GraphQL server's response if present. | ||
| The client must append the contents of {"errors"} to the response's {"errors"} |
Contributor
Author
There was a problem hiding this comment.
Open question: I think we probably want the implementer to inject the proper "path" value for each error object at runtime based on the context in which the mock is being used. The alternative would be to have the mock file include the full path in each error, which I think could be odd for fields mocked within fragments. Thoughts?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes spec inconsistencies, tightens language, and cleans up the README FAQ for GAP-10 based on discussions from last week's Working Group Day and this Discord thread.
DRAFT.md
ValidateNoNestedMockslogic:isChildrenMockedused AND when it should use OR, preventing the mocked state from propagating to children@mockis on the operation definition itselfSKILL.md
__path__field (was invalid per the DRAFT's mock file structure)__prefix constraint to mock variant id creation instructionsREADME.md
@mockvalues (contradicts the Order Instability rationale in the same FAQ)Please review
@magicmark