Open Bug 1618732 Opened 4 years ago Updated 2 years ago

Format GraphQL requests for operationName/query/variables

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned)

References

(Blocks 3 open bugs)

Details

Attachments

(2 files)

UX Discussion

Draft UI:

▼ GraphQL
---------------------------------------------------------------------
// Syntax-highlighted query section
query heroAndFriends($episode: Episode) {
  hero(episode: $episode) {
    name
    appearsIn
    friends {
      name
    }
  }
}

# Variables

// JSON-inspectable variable data
{
  "episode": "JEDI"
}

---------------------------------------------------------------------
▶ Request Payload
---------------------------------------------------------------------
  • Maybe: Auto-format queries
  • When to show operationName?
  • Syntax highlight using codemirror's graphql
Blocks: 1618733

Just to add to the discussion – this draft patch adds a query and variables view. Detection for GraphQL should be double-checkd and it would even be better when codemirror would have syntax highlight for graphql (which needs to be pulled in as dependency).

Assignee: nobody → hkirschner
Assignee: hkirschner → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: