Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Clearing phone number throws GraphQL error on members api #582

Open
brettski opened this issue Jul 31, 2020 · 1 comment
Open

Clearing phone number throws GraphQL error on members api #582

brettski opened this issue Jul 31, 2020 · 1 comment
Labels
bug Something isn't working requires auth Authentication access required to replicate, test, fix

Comments

@brettski
Copy link
Collaborator

Describe the bug
When a user removes a phone number from their profile the way the update query is sent to the api causes a GraphQL error for a bad phone number format. Sentry reference:

To Reproduce
Steps to reproduce the behavior:

  1. login to https://www.thatconference.com
  2. go to edit your profile. If you don't have a phone number saved, add one and save your profile
  3. Go to edit your profile and clear out your phone number
  4. Save the record
    The page takes longer to submit, or doesn't submit or if you get it to the phone number isn't actually removed.

Expected behavior
The page should submit as expected and not retain the phone number.

Screenshots
image

Device(s)/Browser(s) this is occurring on

  • any

Additional context
Sentry reference: https://sentry.io/share/issue/09aae5941a414854acee0812271e6832/
Error Text:

Variable "$profile" got invalid value "" at "profile.mobilePhone"; Expected type "PhoneNumber". Value is not a valid phone number of the form +17895551234 (10-15 digits): 

The reason for this issue is that an empty string is being used in the GraphQL query. The Scalar PhoneNumber only accepts null and standard E.164 specification (e.g. +11234567890) string.

To remove the value a null need to be provided instead of the empty string from the form. So it needs to be converted before sending to the api.

@brettski brettski added the bug Something isn't working label Jul 31, 2020
@saragibby
Copy link
Contributor

Are we still lacking the ability for an external contributor to authenticate when running the app locally? If so, it will be a bit flying blind if we are unable to authenticate and get to the profile page within our local dev environments and this will need to be addressed internally.

@saragibby saragibby added the requires auth Authentication access required to replicate, test, fix label Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working requires auth Authentication access required to replicate, test, fix
Projects
None yet
Development

No branches or pull requests

2 participants