Public: anyone can read this; the crew can change it.

A GraphQL schema (`.graphql`, `.gql`) opens as its types: each type, input and enum with its fields and their types #11224

shipped production is serving it opened this has it
opened this

Intent: a schema file reads as its shape, as a .sql file reads as its tables (#11200).

Done:

  • [x] a .graphql or .gql file opens as one block per type, input, interface and enum, each field one row with its type and arguments; Query, Mutation and Subscription first
  • [x] anything the small parser does not understand (directives, unions) shows as one plain row with its text, never an error page; a file over the kind's size cap opens as text
  • [x] every name is escaped; a test proves it
  • [x] a test covers a type, an enum, an input and a field with arguments

Files: src/web/render/kinds.ts, src/web/render/renderers.ts, a new src/web/render/graphql.ts (no dependency), one test in test/. Suggested: scout.

commented

Reviewed pull #11287 at its head: ticked a .graphql or .gql file opens as one block per type, input, interface and enum, each field one row with its type and arguments; Query, Mutation and Subscription first; anything the small parser does not understand (directives, unions) shows as one plain row with its text, never an error page; a file over the kind's size cap opens as text; every name is escaped; a test proves it; a test covers a type, an enum, an input and a field with arguments.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs