Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Query arguments in GraphQL are shown separately with description (#1319)

Andrew Bastin7d49f756821e
diff --git a/components/graphql/field.vue b/components/graphql/field.vue
index 4234bbee9..d84965b70 100644
--- a/components/graphql/field.vue
+++ b/components/graphql/field.vue
@@ -22,6 +22,18 @@
>
{{ $t("deprecated") }}
</div>
+ <div v-if="fieldArgs.length > 0">
+ <h5 class="text-xs my-2">ARGUMENTS:</h5>
+ <div class="border-l-2 border-acColor px-4">
+ <div v-for="(field, index) in fieldArgs" :key="index">
+ {{ field.name }}:
+ <typelink :gqlType="field.type" :jumpTypeCallback="jumpTypeCallback" />
+ <div class="mt-2 text-fgLightColor field-desc" v-if="field.description">
+ {{ field.description }}
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</template>
@@ -39,7 +51,6 @@ export default {
jumpTypeCallback: Function,
isHighlighted: { type: Boolean, default: false },
},
-
computed: {
fieldName() {
return this.gqlField.name