-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solveIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: plugin:graphqlSource is plugin/graphql packageSource is plugin/graphql packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Hi,
Describe the bug
I can't access some data via GraphQL versus simple fetch.
Steps to reproduce the behavior
1- Create a new avatar media field on users.
2- Try to get that avatar via the below GraphQL query:
query {
me {
username
avatar {url}
}
}3)- You'll get the below error:
"Cannot query field "avatar" on type "UsersPermissionsMe"." with a GRAPHQL_VALIDATION_FAILED code.
Code snippets
The below fetch if returning the avatar object:
http://localhost:1337/users/me/
{
"id": 20,
"username": "***",
"email": "***@gmail.com",
"provider": "local",
"confirmed": true,
"blocked": null,
"created_at": "2019-12-26T19:17:36.847Z",
"updated_at": "2020-01-01T20:11:46.181Z",
"avatar": {
"id": 12,
"url": "/uploads/8dd5de998ffa4de09fc264c0fab924ab.jpg"
}
}System
- Node.js version: 10.17.0
- NPM version: 6.11.3
- Strapi version: v3.0.0-beta.18.3
- Database: sqlite
- Operating system: macod
Expected behavior
I should be able to get the avatar data from GraphQL
edeuxk, a-silent, martpet, remidej, marianocodes and 1 moreremidej
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solveIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: plugin:graphqlSource is plugin/graphql packageSource is plugin/graphql packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members