Skip to main content

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()}`\" }

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


Reply