Files
hoppscotch/components/graphql/typelink.vue
2020-09-22 22:36:37 +05:30

28 lines
451 B
Vue

<template>
<span class="font-mono font-normal cursor-pointer text-acColor" @click="jumpToType">
{{ typeString }}
</span>
</template>
<script>
export default {
props: {
gqlType: null,
// (typeName: string) => void
jumpTypeCallback: Function,
},
computed: {
typeString() {
return this.gqlType.toString()
},
},
methods: {
jumpToType() {
this.jumpTypeCallback(this.gqlType)
},
},
}
</script>