marmelab / json-graphql-server

Get a full fake GraphQL API with zero coding in less than 30 seconds.
MIT License
1.93k stars 169 forks source link

Treat date string as date type #136

Closed KarlGong closed 2 years ago

KarlGong commented 2 years ago

The json file cannot define a date type and the date string is just treated as string.

For example:

{"posts": [
   {
       "id": "test",
       "postTime": "2022-01-01T00:00:00Z"
   }
]}

the schema is

[id]: [ID]
[postTime]: [String]

It will be great if the schema generated like this

[id]: [ID]
[postTime]: [Date]