Skip to main content
Question

Getting an error message:Validation error (WrongType@[events])

  • March 11, 2025
  • 1 reply
  • 12 views

I am getting the following error in stream from REST Collection.

message:Validation error (WrongType@[events]) : argument 'between.startTime' with value 'StringValue{value='`${C.Time.strftime(new Date((earliest * 1000.toISOString()}`'}' is not a valid 'DateTime'

Here is the schema for GraphSQL and Collect POST body i am using. What am i doing wrongly? can any help with setting the correct time value.

GraphSQL

between: {
startTime: "`${C.Time.strftime(new Date((earliest * 1000.toISOString()}`"
endTime: "`${C.Time.strftime(new Date((latest * 1000.toISOString()}`"}

Collect POST body

between: { startTime: \"`${C.Time.strftime(new Date((earliest * 1000.toISOString()}`\" endTime: \"`${C.Time.strftime(new Date((latest * 1000.toISOString()}`\" }

1 reply

Jon Rust
Forum|alt.badge.img
  • Employee
  • March 11, 2025

Backticks should not be inside quotes. Backticks allow you to mix strings with snippets of quotes (inside ${})