craftql
craftql copied to clipboard
User photoVolumeId incorrect
class User extends Schema System setting param should be photoVolumeId to photoVolumeUid
User photo field now not available
Ah, thanks, this is a breaking change from Craft 3.1. Let me look at this and make sure I can support 3.0 and 3.1 with the same code or if I need some sort of branch.
Craft CMS v. 3.1.9.1 Nice TY!
I'm not able to recreate this. I can query user photos without issues. What query/mutation is causing the issue?
{
users{
id
photo{
url
}
}
}
I ran into this one too, using Craft Pro 3.1.14.
Query:
{
users {
photo {
url
}
}
}
Response:
{
"errors": [
{
"message": "Cannot query field \"photo\" on type \"User\".",
"category": "graphql",
"locations": [
{
"line": 3,
"column": 5
}
]
}
]
}
Adding the following after this line in the User type fixes it for me:
if (!$volumeId) {
$volumeId = Craft::$app->getSystemSettings()->getSetting('users', 'photoVolumeUid');
}
@markhuot Is this something that will be fixed in an upcoming release? The solution above is working, but I guess its only temporary until the plugin will be updated?