You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Potential solution I just hacked out - change PgTypesPlugin to define and register common types up front:
// pgExtendedTypes might change what types we use for thingsconstJSONType=pgExtendedTypes ? GraphQLJSON : SimpleJSON;constUUIDType=SimpleUUID;// GraphQLUUIDconstDateType=SimpleDate;// GraphQLDateconstDateTimeType=SimpleDatetime;// GraphQLDateTimeconstTimeType=SimpleTime;// GraphQLTime// Other plugins might want to use JSONaddType(JSONType);addType(UUIDType);addType(DateType);addType(DateTimeType);addType(TimeType);constoidLookup={"20": stringType("BigInt","A signed eight-byte integer. The upper big integer values are greater then the max value for a JavaScript number. Therefore all big integers will be output as strings and not numbers."),// bitint - even though this is int8, it's too big for JS int, so cast to string."21": GraphQLInt,// int2"23": GraphQLInt,// int4"700": GraphQLFloat,// float4"701": GraphQLFloat,// float8"1700": GraphQLString,// numeric"790": GraphQLFloat,// money"1186": GQLInterval,// interval"1082": DateType,// date"1114": DateTimeType,// timestamp"1184": DateTimeType,// timestamptz"1083": TimeType,// time"1266": TimeType,// timetz"114": JSONType,// json"3802": JSONType,// jsonb"2950": UUIDType,// uuid"1560": GraphQLString,// bit"1562": GraphQLString,// varbit};
Potentially better solution is to register default types with getTypeByName function, allow overriding these with plugins.
Because it's only defined as-needed. This works as a substitute:
e.g. the following code sample is broken by this:
https://www.graphile.org/postgraphile/extending/#adding-root-querymutation-fields
Potential solution I just hacked out - change PgTypesPlugin to define and register common types up front:
Potentially better solution is to register default types with
getTypeByName
function, allow overriding these with plugins.Hat tip @syndesis
The text was updated successfully, but these errors were encountered: