Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

128 user schema #131

Merged
merged 6 commits into from
Dec 13, 2019
Merged

128 user schema #131

merged 6 commits into from
Dec 13, 2019

Conversation

aonomike
Copy link
Collaborator

@aonomike aonomike commented Dec 8, 2019

What does this PR do?

  • Add user context
  • Add signup mutation
  • Add me query

Description of Task to be completed?

Add user schema and signup feature

How should this be manually tested?

  1. Play with signup mutation on the graphql playground

What are the relevant Github Issues ?

Fixes #128

- Create gql schema and resolver for signup

## Todo
[X] Implement query user in the schema
[X] Create session schema
- User is now able to signup
- Added functionality to hash the password
- Create user factory
- Add me query to return current user details
- Add current user to the context of the application
@@ -6,6 +6,7 @@ defmodule SingForNeeds.Factory do
use ExMachina.Ecto, repo: SingForNeeds.Repo

alias SingForNeeds.Artists.Artist
alias SingForNeeds.Accounts.User

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alias SingForNeeds.Accounts.User is not alphabetically ordered among its group.

UserTypes
})

alias SingForNeedsWeb.Resolvers.{Accounts, Artist, Cause, Performance}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the time you are using the multiple single line alias/require/import/use directives but here you are using the multi-alias/require/import/use syntax

# so that the context is set up and `Absinthe.Plug` can extract
# the context from the connection.

defmodule SingForNeedsWeb.Plugs.SetCurrentUser do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modules should have a @moduledoc tag.

@@ -0,0 +1,30 @@
# Adds an Absinthe execution context to the Phoenix connection.
# If a valid auth token is in the request header, the corresponding

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

@@ -0,0 +1,30 @@
# Adds an Absinthe execution context to the Phoenix connection.
# If a valid auth token is in the request header, the corresponding
# user is added to the context which is then available to all

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

# user is added to the context which is then available to all
# resolvers. Otherwise, the context is empty.
#
# This plug runs prior to `Absinthe.Plug` in the `:api` router

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no trailing white-space at the end of a line.

@sourcelevel-bot
Copy link

SourceLevel has finished reviewing this Pull Request and has found:

  • 1 possible new issue (including those that may have been commented here).
  • 1 fixed issue! 🎉

See more details about this review.

Copy link
Collaborator

@javpet javpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was quite a big commit Mike lucky to be the part of it @aonomike

@javpet javpet merged commit 100a595 into AgileVentures:develop Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add User schema
2 participants