Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

More apollo integrations #98

Closed
14 of 21 tasks
hyochan opened this issue Jan 27, 2020 · 6 comments
Closed
14 of 21 tasks

More apollo integrations #98

hyochan opened this issue Jan 27, 2020 · 6 comments

Comments

@hyochan
Copy link
Member

hyochan commented Jan 27, 2020

Given initial works provided in #96, I'd like to share with others on apollo integrations.
Below are the tasks we can try today 馃 .

You can see all integrated GraphqlAPIs in https://stage.hackatalk.dev/graphql

** Currently provided **

  • Add / Remove push notifications
  • Search all users not including user.
  • Add / Remove friend
  • Update profile
  • Find password
  • Facebook signin
  • Apple signin
  • Google signin
  • Change password

** Not yet provided in server **

  • Manage on / offline users
  • Add channel (This can be done automatically when you've sent first message to user)
  • Send message (Message, Photo, File)
  • Get messages with pagination
  • Friend subscription
  • Channel subscription
  • Message subscription

** Planed for integration **

  • Auth flow (signin, me, signup, verify email)
  • Social auth (apple signin, facebook signin, google signin)
    • signInWithSocialAccount
  • Find & change password / check auth type
    • me
    • findPassword
    • changePassword
  • Search users / add friends / show friends
    • users
    • addFriend
    • friends
    • deleteFriend
  • Update profile
    • updateProfile
    • rest api : post /upload_single with body inputFile

猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍 猸愶笍

Recommended steps

  1. Try to test apis in https://stage.hackatalk.dev/graphql
  2. Write up integration senario in medium.
    • This can be used in pull request for better understanding.
  3. Write codes and integrate graphql APIs with installed apollo client.
  4. Write test code.
    • This step is also in the medium and youtube.
  5. Provide docs on medium and submit to dooboolab or react-native-seoul.
  6. Add enhancement if you see anything that should be improved such as UI.
@godon019
Copy link
Contributor

godon019 commented Feb 16, 2020

So we have two options to implement apollo client here

  1. put apollo code inside of view component and thus remove unnecessary provider
  2. put apollo code inside of provider

let's discuss of pros and cons here

if we choose 1.

pros

  • easy to customize apollo client code for view specific code
  • remove unnecessary provider codes

cons

  • removed encapsulation for side effect codes (provider)

and with 2.

pros

  • no need to change view codes
  • reuse test code

cons

  • possibly need to customize for specific functionality with same query?

please let me know how you guys think about it

@marsinearth
Copy link
Contributor

marsinearth commented Feb 18, 2020

and with 2.

pros

  • no need to change view codes
  • reuse test code

cons

  • possibly need to customize for specific functionality with same query?

please let me know how you guys think about it

I think this second one is already "nicely" implemented (btw, it's also AWS Amplify codeGen style, too) on signUp, signIn, and verifyEmail using useMutation and is clearly beneficial when it comes to reusing the query

@godon019
Copy link
Contributor

and with 2.

pros

  • no need to change view codes
  • reuse test code

cons

  • possibly need to customize for specific functionality with same query?

please let me know how you guys think about it

I think this second one is already "nicely" implemented (btw, it's also AWS Amplify codeGen style, too) on signUp, signIn, and verifyEmail using useMutation and is clearly beneficial when it comes to reusing the query

Okay that sounds good! I would like to give it a try!

@geoseong
Copy link
Member

@hyochan I added task called delete friend in Search users / add friends / show friends section.

User might want to delete a friend someday after the user adds some user to friend list.

please let me know if this delete friend task has not been intended.

@hyochan
Copy link
Member Author

hyochan commented Mar 7, 2020

@geoseong You're right! I've added that for you!

@hyochan
Copy link
Member Author

hyochan commented Jun 6, 2020

Closed followed by #134

@hyochan hyochan closed this as completed Jun 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants