SchemaMap class

Maps a GraphQL schema to queries files. Output files are automatically generated in generated directories based on the queries_glob pattern and detected operation type.

Annotations
  • @JsonSerializable.new(fieldRename: FieldRename.snake)

Constructors

SchemaMap({String? schema, String? queriesGlob, String? fragmentsGlob, String typeNameField = '__typename', bool appendTypeName = false, bool convertEnumToString = false, NamingScheme? namingScheme = NamingScheme.pathedWithTypes})
Instantiates a schema mapping.
SchemaMap.fromJson(Map<String, dynamic> json)
Build a schema mapping from a JSON map.
factory

Properties

appendTypeName bool
The resolve type field used on this schema.
final
convertEnumToString bool
final
fragmentsGlob String?
A glob to find your fragments files.
final
hashCode int
The hash code for this object.
no setterinherited
namingScheme NamingScheme?
The naming scheme to be used.
final
queriesGlob String?
A glob to find queries files.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema String?
The GraphQL schema string.
final
typeNameField String
The resolve type field used on this schema.
final

Methods

copyWith({String? schema, String? queriesGlob, String? fragmentsGlob, String? typeNameField, bool? appendTypeName, bool? convertEnumToString, NamingScheme? namingScheme}) SchemaMap
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert this schema mapping instance to JSON.
toString() String
A string representation of this object.
inherited

Operators

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