This discussion has been migrated from our Github Discussion #7268
BioSs54145d ago
Hello,
I have a few questions about Strapi. I checked the documentation but couldn’t find answers to my questions.
I have an “avatar” field, of type Media, when I call /auth/local, I get my field and when I call /users/me I don’t have it. I read that maybe a field in extensions/users-permissions needed to be changed? Which ?
Same question with my relation called “groups” in User. (User: groups <-> Group: members)
For informations, Swagger Schema @ doc is good :
id* string
username* stringminLength: 3
email* stringminLength: 6
provider string
confirmed booleandefault: false
blocked booleandefault: false
role {…}
bio string
address {…}
mobilePhone string
alerts {…}
groups […]
avatar* {…}
created_by {…}
updated_by {…}
And already try to edit /extensions/users-permissions/config/schema.graphql.js
module.exports = {
definition: `
extend type UsersPermissionsMe {
avatar: UploadFile
groups: Group
}
`
}
with Query
query {
me {
username
email
avatar {
url
}
groups {
name
}
}
}
i get :
{
"data": {
"me": {
"username": "MikaDo",
"email": "mikado@blabla.org",
"avatar": null,
"groups": null
}
}
}
Can someone help me
Thank you.