canvas-lms
canvas-lms copied to clipboard
GraphQL API: submissionsConnection, user nodes have `loginId` as nulls for all users
Summary:
Steps to reproduce:
Using the following query:
query MyQuery {
course(id: "654321") {
sisId
assignmentsConnection {
nodes {
name
pointsPossible
submissionTypes
submissionsConnection(first: 10) {
nodes {
user {
_id
sisId
loginId
email
shortName
}
score
}
}
}
}
}
}
Expected behavior:
'loginId' attributes should not be null
Actual behavior:
'loginId' attributes are nulls
Additional notes:
This is most likely a permission issue, that you are not an admin in your Canvas instance, so are not allowed to view other users' logins. In particular the check is return nil unless pseudonym && course.grants_right?(context[:current_user], context[:session], :view_user_logins)
I'm definitely an admin and I'm able to read loginId in usersConnection on the course level for example