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(web): split gql queries, fragments, etc #546

Merged
merged 27 commits into from Jul 6, 2023

Conversation

KaWaite
Copy link
Member

@KaWaite KaWaite commented Jul 2, 2023

Overview

What I've done

  • split gql between classic and beta
  • added ONLY queries/muts being used in beta currently to services/beta
  • Tried to slim down what queries we use so that we can use the same cache (example is using getMeQuery for user info like name, theme, lang, etc and team info. Query once and then use cached values)

What I haven't done

Doesn't include fetcher functions, optimistic mutation flags, etc. Fetcher functions are in this PR, etc.

Which point I want you to review particularly

  • Is this approach good?
  • What I want from this PR is
    • to split classic and beta so that we can keep beta GQL clean for the future of reearth.
    • Setup general idea around single source of truth and use cache as much as possible (and possibly remove the need for Jotai)

Memo

@netlify
Copy link

netlify bot commented Jul 2, 2023

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit b8e2d3e
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/64a64392a1cb240008e31401
😎 Deploy Preview https://deploy-preview-546--reearth-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the web label Jul 2, 2023
@KaWaite KaWaite marked this pull request as ready for review July 5, 2023 08:31
@github-actions github-actions bot requested a review from nina992 July 5, 2023 08:31
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #546 (b8e2d3e) into main (d1cba26) will decrease coverage by 1.70%.
The diff coverage is 1.03%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
- Coverage   27.31%   25.62%   -1.70%     
==========================================
  Files        1345     1360      +15     
  Lines      145014   154550    +9536     
  Branches     3541     3557      +16     
==========================================
- Hits        39607    39599       -8     
- Misses     104255   113799    +9544     
  Partials     1152     1152              
Flag Coverage Δ
web 22.85% <1.03%> (-1.94%) ⬇️
web-beta 22.85% <1.03%> (-1.94%) ⬇️
web-classic 22.85% <1.03%> (-1.94%) ⬇️
web-utils 22.85% <1.03%> (-1.94%) ⬇️

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

Impacted Files Coverage Δ
web/src/app.tsx 0.00% <0.00%> (ø)
web/src/beta/components/Dropdown/index.tsx 0.00% <0.00%> (ø)
web/src/beta/components/Loading/index.tsx 0.00% <0.00%> (ø)
web/src/beta/components/NotFound/index.tsx 0.00% <0.00%> (ø)
web/src/beta/features/Editor/index.tsx 0.00% <0.00%> (ø)
...beta/features/Navbar/LeftSection/Profile/index.tsx 0.00% <0.00%> (ø)
web/src/beta/features/Navbar/LeftSection/index.tsx 0.00% <0.00%> (ø)
web/src/beta/features/Navbar/hooks.ts 0.00% <0.00%> (ø)
web/src/beta/features/Navbar/index.tsx 0.00% <0.00%> (ø)
web/src/beta/features/Navbar/types.ts 0.00% <ø> (ø)
... and 67 more

... and 1 file with indirect coverage changes

@KaWaite KaWaite merged commit 591800f into main Jul 6, 2023
16 of 17 checks passed
@KaWaite KaWaite deleted the refactor-gql-queries-muts branch July 6, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant