I have a query that includes a variable $filter which is a string.
This variable is only relevant if the user has said they want to filter the results. If user doesn\