JSFiddle - React, Tailwind, and code Playground
by brigand
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1 id="testq">{students{id firstName college {id name location rating}}}</h1>
</body>
<script type="module">
import prettier from "https://unpkg.com/[email protected]/esm/standalone.mjs";
import parserGraphql from "https://unpkg.com/[email protected]/esm/parser-graphql.mjs";
const r = prettier.format("type Query { hello: String }", {
parser: "graphql",
plugins: [parserGraphql],
getElementById:"testq",
});
console.log(r);
</script>
</html>