Hi guys im trying send a request to graphql to sea...
# troubleshoot
c
Hi guys im trying send a request to graphql to search for all the datasets with a specific tag: { search( input: {start: 0, count: 10, query: "*", type: DATASET, filters: {field: "tags", value: "facundo_prueba"} } ) { searchResults { entity { urn type } matchedFields { name value } } } } even though i have two datasets with that tag, the response is: {'data': {'search': {'searchResults': []}}} i tried to request directly to the backend with: { "input": "tags:facundo_prueba", "entity": "dataset", "start": 0, "count": 10 } and it works is the graphql query not correct? im trying to use graphql instead of directly querying the backend.
g
hey there- you want the value to the be the tag’s urn: so
urn:li:tag:facundo_prueba
c
Thank you! it works now 🙂
b
@green-football-43791 I have a quick follow up question to this. Does the filter field have to be an urn or can we filter by other fields as well? For example, in the code above it seems we can specify to filter on tags, but the value of the filter must be a tag urn even though we do no specify urn in the filter. Is it possible to filter by something like tag name (i.e. tag.properties.name) or will the api only ever check the value against the urn of the filter field?