Function
parseCustomQuery
({
query,
variables
}: {
query: string
variables: QueryVariables
})
Source from the content-addressed store, hash-verified
| 336 | editionId: string |
| 337 | sectionId: string |
| 338 | questionId: string |
| 339 | } |
| 340 | export const parseCustomQuery = ({ |
| 341 | query, |
| 342 | variables |
| 343 | }: { |
| 344 | query: string |
| 345 | variables: QueryVariables |
| 346 | }) => { |
| 347 | try { |
| 348 | const interpolatedQuery = template(query)(variables) |
| 349 | return interpolatedQuery |
| 350 | } catch (error) { |
| 351 | console.log(`// parseCustomQuery error in question "${variables.questionId}"`) |
| 352 | console.log(error) |
| 353 | } |
| 354 | } |
| 355 | |
Tested by
no test coverage detected