if (FALSE) {
# Note the single quotes to facilitate double quote encapsulation for arguments.
HPZone_request_paginated(
paste0('cases(where: {',
'Case_creation_date: { gte: "2025-01-01" }',
'}) {',
'items { Case_creation_date, Case_number }',
'}'))
# Or equal, making use of the sprintf integration:
startdate = "2025-01-01"
fields = c("Case_creation_date", "Case_number")
HPZone_request_paginated(
'cases(where: { Case_creation_date: { gte: "%s" } }) { items { %s } }',
startdate, stringr::str_c(fields, collapse=", ")
)
}
Run the code above in your browser using DataLab