Hello - I'm venturing into GraphQL. I want to repl...
# troubleshoot
s
Hello - I'm venturing into GraphQL. I want to replicate a query which is straightforward in the UI (querying a customProperty called "hash" for a specific value): customProperties:hash=\"a3ec70319fe0bc5fee9ad666576a18cc-2\" but I'm struggling! I have got as far as the attached query but I can't see how to search specifying a customProperty as a target. Is there a way of running the UI query programmatically? Or any hints for doing this in GraphQL?

https://datahubspace.slack.com/files/U02NY1Q2PFG/F03B8HD4ETF/image.png

e
Hi trying to understand this query better. Are you trying to search for entities where the hash is a certain value? In this case, you should change the query to be
customProperties:hash=\"a3ec70319fe0bc5fee9ad666576a18cc-2\"
on top! Whatever is inside the body of the search function are the fields you are trying to retrieve from the response. If you want to change the query, you have to change the input!
s
Thanks very much - that's exactly what I wanted! I couldn't work out how I needed to specify the fields in the query. I replaced the \" with * in my query since quote escaping doesn't seem to work as I expected. Does this mean that the Advanced Search functionality in the UI just specifies a query string for GraphQL? Which means this guide applies: https://datahubproject.io/docs/how/search
e
Yes!
its just a query string
You could also try setting it as a filter instead of the query