File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
packages/hoppscotch-common/src/components/graphql Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11<template >
22 <template v-if =" inline " >
3- <span >
3+ <span class = " hopp-doc-explorer-argument " tabindex = " 0 " @click = " handleClick " >
44 <span class =" hopp-doc-explorer-argument-name" > {{ arg.name }} </span >:
55 <GraphqlTypeLink :type =" arg.type" />
66 <GraphqlDefaultValue v-if =" showDefaultValue !== false" :field =" arg" />
77 </span >
88 </template >
99
10- <div v-else class =" hopp-doc-explorer-argument" >
10+ <div
11+ v-else
12+ class =" hopp-doc-explorer-argument"
13+ tabindex =" 0"
14+ @click =" handleClick"
15+ >
1116 <div class =" inline-flex items-center align-bottom" >
1217 <span
1318 v-if =" showAddButton"
5257import type { GraphQLArgument } from " graphql"
5358import { useQuery } from " ~/helpers/graphql/query"
5459import { debounce } from " lodash-es"
60+ import { useExplorer } from " ~/helpers/graphql/explorer"
5561
5662const { handleAddArgument, isArgumentInOperation } = useQuery ()
5763
@@ -85,6 +91,12 @@ const props = withDefaults(defineProps<ArgumentProps>(), {
8591 showAddButton: false ,
8692})
8793
94+ const { push } = useExplorer ()
95+
96+ const handleClick = () => {
97+ push ({ name: props .arg .name , def: props .arg })
98+ }
99+
88100const insertQuery = debounce (() => {
89101 handleAddArgument (props .arg )
90102}, 50 )
@@ -93,5 +105,6 @@ const insertQuery = debounce(() => {
93105<style scoped lang="scss">
94106.hopp-doc-explorer-argument {
95107 @apply transition hover :bg- primaryLight;
108+ cursor : pointer ;
96109}
97110 </style >
You can’t perform that action at this time.
0 commit comments