-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from tlvenn/v1.2
Add advanced GraphiQL interface
- Loading branch information
Showing
2 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
The request to this GraphQL server provided the header "Accept: text/html" | ||
and as a result has been presented GraphiQL - an in-browser IDE for | ||
exploring GraphQL. | ||
If you wish to receive JSON, provide the header "Accept: application/json" or | ||
add "&raw" to the end of the URL within a browser. | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title>GraphiQl</title> | ||
|
||
<script src="//use.typekit.net/pea2oar.js"></script> | ||
<script>try{Typekit.load({ async: true });}catch(e){}</script> | ||
|
||
<link href="//cdn.jsdelivr.net/graphql-toolbox/<%= graphql_toolbox_version %>/graphiql.min.css" rel="stylesheet" /> | ||
<!-- for now, need to provide explicit font-face for Glyphicons until the issue is fixed on graphql-toolbox side --> | ||
<style> | ||
@font-face { | ||
font-family: 'Glyphicons Halflings'; | ||
src: url(//cdn.jsdelivr.net/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot); | ||
src: url(//cdn.jsdelivr.net/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot) format("embedded-opentype"), url(//cdn.jsdelivr.net/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2) format("woff2"), url(//cdn.jsdelivr.net/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff) format("woff"), url(//cdn.jsdelivr.net/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf) format("truetype"), url(//cdn.jsdelivr.net/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.svg) format("svg"); | ||
} | ||
</style> | ||
|
||
<script src="//cdn.jsdelivr.net/graphql-toolbox/<%= graphql_toolbox_version %>/graphiql.min.js"></script> | ||
</head> | ||
<body> | ||
<div id="graphiql-tool"></div> | ||
|
||
<script type="text/javascript"> | ||
graphiql.bootstrap({ | ||
defaultUrl: window.location.origin + window.location.pathname, | ||
defaultQuery: '<%= query_string %>', | ||
defaultVariables: '<%= variables_string %>' | ||
}); | ||
</script> | ||
</body> | ||
</html> |