locationsFromFields function

List<GraphQLErrorLocation> locationsFromFields(
  1. List<FieldNode> fieldNodes
)

Implementation

List<GraphQLErrorLocation> locationsFromFields(List<FieldNode> fieldNodes) {
  return List.of(
    fieldNodes.map(
      (e) => GraphQLErrorLocation.fromSourceLocation(
        (e.span ?? e.name.span)!.start,
      ),
    ),
  );
}