How to select a suitable GraphQL client for your next Flutter app

graphql

install the package

$ flutter pub add graphql
import 'package:graphql/client.dart';
  • Initialize cache
  • Initialize link

graphql_flutter

install package

$ flutter pub add graphql_flutter
import 'package:graphql_flutter/graphql_flutter.dart';

ferry

install package

dependencies:
ferry: #[latest-version]
gql_http_link: #[latest-version]

dev_dependencies:
ferry_generator: #[latest-version]
build_runner: #[latest-version]
npm install -g get-graphql-schema
get-graphql-schema ENDPOINT_URL > lib/schema.graphql

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Samadhiwathsala

Samadhiwathsala

Undergraduate in Sabaragamuwa University of Sri Lanaka