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

Create GraphQL resolver for firebase profile photo uploads #356

Open
neelismail01 opened this issue May 17, 2022 · 0 comments
Open

Create GraphQL resolver for firebase profile photo uploads #356

neelismail01 opened this issue May 17, 2022 · 0 comments
Assignees

Comments

@neelismail01
Copy link
Contributor

neelismail01 commented May 17, 2022

Summary and Background

Create a GraphQL resolver to enable profile photos uploaded by volunteers to be stored, removed, and retrieved from Firebase. This logic is used for the following mockup:
image.png

Technical

  • backend/services/implementation/fileStorageService.ts supports all interactions with Firebase Storage, so this file will be useful for this ticket
  • You will need to create queries and mutations in backend/graphql/resolvers/userResolvers.ts-createFilefor uploading -deleteFilefor deleting -getFile` for retrieving
  • Our naming convention for profile pictures will be 'volunteers/profile-photo/[hash of volunteer email]'. The client will send the volunteer's email with their request for the profile picture, so you will need to hash it and then append it to the picture's path to get the correct file name for retrieval. Similarly, for uploading a file, the fileName parameter passed to createFile will be the hash of the volunteer's email, and the path will be 'volunteers/profile-photo'.
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

No branches or pull requests

1 participant