Skip to content

Commit

Permalink
Add GraphQL Playground Static Files (#256)
Browse files Browse the repository at this point in the history
* Added static files for custom graphql explorer build
* Add .nojekyll empty file that tells github pages to not build with jekyll
* Enabling github pages after in order to ensure playground graphql files are served with correct content-type headers.
  • Loading branch information
aglensmith authored Dec 15, 2019
1 parent fcdf8be commit 7b51ad4
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
2 changes: 2 additions & 0 deletions assets/css/graphql/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions assets/html/graphql/playground.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>

<head>
<meta charset=utf-8/>
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
<title>GraphQL Playground</title>
<link rel="stylesheet" href="index.css" />
<link rel="shortcut icon" href="favicon.png" />
<script src="middleware.js"></script>
</head>

<body>
<div id="root">
<style>
body {
background-color: rgb(23, 42, 58);
font-family: Open Sans, sans-serif;
height: 90vh;
}

#root {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}

.loading {
font-size: 32px;
font-weight: 200;
color: rgba(255, 255, 255, .6);
margin-left: 20px;
}

img {
width: 78px;
height: 78px;
}

.title {
font-weight: 400;
}
</style>
<img src='logo.png' alt=''>
<div class="loading"> Loading
<span class="title">GraphQL Playground</span>
</div>
</div>
<script>window.addEventListener('load', function (event) {
GraphQLPlayground.init(document.getElementById('root'), {
endpoint: 'https://api.graph.cool/simple/v1/swapi'
})
})</script>
</body>

</html>
Binary file added assets/images/graphql/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/graphql/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/js/graphql/middleware.js

Large diffs are not rendered by default.

0 comments on commit 7b51ad4

Please sign in to comment.