M core/templates.go => core/templates.go +1 -0
@@ 36,6 36,7 @@ func AddGlobalTmpl(c echo.Context) gobwebs.Map {
pd.Data["about"] = lt.Translate("About")
pd.Data["log_in"] = lt.Translate("Log in")
pd.Data["log_out"] = lt.Translate("Log out")
+ pd.Data["graphql_playground"] = lt.Translate("GQL Playground")
pd.Data["settings"] = lt.Translate("Settings")
pd.Data["save_link"] = lt.Translate("Save Link")
pd.Data["save_note"] = lt.Translate("Save Note")
M templates/base.html => templates/base.html +8 -0
@@ 184,6 184,14 @@
</a>
</li>
{{end}}
+ <li>
+ <a class="menu-item" href="{{reverse "graphql:gql_playground"}}">
+ <svg class="menu-item__icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
+ <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z" />
+ </svg>
+ <span>{{.base_pd.Data.graphql_playground}}</span>
+ </a>
+ </li>
<li>
<a class="menu-item" href="{{reverse "accounts:logout"}}">
<svg class="menu-item__icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
M templates/graphql.html => templates/graphql.html +1 -1
@@ 13,7 13,7 @@
</section>
<section class="card shadow-card graph-schema">
- <form id="gql-playground-form" action="{{reverse "core:gql_playground_post" }}" method="POST" enctype="multipart/form-data">
+ <form id="gql-playground-form" action="{{reverse "graphql:gql_playground_post" }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="csrf" value="{{ .CSRF }}">
<noscript class="alert alert-info d-block">
<div class="alert alert-error" role="alert">