2. Create `ee/app/graphql/resolvers/package_metadata/advisory_resolver.rb`
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Label this issue](https://contributors.gitlab.com/manage-issue?action=label&projectId=278964&issueIid=591069) </details> <!--IssueSummary end--> ## Overview :information_source: Please note the use the `ee/` in directories and `EE` in code because [advisory data is GitLab EE only feature](https://handbook.gitlab.com/handbook/product/categories/features/#vulnerability-research). This work item covers creating `ee/app/graphql/resolvers/package_metadata/advisory_resolver.rb` along with tests. This GraphQL resolver will work alongside the `ee/app/graphql/types/package_metadata/advisory_type.rb` GraphQL type. ## Actions - [x] Create `ee/app/graphql/resolvers/package_metadata/advisory_resolver.rb` (you'll need to create the `ee/app/graphql/resolvers/package_metadata` directory first). - [x] Ensure the endpoint requires user authentication. - [x] Ensure the endpoint is only accessible to users that have the appropriate GitLab subscription - [x] Ensure the endpoint can support querying using `id` or `identifier` as mentioned in Section 3. of ADR-0004. - [x] Ensure the [`:pm_advisory_graphql` feature flag](https://gitlab.com/gitlab-org/gitlab/-/work_items/591071) is inspected within the code to govern access to users that need access. - [x] Ensure (if applicable) rate limits are imposed. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118010 for an example. - [x] Create `spec/graphql/resolvers/package_metadata/advisory_resolver_spec.rb` to fully test `ee/app/graphql/resolvers/package_metadata/advisory_resolver.rb`. ## Resources - https://docs.gitlab.com/api/graphql/#authentication <!--template sourced from https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Default.md-->
task