Skip to content

Commit 3d3ffff

Browse files
committed
Add user query.
1 parent 5d6e915 commit 3d3ffff

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ import { Context } from './utils'
55

66
const resolvers = {
77
Query: {
8+
user(_, { username }, context: Context, info) {
9+
return context.db.query.user(
10+
{
11+
where: {
12+
username
13+
}
14+
},
15+
info
16+
)
17+
}
818
},
919
Mutation: {
1020
signup(_, { username }, context: Context, info) {

0 commit comments

Comments
 (0)