Skip to content

fix(graphql): use date scalar type for timestamps - #225

Open
ajohn25 wants to merge 1 commit into
mainfrom
fix-graphql-dates
Open

fix(graphql): use date scalar type for timestamps#225
ajohn25 wants to merge 1 commit into
mainfrom
fix-graphql-dates

Conversation

@ajohn25

@ajohn25 ajohn25 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

This converts a few String timestamps scattered in the codebase to the custom Date GraphQL scalar type

Motivation and Context

Noticed bug with displaying template campaign creation date as shown in the screenshot here #224 The other timestamps affected by this PR aren't displayed to users

The Date scalar ensures the timestamps are returned as ISO strings, which is how they're generally worked with throughout the codebase. The serialization code for the type (from node_modules) :

serialize: function (value) {
  assertErr(value instanceof Date, TypeError, ...)
  return value.toJSON()   // -> proper ISO 8601 string, e.g. "2026-07-30T12:34:56.789Z"
}

How Has This Been Tested?

This has been tested locally

Screenshots (if appropriate):

Documentation Changes

Checklist:

  • My change requires a change to the documentation.
  • I have included updates for the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant