graphql_parser

Last updated:

0 purchases

graphql_parser Image
graphql_parser Images
Add to Cart

Description:

graphql parser

graphql_parser #


Parses GraphQL queries and schemas.
This library is merely a parser/visitor. Any sort of actual GraphQL API functionality must be implemented by you,
or by a third-party package.
Angel framework
users should consider
package:angel_graphql
as a dead-simple way to add GraphQL functionality to their servers.
Installation #
Add graphql_parser as a dependency in your pubspec.yaml file:
dependencies:
graphql_parser: ^1.0.0
copied to clipboard
Usage #
The AST featured in this library was originally directly based off this ANTLR4 grammar created by Joseph T. McBride:
https://github.com/antlr/grammars-v4/blob/master/graphql/GraphQL.g4
It has since been updated to reflect upon the grammar in the official GraphQL
specification (
June 2018).
import 'package:graphql_parser/graphql_parser.dart';

doSomething(String text) {
var tokens = scan(text);
var parser = new Parser(tokens);

if (parser.errors.isNotEmpty) {
// Handle errors...
}

// Parse the GraphQL document using recursive descent
var doc = parser.parseDocument();

// Do something with the parsed GraphQL document...
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.