graphql-request
graphql-request copied to clipboard
Wrong type for custom scalar (e.g. Date)
I am using the following DateTime custom scalar.
export const DateTime = Graffle.Scalars.create('DateTime', {
decode: (value: string) => new Date(value),
encode: (value: Date) => formatRFC3339(value),
})
When I try to access date methods on a returned object, I get the following issue, because all method types are replaced with {}.