UNPKG

@graphql-codegen/flutter-freezed

Version:

GraphQL Code Generator plugin to generate Freezed models from your GraphQL schema

13 lines (12 loc) 1.15 kB
import { ListTypeNode, NamedTypeNode, NonNullTypeNode, TypeNode } from 'graphql'; import { FieldName, TypeName } from '../config/pattern.cjs'; import { AppliesOnParameters, FieldType, FlutterFreezedPluginConfig, NodeType } from '../config/plugin-config.cjs'; export declare class ParameterBlock { static build(config: FlutterFreezedPluginConfig, node: NodeType, field: FieldType, blockAppliesOn: readonly AppliesOnParameters[]): string; static buildDecorators: (config: FlutterFreezedPluginConfig, typeName: TypeName, fieldName: FieldName, parameterName: string, blockAppliesOn: readonly AppliesOnParameters[]) => string; static buildBody: (config: FlutterFreezedPluginConfig, field: FieldType, typeName: TypeName, fieldName: FieldName, parameterName: string, blockAppliesOn: readonly AppliesOnParameters[]) => string; static parameterType: (config: FlutterFreezedPluginConfig, type: TypeNode, parentType?: TypeNode) => string; static isListType: (type?: TypeNode) => type is ListTypeNode; static isNonNullType: (type?: TypeNode) => type is NonNullTypeNode; static isNamedType: (type?: TypeNode) => type is NamedTypeNode; }