Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalar Mapping to Map<String, dynamic> mis-mapping dynamic to Dynamic #341

Closed
Nealsoni00 opened this issue Jul 16, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@Nealsoni00
Copy link

Bug description

the mapping of Map<String, dynamic> results in Map<String, Dynamic> in api.graphql.dart

build.yml:

scalar_mapping:
  - graphql_type: JSON
     dart_type: Map<String, dynamic>

results in

image

Specs

artemis: ^7.0.0-beta.3

build.yaml:
targets:
  $default:
    sources:
      - lib/**
    builders:
      artemis:
        options:
          schema_mapping:
            - schema: lib/graphql/schema.graphql
              queries_glob: lib/graphql/operations/api.graphql
              output: lib/graphql/api.dart
          scalar_mapping:
            - graphql_type: JSON
              dart_type: Map<String, dynamic>
              use_custom_parser: true
            - graphql_type: ISO8601DateTime
              dart_type: DateTime
Artemis output:
builds successfully
@Nealsoni00 Nealsoni00 added the bug Something isn't working label Jul 16, 2021
@Nealsoni00
Copy link
Author

I moved fragments to a folder and added explicit fragment_glob: reference -- now it works.

@vasilich6107
Copy link
Collaborator

@Nealsoni00 working on fix

@vasilich6107
Copy link
Collaborator

@Nealsoni00 wait for 7.1.0-beta.2 release

@vasilich6107
Copy link
Collaborator

@Nealsoni00 did you have time to try the fix?

@Nealsoni00
Copy link
Author

Nealsoni00 commented Jul 19, 2021

I don't seem to have the issue anymore! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants