Closed ogak-github closed 7 months ago
for structured custom scalars you should use StructurtedSerializer. see https://ferrygraphql.com/docs/custom-scalars#using-structuredserializers
for structured custom scalars you should use StructurtedSerializer. see https://ferrygraphql.com/docs/custom-scalars#using-structuredserializers
Thanks for your answer @knaeckeKami I appreciate it, I recently got an answer from my friends, I am using package built_value and return it as JsonObject
like this in my build.yaml
file
$default:
builders:
json_serializable:
options:
explicit_to_json: true
ferry_generator|graphql_builder:
enabled: true
options:
schema: hawk_flutter|lib/schema.graphql
type_overrides:
JSON:
name: JsonObject
import: "package:built_value/json_object.dart"
ferry_generator|serializer_builder:
enabled: true
options:
schema: hawk_flutter|lib/schema.graphql
custom_serializers:
- import: "package:built_value/src/json_object_serializer.dart"
name: JsonObjectSerializer
When I am querying in Graphiql nothing is wrong, the type data "settings" should be
Map<String, String>
,In my app I try to fetch query above, but the result is empty
{}
.After I modified my custom serialization like this
its working. Anyone knows why the type data is List<Object?>