getFields method

  1. @protected
List<Field> getFields()

Implementation

@protected
List<Field> getFields() {
  if (classElement.mixins.isNotEmpty) {
    throw _queryableProcessorError.prohibitedMixinUsage;
  }
  final fields = [
    ...classElement.fields,
    ...classElement.allSupertypes.expand((type) => type.element.fields),
  ];

  return fields
      .where((fieldElement) => fieldElement.shouldBeIncluded())
      .map((field) {
    final typeConverter =
        queryableTypeConverters.getClosestOrNull(field.type);
    return FieldProcessor(field, typeConverter).process();
  }).toList();
}