refactor: collections versioning, migration and types
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
@@ -29,14 +29,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "@nuxtjs/composition-api"
|
||||
import { defineComponent, PropType } from "@nuxtjs/composition-api"
|
||||
import { HoppGQLRequest } from "~/helpers/types/HoppGQLRequest"
|
||||
import { editGraphqlRequest } from "~/newstore/collections"
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
show: Boolean,
|
||||
folderPath: { type: String, default: null },
|
||||
request: { type: Object, default: () => {} },
|
||||
request: { type: Object as PropType<HoppGQLRequest>, default: () => {} },
|
||||
requestIndex: { type: Number, default: null },
|
||||
},
|
||||
data() {
|
||||
|
||||
Reference in New Issue
Block a user