Skip to content

Code Monitors: make the graphql response well-typed

Warren Gifford requested to merge cc/save-cm-payload into main

Created by: camdencheek

This modifies the type we unmarshal the GraphQL response into so that it is more well-typed. Previously, we were using a bunch of interface types, which forced us to do a bunch of fragile type introspection whenever we wanted to get the data out of it.

Additionally, this slims down the graphql query to better fit the domain. We don't need a FileMatch fragment for code monitor searches because there should only ever be CommitSearchResult in the results. This is enforced at JSON deserialization time.

Merge request reports

Loading