Create finder class for pipeline trigger tokens to use in graphql endpoint
Summary
After !125129 (merged) is merged, follow up on this conversation comment:
Should we introduce a finder class for
Ci::Triggerand call it here? I think it's safer to always authorize the request in finders e.g. https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/finders/ci/pipelines_finder.rb#L26.
Refactor the Pipeline Triggers resolver to use a finder.
Improvements
It's safer to authorize a request in a finder
Involved components
- Create a trigger_finder
- Refactor
app/graphql/resolvers/ci/pipeline_triggers_resolver.rbto use the finder - Add specs
Edited by Missy Davies