Skip to content

graphql: add ability to syntax highlight specific line ranges

Administrator requested to merge sg/optimize-highlighting-backend into main

Created by: slimsag

Today our GraphQL API exposes the ability to perform syntax highlighting in a few locations, e.g. to request the highlighted form of a blob or similar. These endpoints always return the entire highlighted file.

When we display search results on the frontend, we first fetch the entire highlighted file and then only display a small subset of it. I am exposing this API so that we can fetch only the subset that we actually plan to render, instead of transferring a substantial amount of data only to later discard it.

Helps #6992

Merge request reports

Loading