GraphQLGenConfig class
Settings read from graphql_gen.yaml.
Constructors
-
GraphQLGenConfig({required String packageName, required SchemaSource schema, required String output, ModelLayout layout = ModelLayout.byKind, String classPrefix = 'Api', String? barrel = 'api.dart', String? modelsImport, String runtimeImport = 'package:graphql_gen/graphql_gen.dart', Map<
String, String> scalars = const {}, List<RegExp> skipTypes = const [], List<String> preserve = const [], bool inputDefaultsRequired = false, Map<GeneratedFile, String> classNames = const {}, Map<GeneratedFile, String> fileNames = const {}})
Properties
- barrel → String?
-
Barrel file name inside output, or
nullto skip it.final -
classNames
→ Map<
GeneratedFile, String> -
final
- classPrefix → String
-
final
-
fileNames
→ Map<
GeneratedFile, String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputDefaultsRequired → bool
-
When true, a non-null input field with a default value is still a
requiredconstructor parameter.final - layout → ModelLayout
-
final
- modelsImport → String
-
Import every generated file uses to see the other generated types.
no setter
- output → String
-
Directory, relative to the package root, that receives all output.
final
- packageName → String
-
final
-
preserve
→ List<
String> -
Paths relative to output (with
*wildcards) that--regeneratenever deletes.final - runtimeImport → String
-
Import that gives generated code
GraphQLFieldBuilder,GenerateEnumFieldsandGraphQLArgumentBuilder.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scalars
→ Map<
String, String> -
Custom scalar name to Dart type, e.g.
DateTime: DateTime.final - schema → SchemaSource
-
final
-
skipTypes
→ List<
RegExp> -
Regular expressions of type names that get no model.
final
Methods
-
className(
GeneratedFile file) → String -
fileName(
GeneratedFile file) → String -
isPreserved(
String relativePath) → bool -
isSkipped(
String typeName) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
packageImport(
String path) → String -
package:URI forpathrelative to the package root (underlib/). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromYaml(
Map yaml, {required String packageName}) → GraphQLGenConfig -
load(
{String root = '.', String configPath = defaultPath}) → GraphQLGenConfig -
Loads
configPathfromroot;root/pubspec.yaml supplies the package name.
Constants
- defaultPath → const String