graphql_query_builder 1.0.3 copy "graphql_query_builder: ^1.0.3" to clipboard
graphql_query_builder: ^1.0.3 copied to clipboard

outdated

Creates a graphql query string from maps to use with http. This will make it much easier to create a query sstring. Also, will work with unlimited levels of nested objects.

example/main.dart

import 'package:graphql_query_builder/graphql_query_builder.dart';

void main() {
  final parameterObject = ParameterObject(parameterObject: {
    'name': 'name',
    'description': 'description',
  });

  final nestedResultObject =
      ResultObject(resultObject: {'id': null, 'name': null});

  final resultObject = ResultObject(resultObject: {
    'id': null,
    'name': null,
    'category': nestedResultObject,
  });

  final mutationBuilder = MutationBuilder(
    'addToCart',
    {'id': 'id', 'product': parameterObject},
    {'id': null, 'product': resultObject},
  );

  final queryBuilder = QueryBuilder(
    'products',
    {},
    {'id': null, 'product': resultObject},
  );

  var mutation = mutationBuilder.buildQuery();

  var query = queryBuilder.buildQuery();

  print(mutation);
  print('=======================');
  print(query);
}
2
likes
0
pub points
31%
popularity

Publisher

verified publishergodfrey-computing.com

Creates a graphql query string from maps to use with http. This will make it much easier to create a query sstring. Also, will work with unlimited levels of nested objects.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on graphql_query_builder