Louis Holley
05/27/2022, 12:39 PMimport SchemaBuilder from '@pothos/core';
import {
DateTime,
dateTimeParseValue,
dateTimeSerialize,
} from './types/scalars';
export const builder = new SchemaBuilder<{
Scalars: {
DateTime: {
Input: Date;
Output: DateTime;
};
};
}>({});
builder.scalarType('DateTime', {
serialize: dateTimeSerialize,
parseValue: dateTimeParseValue,
});
...
the build is erroring with dateTimeSerialize is not defined
(see screenshot for the out file)thdxr
05/27/2022, 12:40 PMLouis Holley
05/27/2022, 1:01 PMLouis Holley
05/27/2022, 1:01 PMthdxr
05/27/2022, 1:02 PMthdxr
05/27/2022, 1:02 PMLouis Holley
05/27/2022, 1:02 PMLouis Holley
05/27/2022, 1:08 PMLouis Holley
05/27/2022, 1:09 PMthdxr
05/27/2022, 1:10 PMaddScalaryType
and not calls to scalarType
. Btw where are you importing that datetime scalar from?thdxr
05/27/2022, 1:10 PMbuilder.addScalarType('DateTime', DateTIme, {});
Louis Holley
05/27/2022, 1:11 PMthdxr
05/27/2022, 1:11 PMLouis Holley
05/27/2022, 1:38 PMthdxr
05/27/2022, 2:44 PMLouis Holley
05/27/2022, 2:50 PMthdxr
05/27/2022, 2:57 PMthdxr
05/27/2022, 2:57 PMthdxr
05/27/2022, 3:08 PMthdxr
05/27/2022, 3:12 PMLouis Holley
05/27/2022, 3:12 PMthdxr
05/27/2022, 3:16 PMLouis Holley
05/27/2022, 3:16 PMthdxr
05/27/2022, 3:17 PM