Skip to content

test: add tests for nested fragment spread unmarshal (issue #291)#302

Open
Yamashou wants to merge 1 commit intobase-fragmentfrom
test/nested-fragment-spread-291
Open

test: add tests for nested fragment spread unmarshal (issue #291)#302
Yamashou wants to merge 1 commit intobase-fragmentfrom
test/nested-fragment-spread-291

Conversation

@Yamashou
Copy link
Copy Markdown
Member

@Yamashou Yamashou commented Apr 3, 2026

Summary

  • Add 4 skipped decoder tests (graphqljson/graphql_test.go) documenting the unmarshal failure when fragment definitions contain fragment spreads
    • Simple nested fragment spread (scalar fields only)
    • Multiple fragment spreads with overlapping fields
    • Nested object field merge (different struct types)
    • Multi-level nesting (FragA → FragB → FragC)
  • Add generator integration test data (generator/testdata/nested_fragment_spread/) recording current (broken) generated code

These tests establish the baseline for the fix in subsequent PRs.

Closes partially: #291

Test plan

  • All existing tests pass
  • New graphqljson tests are t.Skip-ed (will be unskipped when fix lands)
  • Generator test records current expected output

🤖 Generated with Claude Code

Add skipped decoder tests and generator integration test data to
document the current broken behavior when fragment definitions
contain fragment spreads.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant