graphql_generator2 6.2.1 copy "graphql_generator2: ^6.2.1" to clipboard
graphql_generator2: ^6.2.1 copied to clipboard

Generates GraphQL schemas from Dart classes, for use with pkg:graphql_server2.

example/main.dart

import 'package:graphql_schema2/graphql_schema2.dart';
part 'main.g.dart';

@graphQLClass
class TodoItem {
  String? text;

  @GraphQLDocumentation(description: 'Whether this item is complete.')
  bool? isComplete;
}

void main() {
  print(todoItemGraphQLType.fields.map((f) => f.name));
}