Skip to content

Commit

Permalink
Add hasTeams and hasUser fields to app context
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed Jun 6, 2019
1 parent 4b8775c commit 1296bcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/application/src/actions/load-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ module.exports = async ({ applicationId, email, ipAddress } = {}) => {
user,
mergedTeams,
mergedAccessLevels,
hasTeams: Boolean(mergedTeams.length),
hasUser: Boolean(user),
};
};
2 changes: 2 additions & 0 deletions services/graphql/src/graphql/definitions/app-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ type AppContext {
user: AppUser
mergedAccessLevels: [AccessLevel]
mergedTeams: [Team]
hasTeams: Boolean!
hasUser: Boolean!
}
type AppUser {
Expand Down

0 comments on commit 1296bcd

Please sign in to comment.