graphql: fix "jump to type" and show input types

This commit is contained in:
Igor Stuzhuk (KoHcoJlb)
2021-02-01 16:13:12 +02:00
parent e299433e6e
commit 7f33798789
2 changed files with 17 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
<template>
<div class="p-2 m-2">
<div :id="`type_${gqlType.name}`" class="p-2 m-2">
<div class="font-bold type-title" :class="{ 'type-highlighted': isHighlighted }">
<span v-if="isInput" class="text-acColor font-normal">input </span>
{{ gqlType.name }}
</div>
<div class="mt-2 text-fgLightColor type-desc" v-if="gqlType.description">
@@ -26,6 +27,8 @@
</style>
<script>
import { GraphQLInputObjectType } from "graphql"
export default {
props: {
gqlType: {},
@@ -38,5 +41,10 @@ export default {
return !!this.highlightedFields.find(({ name }) => name === field.name)
},
},
computed: {
isInput() {
return this.gqlType instanceof GraphQLInputObjectType
},
},
}
</script>