Skip to content

Instantly share code, notes, and snippets.

@samuelchanx
Last active February 20, 2022 04:14
Show Gist options
  • Select an option

  • Save samuelchanx/ec95c39213fd3097e93425ec2ec8a242 to your computer and use it in GitHub Desktop.

Select an option

Save samuelchanx/ec95c39213fd3097e93425ec2ec8a242 to your computer and use it in GitHub Desktop.
build.yaml for artemis
# To support the GraphQL validation in VSCode
name: "GraphQL API"
schema: "./schema.graphql"
documents: "./graphql/**/*.graphql"
targets:
$default:
sources:
- graphql/**
- lib/**
- schema.graphql
- $package$
- test/**.dart
builders:
artemis:
options:
ignore_for_file:
- lib/graphql/
schema_mapping:
- schema: schema.graphql
queries_glob: graphql/dailyMatch/daily_match.graphql
output: lib/graphql/dailyMatch.dart
# fragments_glob: graphql/**.fragment.graphql # Add this to support fragments
scalar_mapping:
- graphql_type: date
dart_type: DateTime
custom_parser_import: 'package:bls_internal/bls_internal.dart'
- graphql_type: timestamptz
dart_type: DateTime
custom_parser_import: 'package:bls_internal/bls_internal.dart'
- graphql_type: timestamp
dart_type: DateTime
custom_parser_import: 'package:bls_internal/bls_internal.dart'
- graphql_type: jsonb
dart_type:
name: Json
imports:
- 'package:bls_internal/bls_internal.dart'
custom_parser_import: 'package:bls_internal/bls_internal.dart'
use_custom_parser: true
- graphql_type: numeric
dart_type: double
- graphql_type: bigint
dart_type: int
json_serializable:
options:
explicit_to_json: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment