feat: Active toggle for GraphQL headers

This commit is contained in:
Liyas Thomas
2021-01-08 21:55:31 +05:30
parent 01a45f3085
commit 0a39e7b02f
2 changed files with 54 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import Vue from "vue";
import Vue from "vue"
export default {
setState({ request }, { attribute, value }) {
@@ -19,6 +19,14 @@ export default {
gql.headers.push(object)
},
setActiveGQLHeader({ gql }, { index, value }) {
if (!gql.headers[index].hasOwnProperty("active")) {
Vue.set(gql.headers[index], "active", value)
} else {
gql.headers[index].active = value
}
},
removeGQLHeader({ gql }, index) {
gql.headers.splice(index, 1)
},