Skip to content

Add graphql client for deploy keys

Andrew Fontaine requested to merge afontaine/407604/graphql into master

What does this MR do and why?

This client maps scopes to different endpoints. The new endpoints are paginated and only return a subset of keys. It also handles enabling and disabling keys for a project.

As we see in typedefs, we can extend the shared page info input type to also include the scope that we've requested, ensuring we display the correct page info when changing tabs as well as pages.

If no endpoint is returned, we default to enabled keys. When enabling or disabling a key, we evict it from the cache and trigger a refetch of keys to enxure we display the correct information. As we get data from the REST API that is always correct, we generally don't merge items, but instead use the incoming value.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports