comigor / artemis

Build dart types from GraphQL schemas and queries
MIT License
495 stars 119 forks source link

What is the Dart type for jsonb graphql type #410

Open nkrmr opened 1 year ago

nkrmr commented 1 year ago
       - graphql_type: jsonb
              dart_type: Map<String, dynamic>

I use this to get the Dart type from my Hasura database to the Graphql type jsonb, but my app crash !

Do you know wish scalar type I can use to do this?

Best regards

nbourdin commented 1 year ago

Hello, you should try to use dynamic instead of Map<String, dynamic>, specially if you have an json array instead of json object in your graphql data result