Skip to content

How to do multiple imports on the same Scalar type? #403

Description

@michael-chiu

How to do multiple imports on the same Scalar type? For below example:

      graphql_codegen:
        options:
          clients:
            - graphql_flutter
          outputDirectory: generated/
          scalars:
            UUID:
              type: String
            JSON:
              type: Map<String, dynamic>
            Upload:
              type: MultipartFile
              fromJsonFunctionName: fromGraphQLUploadToDartMultipartFile
              toJsonFunctionName: fromDartMultipartFileToGraphQLUpload
              import: package:charity_today_flutter/graphql/gql_parser.dart 

For the case of MultipartFile, I need imports as below:

  • the custom serialization "fromGraphQLUploadToDartMultipartFile" "fromGraphQLUploadToDartMultipartFile" method: "package:abc/graphql/gql_parser.dart"
  • the MultipartFile type: "package:dio/dio.dart"

But it seems only allow me to do one import? Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions