ignoreCoderForField method
- @protected
- FieldElement field,
- Graphql annotation,
- SharedChecker<
Model> checker
inherited
Determine whether this field should be included in generated output.
Implementation
@protected
bool ignoreCoderForField(
FieldElement field,
FieldAnnotation annotation,
SharedChecker<Model> checker,
) {
final isComputedGetter = FieldsForClass.isComputedGetter(field);
if (isComputedGetter && doesDeserialize) return true;
if (annotation.ignore) return true;
final hasGenerator =
doesDeserialize ? annotation.fromGenerator != null : annotation.toGenerator != null;
if (!checker.isSerializable && hasGenerator) return false;
return !(checker.isSerializable || checker.isSerializableViaJson(doesDeserialize));
}