Files
hoppscotch/components/graphql/type.vue
2020-08-17 18:29:14 +05:30

41 lines
735 B
Vue

<template>
<div class="type-box">
<div class="type-title">{{ gqlType.name }}</div>
<div class="type-desc" v-if="gqlType.description">
{{ gqlType.description }}
</div>
<div v-if="gqlType.getFields">
<h5>{{ $t("fields") }}</h5>
<div v-for="field in gqlType.getFields()" :key="field.name">
<field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" />
</div>
</div>
</div>
</template>
<style scoped lang="scss">
.type-box {
padding: 16px;
margin: 4px 0;
}
.type-desc {
color: var(--fg-light-color);
margin-top: 4px;
}
.type-title {
font-weight: 700;
}
</style>
<script>
export default {
props: {
gqlType: {},
jumpTypeCallback: Function,
},
}
</script>