Skip to content

v6: Add ResponseTableView#4336

Draft
trevor-scheer wants to merge 2 commits into
graphiql-6from
trevor/pr-34
Draft

v6: Add ResponseTableView#4336
trevor-scheer wants to merge 2 commits into
graphiql-6from
trevor/pr-34

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

Summary

Adds ResponseTableView, the Table view for the response pane. When the user switches to Table, it walks the response body looking for the first list of objects and renders it as an HTML table with sticky headers. Nested objects and arrays in cells are shown as Object {n} / Array [n] shorthand to keep rows scannable. Responses that contain no list field show a clear empty state rather than a blank panel.

Test plan

  • Switch to Table view after running a list query and verify rows and column headers appear
  • Switch to Table view for a non-list response (e.g. a single object or scalar) and verify the empty-state message is shown
  • Check that nested object/array cells display Object {n} / Array [n] shorthand
  • Confirm ragged rows (objects with different keys) union columns correctly; missing cells render a placeholder character
  • Verify sticky column headers stay fixed when scrolling a long result set
  • Review Storybook stories: ListOfObjects, RaggedRows, NestedObjects, NestedList, PrimitiveArray, EmptyArray, NoListField, NoResponse

Refs: #4219

Renders the first list field in a GraphQL response as a table.
Object/array cells render with shorthand summaries (`Object {n}`,
`Array [n]`); non-list responses show an empty state.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 6, 2026

🦋 Changeset detected

Latest commit: c1376d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@graphiql/react Minor
@graphiql/plugin-code-exporter Major
@graphiql/plugin-doc-explorer Major
@graphiql/plugin-explorer Major
@graphiql/plugin-history Major
graphiql Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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