cli library
Command-line interface of graphql_gen_generator.
Classes
- FileChange
- One planned file change, with path relative to the package root.
- GqlSchema
- The parts of a GraphQL schema the generator needs, in declaration order.
- GraphQLGenCommandRunner
-
The
graphql_gen_generatorcommand line:init,fetchandsync. - GraphQLGenConfig
-
Settings read from
graphql_gen.yaml. - SchemaSource
-
Where the schema comes from: the
schemasection ofgraphql_gen.yaml. - SchemaSync
- Compares the schema with the generated files under GraphQLGenConfig.output and plans the changes that bring them in line.
- SyncResult
Enums
- ChangeKind
- What SchemaSync does with a file.
- GeneratedFile
-
The generated single-file outputs, used as keys under
names:/files:. - ModelLayout
- Where generated models are placed under GraphQLGenConfig.output.
Functions
-
expandEnvironment(
String value, Map< String, String> environment) → String -
Replaces
${NAME}with the value of the environment variableNAME. -
fetchSchema(
SchemaSource source, {Client? client, Map< String, String> ? environment}) → Future<String> -
Downloads the schema described by
sourceand returns it as SDL. -
introspectionToSdl(
Map< String, dynamic> json) → String -
Converts an introspection result (the
dataobject or the whole response) to SDL. -
parseFactoryFields(
String source) → Map< String, String> ? -
Parameter name to type (nullable marker kept,
requireddropped) of the firstconst factory X({...})insource, ornullif there is none.