graphiql_playground.html.eex (1990B)
1 <!-- 2 The request to this GraphQL server provided the header "Accept: text/html" 3 and as a result has been presented GraphiQL - an in-browser IDE for 4 exploring GraphQL. 5 If you wish to receive JSON, provide the header "Accept: application/json" or 6 add "&raw" to the end of the URL within a browser. 7 --> 8 <!DOCTYPE html> 9 <html lang="en"> 10 <head> 11 <meta charset="utf-8"> 12 <meta name="viewport" content="width=device-width, initial-scale=1"> 13 14 <title>GraphiQL Playground</title> 15 16 <link href="<%= assets["typeface-open-sans/index.css"] %>" rel="stylesheet"> 17 <link href="<%= assets["typeface-source-code-pro/index.css"] %>" rel="stylesheet"> 18 <link rel="stylesheet" media="screen" href="<%= assets["@absinthe/graphql-playground/playground.css"] %>"> 19 </head> 20 <body> 21 <div id="root"> 22 <style> 23 body { 24 background-color: #172a3a; 25 font-family: Open Sans, sans-serif; 26 height: 90vh 27 } 28 29 #root { 30 height: 100%; 31 width: 100%; 32 display: flex; 33 align-items: center; 34 justify-content: center 35 } 36 37 .loading { 38 font-size: 32px; 39 font-weight: 200; 40 color: rgba(255, 255, 255, .6); 41 margin-left: 20px 42 } 43 44 img { 45 width: 78px; 46 height: 78px 47 } 48 49 .title { 50 font-weight: 400 51 } 52 </style> 53 <div class="loading">Loading 54 <span class="title">GraphQL Playground</span> 55 </div> 56 </div> 57 <script> 58 var options = {}; 59 var protocol = window.location.protocol === "https:" ? "wss:" : "ws:"; 60 61 <%= if default_url do %> 62 options.endpoint = <%= default_url %>; 63 <% end %> 64 65 <%= if socket_url do %> 66 options.subscriptionEndpoint = <%= socket_url %>; 67 <% end %> 68 69 window.addEventListener("load", function (n) { GraphQLPlayground.init(document.getElementById("root"), options) }) 70 </script> 71 <script type="text/javascript" src="<%= assets["@absinthe/graphql-playground/playground.js"] %>"></script> 72 </body> 73 </html>