2 Answers
- Newest
- Most votes
- Most comments
0
Hi,
I think your issue is that you're applying the "Admin" group both on the type and on the field. Have you set up multi auth on your API? If so, can you try changing @aws_auth usages to this:
@aws_cognito_user_pools(cognito_groups:\["Admin"])
? It looks like you're trying to use the wrong Cognito directive to fulfill a multi auth use case. The one you're using was created before the implementation of multi auth, and it only works for top level fields.
Thanks,
Jeff
answered 5 years ago
0
Thanks!
As you thought, the issue was with the auth directive. Changing to
@aws_cognito_user_pools(cognito_groups: ["Admin"])
works perfectly
type Users @aws_cognito_user_pools(cognito_groups: ["Everyone", "Admin"]){
userid: String!
firstname: String
lastname: String
email: AWSEmail
@aws_cognito_user_pools(cognito_groups: ["Admin"])
phone: AWSPhone
@aws_cognito_user_pools(cognito_groups: ["Admin"])
public: Boolean
access: String
}
answered 5 years ago
Relevant content
- asked 2 years ago
- asked 5 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 24 days ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago