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

migration to fastify and graphql-yoga #2284

Closed

Conversation

xoldd
Copy link
Contributor

@xoldd xoldd commented May 5, 2024

What kind of change does this PR introduce?

feature, refactoring

Issue Number:

Fixes #2283

Did you add tests for your changes?

No, not needed

Snapshots/Videos:

If relevant, did you update the documentation?

Not yet, will be done after this PR is merged.

Summary

The primary web server will be migrated to fastify from express. The graphql server will be migrated to graphql-yoga from apollo-server.

The graphql server will be decoupled from the fastify server to have seperation of concerns make it easier to swap out either the HTTP server(fastify) or the graphql server(graphql-yoga). All the dependencies required by the graphql resolvers at runtime will be provided to them using the graphql context and direct imports inside the resolver functions will be kept to a minimum.

It is of utmost importance that the HTTP layer does not bleed into the graphql layer to prevent tight coupling.

Does this PR introduce a breaking change?

Yes, this PR would introduce a breaking change.

Other information

The PR is incomplete, more commits will be made later on to accommodate all the required changes.

Have you read the contributing guide?

Yes

Copy link

github-actions bot commented May 5, 2024

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

codecov bot commented May 5, 2024

Codecov Report

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

Project coverage is 97.01%. Comparing base (c0468a4) to head (295e6af).
Report is 557 commits behind head on develop.

Files Patch % Lines
src/fastify.ts 0.00% 124 Missing ⚠️
src/routes/graphql/server.ts 0.00% 96 Missing ⚠️
src/routes/graphql/createContext.ts 0.00% 91 Missing ⚠️
src/init.ts 0.00% 44 Missing ⚠️
src/routes/graphql/pubSub.ts 0.00% 19 Missing ⚠️
src/routes/graphql/schema.ts 0.00% 19 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2284      +/-   ##
===========================================
- Coverage    98.17%   97.01%   -1.17%     
===========================================
  Files          184      355     +171     
  Lines        10767    25639   +14872     
  Branches       835     2351    +1516     
===========================================
+ Hits         10571    24874   +14303     
- Misses         186      762     +576     
+ Partials        10        3       -7     

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

@ttaylor92
Copy link

These checks would need to be met before i can approve.

Copy link

This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

@github-actions github-actions bot added the no-pr-activity No pull request activity label May 17, 2024
@palisadoes
Copy link
Contributor

Please fix the conflicting files so we can merge

@xoldd
Copy link
Contributor Author

xoldd commented Jun 2, 2024

@palisadoes actually this PR is incomplete, upon introspection I've found that the current code organization is really messy in the codebase, so I'm still trying to fix that. If it's a problem you can close this PR, I'll open a new one later on.

@palisadoes
Copy link
Contributor

Thanks. Closing

@palisadoes palisadoes closed this Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-pr-activity No pull request activity Ready 4 PR Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants