graphql_query_compress 0.0.1+1 copy "graphql_query_compress: ^0.0.1+1" to clipboard
graphql_query_compress: ^0.0.1+1 copied to clipboard

A package that eliminates unnecessary characters from a GraphQL query, saving several bytes on requests.

example/graphql_query_compress_example.dart

import 'package:graphql_query_compress/graphql_query_compress.dart';

void main() {
  const query = r'''
    mutation CreateShow($input: CreateShowInput!) {
      createShow(input: $input) {
        show {
          id # we need this ID to buy a ticket
          __typename
        }
        __typename
      }
    }
    ''';
  final compressedQuery = compressGraphqlQuery(query);
  print(compressedQuery);
  // output: "mutation CreateShow($input:CreateShowInput!){createShow(input:$input){show{id __typename}__typename}}"
}
7
likes
150
pub points
56%
popularity

Publisher

unverified uploader

A package that eliminates unnecessary characters from a GraphQL query, saving several bytes on requests.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

gql_exec, gql_link

More

Packages that depend on graphql_query_compress