Files
hoppscotch/components/graphql/typelink.vue
2020-01-09 13:31:30 -05:00

34 lines
453 B
Vue

<template>
<span class="typelink" @click="jumpToType">{{ typeString }}</span>
</template>
<style>
.typelink {
color: red
}
</style>
<script>
export default {
props: {
gqlType: null,
// (typeName: string) => void
jumpTypeCallback: Function
},
computed: {
typeString() {
return this.gqlType.toString();
}
},
methods: {
jumpToType() {
this.jumpTypeCallback(this.gqlType);
}
}
}
</script>