graphql /graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)

★ 8,818⑂ 716👁 80⑃ 562● 866▤ 65
TypeScriptMITCreated 2017-01-25
TA的项目
下载:1.8.101.8.10 ↓1.8.102019-02-23
+0
日增长
8,818
stars
716
forks
80
watchers
562
prs
866
issues
65
releases

README

2026-04: This repository is now archived and future GraphQL IDE developments will happen in GraphiQL.
 

--- 






 SECURITY WARNING: both graphql-playground-html and all four (4) of it's middleware dependents until [email protected] were subject to an  XSS Reflection attack vulnerability only to unsanitized user input strings to the functions therein. This was resolved in graphql-playground-html@^1.6.22. More Information CVE-2020-4038


Future of this repository: See this issue for details.

---

GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration). 

!

 Installation

sh
$ brew install --cask graphql-playground


 Features

- ✨ Context-aware autocompletion & error highlighting
- 📚 Interactive, multi-column docs (keyboard support)
- ⚡️ Supports real-time GraphQL Subscriptions
- ⚙ GraphQL Config support with multiple Projects & Endpoints
- 🚥 Apollo Tracing support

 Security Details
 NOTE: only _unsanitized user input_ to the functions in these packages is vulnerable to the recently reported XSS Reflection attack.

 Impact

 Impacted are any and all unsanitized user-defined input to:
-renderPlaygroundPage()
-koaPlayground()
-expressPlayground()
-koaPlayground()
-lambdaPlayground()

  If you used static values, such as graphql-playground-electron does in it's webpack config, as well as the most common middleware implementations out there, they were not vulnerable to the attack.

The only reason this vulnerability exists is because we are using template strings in renderPlaygroundPage() with potentially unsanitized user defined variables. This allows an attacker to inject html and javascript into the page. 
- Read more about preventing XSS in react

Common examples may be user-defined path parameters, query string, unsanitized UI provided values in database, etc., that are used to build template strings or passed directly to a renderPlaygroundPage() or the matching middleware function equivalent listed above.

 Impacted Packages

All versions of these packages are impacted until the ones specified below, which are now safe for user defined input:

- graphql-playground-html: ☔ safe @ 1.6.22
- graphql-playground-express ☔ safe @ 1.7.16
- graphql-playground-koa ☔ safe @ 1.6.15
- graphql-playground-hapi ☔ safe @ 1.6.13
- graphql-playground-lambda ☔ safe @ 1.7.17
- graphql-playground-electron has always been ☔ safe from XSS attacks! This is because configuration is statically defined it's webpack config
- graphql-playground-react is safe because it does not use renderPlaygroundPage() anywhere, and thus is not susceptible to template string XSS reflection attacks.

 More Information

See the security docs for more details on how your implementation might be impacted by this vulnerability. It contains safe examples, unsafe examples, workarounds, and more details.

We've also provided 'an example of the xss using the express middleware

 FAQ

 How is this different from GraphiQL?

GraphQL Play

Top issues

Discussions

Latest release

1.8.10 v1.8.10 2019-02-23
1.8.10

This release was mostly focused on fixing small bugs.

 Fixes
 956 Thanks @lekterable fixing overflow in project sidenav
 957 Thanks @yoshiakis  for fixing subscription display in the light theme
 960 Thanks @mmmeff for fixing an issue with license
 961 Thanks @dncrews for fixing express middleware
 968 Thanks @yoshiakis for fixing docs overflowing
 969 Thanks @lekterable for adding hide option to electron app

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON