pass the query as a string using to_query so it plays nicely with pact