Skip to content

feat(server): simplify currentUser query response

Tamlyn Rhodes requested to merge graphql-currentuser into master

The current shape of the currentUser GraphQL query response has been annoying me because this query will be used everywhere and currentUser.user is ugly.

Then I realised that there's no point in having the token in the response since it must have been provided in the request already.

I've marked it as a breaking change but the only places things I'm aware of that are using this are the unmerged GraphQL MRs.

This also fixes the behaviour when unauthenticated, now returning null instead of throwing a NotFoundError, and adds a couple of tests.

Edited by Tamlyn Rhodes

Merge request reports