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

closes #468 - migrate to apollo client 3 #475

Merged
merged 5 commits into from
Jan 29, 2021

Conversation

Ulisseus
Copy link
Collaborator

@Ulisseus Ulisseus commented Jan 25, 2021

closes #468

In newer version many apollo packages were merged into one. This pr is mostly about using proper imports.
Locally I tested creating new users, submitting and reviewing challenges.

@vercel
Copy link

vercel bot commented Jan 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/c0d3/c0d3-app/hvl50g0y6
✅ Preview: https://c0d3-app-git-fork-ulisseus-apollo-main.c0d3.vercel.app

@codecov
Copy link

codecov bot commented Jan 25, 2021

Codecov Report

Merging #475 (a9069f5) into master (57aa00e) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #475   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           94        94           
  Lines         1271      1272    +1     
  Branches       266       265    -1     
=========================================
+ Hits          1271      1272    +1     
Impacted Files Coverage Δ
components/LessonCard.tsx 100.00% <ø> (ø)
containers/withQueryLoader.tsx 100.00% <ø> (ø)
graphql/queries/getApp.ts 100.00% <ø> (ø)
graphql/queries/getLessonMentors.ts 100.00% <ø> (ø)
graphql/queries/getSubmissions.ts 100.00% <ø> (ø)
graphql/queries/loginUser.ts 100.00% <ø> (ø)
graphql/queries/logoutUser.ts 100.00% <ø> (ø)
graphql/queries/resetPassword.ts 100.00% <ø> (ø)
graphql/queries/setStar.ts 100.00% <ø> (ø)
graphql/queries/signupUser.ts 100.00% <ø> (ø)
... and 6 more

//create a new Challenges array with user submission data integrated and sorted
const challengesWithSubmissionData: ChallengeSubmissionData[] = challenges
const challengesWithSubmissionData: ChallengeSubmissionData[] = challengesCopy
Copy link
Collaborator Author

@Ulisseus Ulisseus Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am surprised why this didn't caused any problems before. I created a copy of challenges to use in map-sort, otherwise it was causing type errors.

helpers/withApollo.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
pages/_app.tsx Outdated
import withApollo from '../helpers/withApollo'
import { ApolloClient, NormalizedCacheObject } from 'apollo-boost'
import { ApolloClient, NormalizedCacheObject } from '@apollo/client'
Copy link
Collaborator

@anthonykhoa anthonykhoa Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do just 1 import for ApolloProvider, ApolloClient, and NormalizedCacheObject?

@Ulisseus
Copy link
Collaborator Author

Ulisseus commented Jan 27, 2021

I accidentally submitted some commits as GH Pages Bot, so if anyone decides to merge this pr please squash it into Ulisseus commit and not to the bot ones.

@ggwadera ggwadera merged commit 12749ed into garageScript:master Jan 29, 2021
@Ulisseus Ulisseus deleted the apollo/main branch March 5, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to Apollo Client 3.0
4 participants