leto_generator 0.0.1-dev.4 leto_generator: ^0.0.1-dev.4 copied to clipboard
Generates GraphQL schemas from Dart classes, for use with package:leto_schema.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add leto_generator
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
leto_generator: ^0.0.1-dev.4
Alternatively, your editor might support dart pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:leto_generator/api_schema_generator.dart';
import 'package:leto_generator/config.dart';
import 'package:leto_generator/generator_models.dart';
import 'package:leto_generator/resolver_generator.dart';
import 'package:leto_generator/schema_first.dart';
import 'package:leto_generator/types_generator.dart';
import 'package:leto_generator/utils.dart';
import 'package:leto_generator/utils_graphql.dart';