You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to filter on user profile fields. I am using the Profile module (https://www.drupal.org/project/profile) to store profile data on user accounts and need a way to filter by them. I have had success filtering by entity reference fields on the user entity by following examples on issue #573 whereby you specify a field name using snake_case and '.' to step into their entities e.g. {field:"roles.target_id", value:["member"]}. However as mainProfiles is not an entity reference field it won't seem to let me target it. mainProfiles does however autocomplete within GraphiQL explorer so is recognised and I can retrieve fields within it. I just can't seem to filter on those values. Does anyone have any ideas how I might get this to work?
Below is an example of what I am trying to do, ideally I would like to eventually target gender for example:
targeteduser: userQuery(filter: {conjunction:AND,conditions: [{field:"status",value:"1"},{field:"roles.target_id",value:["member"]},{field:"uid",value:"60"}
# {field:"profiles.nid",value:"21"}// Internal server error if uncommented
# {field:"field_profiles.nid",value:"21"}// Again does not work
# {field:"field_profiles.target_id",value:"21"}// Again does not work
# {field:"field_main_profiles.target_id",value:"21"}// Again does not work]}){count
users: entities{
...onUser{uuiduidentityTypeentityIdroles{targetId}
profiles: mainProfiles{targetIdentity{entityIdchanged...onProfileMain{fieldGender{entity{entityIdentityLabel}}}}}}}}
The text was updated successfully, but these errors were encountered:
I am trying to filter on user profile fields. I am using the Profile module (https://www.drupal.org/project/profile) to store profile data on user accounts and need a way to filter by them. I have had success filtering by entity reference fields on the user entity by following examples on issue #573 whereby you specify a field name using snake_case and '.' to step into their entities e.g. {field:"roles.target_id", value:["member"]}. However as mainProfiles is not an entity reference field it won't seem to let me target it. mainProfiles does however autocomplete within GraphiQL explorer so is recognised and I can retrieve fields within it. I just can't seem to filter on those values. Does anyone have any ideas how I might get this to work?
Below is an example of what I am trying to do, ideally I would like to eventually target gender for example:
The text was updated successfully, but these errors were encountered: