Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

GraphQL endpoint URL is now persisted

Andrew Bastin638f3f1a0549
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");