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

Add user signup mutation and find user query. #3

Merged
merged 4 commits into from Jun 26, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -5,8 +5,30 @@ import { Context } from './utils'

const resolvers = {
Query: {
user(_, { username }, context: Context, info) {
return context.db.query.user(
{
where: {
username
}
},
info
)
}
},
Mutation: {
signup(_, { username }, context: Context, info) {
const data = {
username,
stellarAccount: '1234',
stellarSeed: '1234'
}

return context.db.mutation.createUser(
{ data },
info
)
},
},
}

@@ -1,5 +1,9 @@
# import User from './generated/prisma.graphql'

type Query {
user(username: String!): User
}

type Mutation {
signup(username: String!): User!
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.