Hi all, I try to query glossary group with graphi...
# troubleshoot
j
Hi all, I try to query glossary group with graphiql ,and I need result query glossary node and show glossary term in this node . please advise me.
I try this command, but not have result please advise me.
{
search(input: {type: GLOSSARY_TERM,query:"*", filters:{field: "glossaryNode",value: "urn:li:glossaryNode:184d95df-a2b5-4479-a1b3-2cbd952a4325"}}
){
searchResults{
entity{
urn
type
... on GlossaryTerm{
urn
schemaMetadata{
datasetUrn
fields{
fieldPath
description
}
}
}
}
matchedFields{
name
value
}
}
}
}
b
hey there! so the reason that query isn't working is that there's no
glossaryNode
field on a glossary term. There could be a couple of ways to do this, but what we do through the UI in order to get all the terms underneath a node is to go through the node and get all its children. You could use this query and pass in the urn of the parent node you care about
Copy code
query getGlossaryNode($urn: String!) {
    glossaryNode(urn: $urn) {
        children: relationships(
            input: {
                types: ["IsPartOf"]
                direction: INCOMING
                start: 0
                count: 1000
            }
        ) {
            relationships {
                entity {
                    urn
                    type
                    ... on GlossaryNode {
                        properties {
                            name
                        }
                    }
                    ... on GlossaryTerm {
                        properties {
                            name
                        }
                    }
                }
            }
        }
    }
}
this will give you and Term or Node that is underneath a Node ("Term Group" in the UI)
j
Thank you so mush!!! , It working.
🎉 1
b
Thanks Chris 🙂