IsEmptyQuery returns true if the query is empty or a match-all (e.g. "{}", "{ }", "{ true }").
(query string)
| 72 | |
| 73 | // IsEmptyQuery returns true if the query is empty or a match-all (e.g. "{}", "{ }", "{ true }"). |
| 74 | func IsEmptyQuery(query string) bool { |
| 75 | query = strings.ReplaceAll(query, " ", "") |
| 76 | return query == "" || query == "{}" || query == "{true}" |
| 77 | } |
| 78 | |
| 79 | // NormalizeQuery parses a query string using the lenient parser and returns |
| 80 | // a normalized string representation. Used for cache key generation. |
no outgoing calls
no test coverage detected