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_generator command line: init, fetch and sync.
GraphQLGenConfig
Settings read from graphql_gen.yaml.
SchemaSource
Where the schema comes from: the schema section of graphql_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 variable NAME.
fetchSchema(SchemaSource source, {Client? client, Map<String, String>? environment}) → Future<String>
Downloads the schema described by source and returns it as SDL.
introspectionToSdl(Map<String, dynamic> json) → String
Converts an introspection result (the data object or the whole response) to SDL.
parseFactoryFields(String source) → Map<String, String>?
Parameter name to type (nullable marker kept, required dropped) of the first const factory X({...}) in source, or null if there is none.