({
facet,
filters,
parameters,
xAxis,
yAxis
}: QueryArgs)
| 70 | } |
| 71 | |
| 72 | export const getQueryArgsString = ({ |
| 73 | facet, |
| 74 | filters, |
| 75 | parameters, |
| 76 | xAxis, |
| 77 | yAxis |
| 78 | }: QueryArgs): string | undefined => { |
| 79 | const args: ResponseArgumentsStrings = {} |
| 80 | if (facet) { |
| 81 | args.facet = facetItemToFacet(facet) |
| 82 | } |
| 83 | if (filters && !isEmpty(filters)) { |
| 84 | args.filters = unquote(JSON.stringify(filters)) |
| 85 | } |
| 86 | if (parameters && !isEmpty(parameters)) { |
| 87 | args.parameters = unquote(JSON.stringify(parameters)) |
| 88 | } |
| 89 | // for data explorer |
| 90 | if (yAxis && !isEmpty(yAxis)) { |
| 91 | args.axis1 = yAxis |
| 92 | } |
| 93 | if (xAxis && !isEmpty(xAxis)) { |
| 94 | args.axis2 = xAxis |
| 95 | } |
| 96 | if (isEmpty(args)) { |
| 97 | return '' |
| 98 | } else { |
| 99 | return wrapArguments(args) |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | export const getQuestionDataQuery = ({ |
| 104 | queryOptions, |
no test coverage detected