UNPKG

@composedb/devtools

Version:

Development tools for ComposeDB projects.

18 lines (17 loc) 1.24 kB
import type { CustomRuntimeScalarType } from '@composedb/types'; import { GraphQLScalarType } from 'graphql'; import type { ScalarSchema } from '../types.js'; export type ScalarTitle = 'CeramicCommitID' | 'CeramicStreamID' | 'ChainAgnosticAccountID' | 'ChainAgnosticChainID' | 'GraphQLCountryCode' | 'GraphQLDate' | 'GraphQLDateTime' | 'GraphQLDID' | 'GraphQLDuration' | 'GraphQLID' | 'GraphQLLatitude' | 'GraphQLLocalDate' | 'GraphQLLocale' | 'GraphQLLocalTime' | 'GraphQLLongitude' | 'GraphQLTime' | 'GraphQLTimeZone' | 'GraphQLURI' | 'GraphQLUtcOffset' | 'InterPlanetaryCID'; type ScalarWithTitle = ScalarSchema & { title: ScalarTitle; }; export declare const SCALAR_RUNTIME_TYPES: Record<ScalarTitle, CustomRuntimeScalarType>; export declare function getGraphQLScalarSchema<T extends ScalarSchema = ScalarSchema>(type: CustomRuntimeScalarType): T & { title: ScalarTitle; }; export declare const extraScalars: Record<string, ScalarWithTitle>; declare const scalars: Record<string, ScalarSchema>; export type SupportedScalarName = keyof typeof scalars; export declare function getScalarSchema(scalar: GraphQLScalarType | string): ScalarSchema; export declare function isCommonScalar(schema: ScalarSchema): boolean; export {};