Hooked the new variable editor to the persistent store

This commit is contained in:
Andrew Bastin
2020-01-29 20:35:54 -05:00
parent 5d2ba22988
commit 94c2440832
2 changed files with 9 additions and 2 deletions

View File

@@ -364,7 +364,6 @@ export default {
data() {
return {
schemaString: "",
variableString: "{}",
commonHeaders: [
"WWW-Authenticate",
"Authorization",
@@ -527,6 +526,14 @@ export default {
this.$store.commit("setGQLState", { value, attribute: "query" });
}
},
variableString: {
get() {
return this.$store.state.gql.variablesJSONString;
},
set(value) {
this.$store.commit("setGQLState", { value, attribute: "variablesJSONString" });
}
},
headerString() {
const result = this.headers
.filter(({ key }) => !!key)

View File

@@ -20,7 +20,7 @@ export default () => ({
gql: {
url: "https://rickandmortyapi.com/graphql",
headers: [],
variables: [],
variablesJSONString: "",
query: ""
},
oauth2: {