refactor: collections versioning, migration and types

This commit is contained in:
Andrew Bastin
2021-08-24 23:12:53 +05:30
parent d1b2539d67
commit 6e9f16d8f1
5 changed files with 415 additions and 58 deletions

View File

@@ -33,7 +33,8 @@
<script lang="ts">
import { defineComponent } from "@nuxtjs/composition-api"
import { addGraphqlCollection } from "~/newstore/collections"
import { HoppGQLRequest } from "~/helpers/types/HoppGQLRequest"
import { addGraphqlCollection, makeCollection } from "~/newstore/collections"
export default defineComponent({
props: {
@@ -53,11 +54,13 @@ export default defineComponent({
return
}
addGraphqlCollection({
name: this.name,
folders: [],
requests: [],
})
addGraphqlCollection(
makeCollection<HoppGQLRequest>({
name: this.name,
folders: [],
requests: [],
})
)
this.hideModal()
},