Skip to content

Commit 0431cb5

Browse files
authored
Merge pull request #150 from rexraphael/master
Post returning non-null issue
2 parents 7e6fcdf + f6b1362 commit 0431cb5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

advanced/server/src/schema.graphql

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
type Query {
44
feed: [Post!]!
55
drafts: [Post!]!
6-
post(id: ID!): Post!
6+
post(id: ID!): Post
77
me: User
88
}
99

minimal/server/src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ const opts = {
1212

1313
const resolvers = {
1414
Query: {
15-
hello: (_, { name }) => {
15+
hello: (_, { name }) => {
1616
const returnValue = !name ? `Hello ${name || 'World!'}` : null
1717
return returnValue
1818
},
1919
},
2020
}
2121

2222
const server = new GraphQLServer({ typeDefs, resolvers, opts })
23-
server.start(() => console.log(`Server is running at http://localhost:${opts.port}`))
23+
server.start(() => console.log(`Server is running at http://localhost:${opts.port}`))

0 commit comments

Comments
 (0)