add deploy.yaml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marko
2022-07-19 15:39:38 +02:00
parent 5302e6ca99
commit b0f7f04ba6
6 changed files with 38 additions and 44 deletions

View File

@@ -1,26 +1,22 @@
var initParameters = {};
var entrypoint = null;
function onEditQuery(newQuery)
{
function onEditQuery(newQuery) {
initParameters.query = newQuery;
updateURL();
}
function onEditVariables(newVariables)
{
function onEditVariables(newVariables) {
initParameters.variables = newVariables;
updateURL();
}
function onEditOperationName(newOperationName)
{
function onEditOperationName(newOperationName) {
initParameters.operationName = newOperationName;
updateURL();
}
function updateURL()
{
function updateURL() {
var newSearch = '?' + Object.keys(initParameters).filter(function (key) {
return Boolean(initParameters[key]);
}).map(function (key) {
@@ -29,8 +25,7 @@ function updateURL()
history.replaceState(null, null, newSearch);
}
function graphQLFetcher(graphQLParams)
{
function graphQLFetcher(graphQLParams) {
return fetch(entrypoint, {
method: 'post',
headers: {
@@ -50,7 +45,7 @@ function graphQLFetcher(graphQLParams)
});
}
window.onload = function () {
window.onload = function() {
var data = JSON.parse(document.getElementById('graphiql-data').innerText);
entrypoint = data.entrypoint;