Federated authentication lets users sign in with one account from a trusted provider, like Google or Facebook, to access multiple services without creating new passwords.
query {
user(id: "123") {
email
authProvider
}
}The query requests both email and authProvider fields. The user exists, so both fields return valid values.
The @key directive must have quoted field names. The id field must be non-nullable (ID!). Option A follows both rules.
The @requires directive helps specify which fields are needed from other services, so the gateway fetches only necessary data, improving efficiency.
The error occurs because profilePicture is not declared in the User type schema, so GraphQL rejects the query for that field.
