platform/example/basic.dart

18 lines
308 B
Dart
Raw Normal View History

2017-01-22 23:15:53 +00:00
import 'dart:async';
import 'package:graphql_parser/src/language/language.dart';
Stream<String> input() async* {
yield '''
{
project(name: "GraphQL") {
tagline
}
}
'''.trim();
}
main() async {
var lexer = new Lexer(), parser = new Parser();
await input().transform(lexer).forEach(print);
}