dd_gql 0.0.3 dd_gql: ^0.0.3 copied to clipboard
A new Flutter package for GraphQL networking request.
dd_gql #
A new Flutter package.
Getting Started #
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
- get-graphql-schema http://XXXXXXXXXXXXXX/ > schema.graphql 导出文件到根目录下
- 项目根目录下创建 build.yaml 文件
- 在lib目录下创建 graphql 文件夹, 用来存放 .graphql 文件
targets:
$default:
sources:
- lib/**
- schema.graphql
builders:
artemis:
options:
schema_mapping:
- schema: schema.graphql
queries_glob: lib/**.graphql
output: lib/graphql/models.dart
scalar_mapping:
- graphql_type: GenericScalar
dart_type: Object
use_custom_parser: true
- flutter pub run build_runner build --delete-conflicting-outputs