Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Updated apollo server plugin to break out relevant functions into helpers #288

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

bizob2828
Copy link
Member

utilities, and plugin hooks to reduce cognitive complexity,

Description

This PR just breaks down the 1 big file of lib/create-plugin.js into other files that contain the apollo lifecycle hook implementation, utilities, and helpers for creating relevant segments, transaction, errors, etc. By breaking this down it reduced the cognitive complexity.

Related Issues

Closes NR-134583

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 98.83117% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 98.98%. Comparing base (0586332) to head (b2f3f34).

Files Patch % Lines
lib/hooks.js 97.28% 7 Missing ⚠️
lib/common.js 99.13% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
- Coverage   99.04%   98.98%   -0.06%     
==========================================
  Files           4        7       +3     
  Lines         730      891     +161     
==========================================
+ Hits          723      882     +159     
- Misses          7        9       +2     
Flag Coverage Δ
integration-tests-16.x 93.93% <93.89%> (+1.06%) ⬆️
integration-tests-18.x 93.93% <93.89%> (+1.06%) ⬆️
integration-tests-20.x 93.93% <93.89%> (+1.06%) ⬆️
unit-tests-16.x 59.70% <55.58%> (+5.05%) ⬆️
unit-tests-18.x 59.70% <55.58%> (+5.05%) ⬆️
unit-tests-20.x 59.70% <55.58%> (+5.05%) ⬆️
versioned-tests-16.x 95.84% <97.53%> (+0.64%) ⬆️
versioned-tests-18.x 95.84% <97.53%> (+0.64%) ⬆️
versioned-tests-20.x 95.84% <97.53%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…s into helpers, utilities, and plugin hooks to reduce cognitive complexity
@bizob2828 bizob2828 merged commit f5ef40f into newrelic:main Mar 6, 2024
12 of 14 checks passed
@github-actions github-actions bot mentioned this pull request Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants