Date scalar added

Date scalar added

We're extremely happy to announce the release of the Date scalar.

You can now mark fields in your models as Date using the ISO 8601 standard — learn more.

Here's how you can use it:

type User @model { dob: Date }

When mutating data, in the case of the above schema, you'll want to pass the ISO 8601 format to the input type:

mutation { userCreate(input: { dob: "2022-11-07" }) { dob } }

You'll then get a response that looks something like the following, including the Date response:

{ "data": { "postCreate": { "post": { "dob": "2022-11-07" } } } }

Learn more about the Date directive.

Youtube video thumbnail
  • Grafbase CLI 0.12.0 has been released to include all of the above.

We'd love to hear your feedback and ideas, so join us on Discord.