graphql_query_builder 1.0.14 icon indicating copy to clipboard operation
graphql_query_builder: ^1.0.14 copied to clipboard

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';

Map<String, dynamic> buildSearchQuery(
  String searchField,
  String searchTerm,
) {
  final operationName = 'searchCategories';
  final parameters = {'searchField': searchField, 'searchTerm': searchTerm};
  final categoryResultObject = ResultObject({
    'id': null,
    'name': null,
    'description': null,
    'imageUrl': null,
  }).fields;
  final results = {
    'categories': categoryResultObject,
    'success': null,
    'message': null
  };

  return QueryBuilder(
    operationName,
    parameters,
    results,
  ).buildQuery();
}
2
likes
130
pub points
31%
popularity

Publisher

verified publisher icongodfrey-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)

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

More

Packages that depend on graphql_query_builder