Created
August 30, 2021 18:15
-
-
Save tomwray13/5334914719b362083cca12a5ae59ccc8 to your computer and use it in GitHub Desktop.
Using DateTime in GraphQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DateTimeResolver } from 'graphql-scalars' | |
const typeDefs = ` | |
scalar DateTime | |
` | |
const resolvers = { | |
DateTime: DateTimeResolver, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating a type you just now need to leverage the
DateTime
. E.g: