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

Query returns null for the image field of the likedBy object of the post. #2262

Open
krishna619 opened this issue Apr 25, 2024 · 11 comments
Open
Assignees
Labels
bug Something isn't working feature request no-issue-activity No issue activity

Comments

@krishna619
Copy link

Describe the bug
The following query returns null for the image field of the likedBy object, despite there being an existing image of the user who has liked the post.

Query

query ExampleQuery($organizationsId: ID, $first: PositiveInt) {
  organizations(id: $organizationsId) {
    posts(first: $first) {
      totalCount
      edges {
        node {
          _id
          likedBy {
            image
          }
        }
      }
    }
  }
}

Screenshots
If applicable, add screenshots to help explain your problem.

Additional details
Add any other context or screenshots about the feature request here.

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship PalisadoesFoundation/talawa#359

Copy link

github-actions bot commented May 6, 2024

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label May 6, 2024
@Cioppolo14 Cioppolo14 removed the no-issue-activity No issue activity label May 6, 2024
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label May 17, 2024
@Cioppolo14 Cioppolo14 removed the no-issue-activity No issue activity label May 17, 2024
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added no-issue-activity No issue activity and removed no-issue-activity No issue activity labels May 28, 2024
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Jun 10, 2024
@prayanshchh
Copy link

can u assign this issue to me?

@github-actions github-actions bot removed the no-issue-activity No issue activity label Aug 29, 2024
@palisadoes palisadoes removed the unapproved Unapproved for Pull Request label Aug 30, 2024
@prayanshchh
Copy link

prayanshchh commented Aug 31, 2024

Query:
query ExampleQuery($organizationsId: ID, $first: PositiveInt) {
organizations(id: $organizationsId) {
posts(first: $first) {
totalCount
edges {
node {
_id
likedBy {
_id,
image
}
}
}
}
}
}

Response:
{
"data": {
"organizations": [
{
"posts": {
"totalCount": 9,
"edges": [
{
"node": {
"_id": "6589bdce2caa9d8d69087514",
"likedBy": [
{
"_id": "64378abd85008f171cf2990d",
"image": "https://plus.unsplash.com/premium_photo-1683121366070-5ceb7e007a97?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
},
{
"_id": "66378abd85008f171cf2990d",
"image": "hhh"
}
]
}
},
{
"node": {
"_id": "6589bdb72caa9d8d69087512",
"likedBy": []
}
},
{
"node": {
"_id": "6589bda42caa9d8d69087510",
"likedBy": [
{
"_id": "65378abd85008f171cf2990d",
"image": "https://plus.unsplash.com/premium_photo-1683121366070-5ceb7e007a97?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
}
]
}
},
{
"node": {
"_id": "6589bd912caa9d8d6908750e",
"likedBy": []
}
},
{
"node": {
"_id": "6589bd7f2caa9d8d6908750c",
"likedBy": []
}
},
{
"node": {
"_id": "6589bd6a2caa9d8d6908750a",
"likedBy": []
}
},
{
"node": {
"_id": "6589bd492caa9d8d69087508",
"likedBy": []
}
}
]
}
}
]
}
}

I have manually populated likedby array as it was not populated in the sample database, as you can see now the graphql query is able to return the image url of each user.

I have also manually updated the value of image of user as there were no sample values.

User image getting updated manually (null value was there in sample database so I had to update the value for testing my updates and check if my solution was working or not)
image
image

GraphQl query and response:
image

Do i need to do something more or this is good to go?
@palisadoes

@palisadoes
Copy link
Contributor

@prayanshchh

Please ask the #talawa-api slack channel and @krishna619 for guidance.

@prayanshchh
Copy link

done

@prayanshchh
Copy link

@krishna619 didn't reply on the api channel, can I create the PR and move forward from there?@palisadoes

@palisadoes
Copy link
Contributor

You don't need to ask permission to open a PR

Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature request no-issue-activity No issue activity
Projects
None yet
Development

No branches or pull requests

4 participants