🎉 Added variables to graphql page (w/ lame type validation).
This commit is contained in:
@@ -23,6 +23,22 @@ export default {
|
||||
gql.headers[index].value = value;
|
||||
},
|
||||
|
||||
addGQLVariable({ gql }, object) {
|
||||
gql.variables.push(object);
|
||||
},
|
||||
|
||||
removeGQLVariable({ gql }, index) {
|
||||
gql.variables.splice(index, 1);
|
||||
},
|
||||
|
||||
setGQLVariableKey({ gql }, { index, value }) {
|
||||
gql.variables[index].key = value;
|
||||
},
|
||||
|
||||
setGQLVariableValue({ gql }, { index, value }) {
|
||||
gql.variables[index].value = value;
|
||||
},
|
||||
|
||||
addHeaders({ request }, value) {
|
||||
request.headers.push(value);
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ export default () => ({
|
||||
gql: {
|
||||
url: "https://rickandmortyapi.com/graphql",
|
||||
headers: [],
|
||||
variables: [],
|
||||
query: ""
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user