Igor Borges

Results 53 comments of Igor Borges

Hello there, how are you doing? So, GraphQL spec accepts both `null` and the absence of the key as the same: https://spec.graphql.org/draft/#sel-GAFdRHABABsC0pB And, as `json_serializable` have this option (as pointed...

I understand your use cases and, although not spec-compliant, it seems better to have some configuration than sourcing to these kind of "hacks". I'll think about something.

@GP4cK I didn't have time to look at this yet. I understand your use case, but as it's not spec-compliant, it makes things harder. It seems that to solve your...

Hey @naikdp7! Artemis currently uses [gql's `Link`](https://github.com/gql-dart/gql/tree/master/links) as its underlining client mechanism. If you're changing/chaining new Links at runtime, you need to reinstantiate [`ArtemisClient.fromLink`](https://github.com/comigor/artemis/blob/master/lib/client.dart#L43).

Hello @smkhalsa! That surely seems doable and makes sense!

You'll probably want to make all generated extensions of `GraphQLQuery` ([like this one](https://github.com/comigor/artemis/blob/master/example/pokemon/lib/graphql/simple_query.dart#L39)) to have a `JsonSerializable` annotation to be able to convert its fields to json. Looking at it...

That's perfect, is it possible to serialize it to a String from a DocumentNode? If so, `json_serializable` supports [`fromJson`](https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/fromJson.html) and [`toJson`](https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/toJson.html) options on fields.

Hmm, yeah, you won't be able to serialize the function... and not having reflection don't help us at all... I thought about you creating a custom (serializable) class extending from...

>Can't we just have the generator generate the GraphqQLQuery class and include the mapping you describe above? But how are you going to persist and (more importantly) retrieve those queries?...

But I disagree the abstract `GraphQLQuery` should have this implementation, that's why I've suggested to create a new Query class, extending `GraphQLQuery`, and to deserialize your saved queries into it.