Aye, and if you need a query language inside your API it's probably best to use one of the existing languages specifically made for this use case, like GraphQL
GraphQL does not solve the problem if the query language is user-facing. Additionally, GraphQL a pretty huge tech stack injection. Something like this is much simpler. So, it depends on the context of what you're making and why.