Skip to content

flutter-dd/dd_gql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  1. get-graphql-schema http://XXXXXXXXXXXXXX/ > sdl.gql 导出文件到根目录下
  2. 项目根目录下创建 build.yaml 文件
  3. 在lib目录下创建 gqls 文件夹, 用来存放 .graphql 文件
  4. 在lib目录下创建 Models 文件夹, 用来存放自动生成的文件
targets:
  $default:
    sources:
      - lib/**
      - sdl.gql
    builders:
      artemis:
        options:
          schema_mapping:
            - schema: sdl.gql
              queries_glob: lib//gqls/**.graphql
              output: lib/Models/models.dart
          scalar_mapping:
            - graphql_type: GenericScalar
              dart_type: Object
              use_custom_parser: true
.
.
.
dev_dependencies:
  flutter_test:
    sdk: flutter
  json_serializable: ^3.0.0
  build_runner: ^1.5.0
.
.
.
  1. flutter pub run build_runner build --delete-conflicting-outputs

About

dd_gql

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages