ClassGenerator class

Generator for GraphQL class definitions

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createClassProperty({required ClassPropertyName fieldName, ClassPropertyName? fieldAlias, required TypeNode fieldType, List<DirectiveNode>? fieldDirectives, required Context context, required void onNewClassFound(Context), bool markAsUsed = true}) ClassProperty
Core method to create a class property (extracted from main generator)
generateClass({required TypeDefinitionNode node, required Context context, required List<ClassProperty> properties, List<FragmentName> mixins = const [], Map<String, Name> factoryPossibilities = const {}, Name? extension, bool isInput = false}) ClassDefinition
Generate a class definition from a GraphQL type definition node
generateClassAnnotations({required TypeDefinitionNode node, required Context context}) List<String>
Generate class annotations and metadata
generateInputProperties({required List<InputValueDefinitionNode> fields, required Context context, required void onNewClassFound(Context)}) List<ClassProperty>
Generate properties for input classes from GraphQL input field definitions
generateProperties({required List<FieldDefinitionNode> fields, required Context context, required void onNewClassFound(Context)}) List<ClassProperty>
Generate properties for a class from GraphQL field definitions
validatePropertyType({required TypeNode fieldType, required Context context}) → void
Validate property type resolution