Skip to content

Wrong type for custom scalar (e.g. Date) #1338

@P4sca1

Description

@P4sca1

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 {}.

Image Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions