@vinaybedre/graphql-flutter-codegen

GraphQL codegen for Flutter+Dart using graphql_flutter

Usage no npm install needed!

<script type="module">
  import vinaybedreGraphqlFlutterCodegen from 'https://cdn.skypack.dev/@vinaybedre/graphql-flutter-codegen';
</script>

README

graphql-flutter-codegen

GraphQL codegen plugin for Flutter+Dart using graphql_flutter. This is in a very early stage.

How to install?

yarn add @vinaybedre/graphql-flutter-codegen

How to use?

This plugin can be used along with graphql-code-generator

Example codegen-config.yml

overwrite: true
schema: "./schemas/**/*.graphqls"
documents: "./documents/**/*.graphql"
generates:
  ./graphql_flutter_documents.dart:
    plugins:
      - "@vinaybedre/graphql-flutter-codegen"

This shall output a dart file like this

Example project

Find a working example project at example