From 638f3f1a0549038af0da1655b0579b81876d6741 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 21 Nov 2019 00:02:30 -0500 Subject: [PATCH] GraphQL endpoint URL is now persisted --- pages/graphql.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/graphql.vue b/pages/graphql.vue index 2473d66c2..aad171cf9 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -136,7 +136,6 @@ export default { }, data() { return { - url: "https://rickandmortyapi.com/graphql", schemaString: "", queryFields: [], mutationFields: [], @@ -144,6 +143,16 @@ export default { gqlTypes: [] }; }, + computed: { + url: { + get() { + return this.$store.state.gql.url; + }, + set(value) { + this.$store.commit("setGQLState", { value, attribute: "url" }); + } + } + }, methods: { copySchema() { const aux = document.createElement("textarea");