Open brettski opened 4 years ago
It looks like when the query for partner data is returning a null
for the member who is no longer public. This null
is causing the error as the code accepts members
to return an array of members.
Instead of adjusting the frontend could the backend not return a null
record in this array?
Are you able to provide the GraphQL query being used? Thank you
As an example, I updated my profile to be private (will leave in place for testing). Now when I run the below query I see a null
in the members array. When my profile is public, my data is included in the members array and there is no null
.
query getPartners {
partners {
partner(findBy: { slug: "that-sample" }) {
id
slug
companyName
members {
id
firstName
lastName
jobTitle
partnerFeaturedOrder
profileImage
}
}
}
}
Thank you for the query. I will investigate deeper soon. You can make your profile public again if you wish.
Describe the bug For a user to be featured (PublicProfile type in api) the
canFeature
field must be true.This is also a requirement for when members are associated with a partner and displayed on the partner page. We verify they are public before adding them.
The issue is that the member can, at any time, change the
canFeature
setting to false, and when they do this the partner page crashes.What is expected is that either: a. the user cannot change
canFeature
if they are associated with a partner or b. or the partner page doesn't blow up with this condition or c. something smart you think of