Skip to content

Commit

Permalink
Update apollo-server.md (#3169)
Browse files Browse the repository at this point in the history
Example code on the rootValue field was incorrect
  • Loading branch information
ianfabs authored and trevor-scheer committed Aug 26, 2019
1 parent 4cb2d91 commit 459e109
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/api/apollo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ new ApolloServer({
new ApolloServer({
typeDefs,
resolvers,
rootValue: (documentAST) => ({
rootValue: (documentAST) => {
const op = getOperationAST(documentNode)
return op === 'mutation' ? mutationRoot : queryRoot;
})
}
});
```

Expand Down

0 comments on commit 459e109

Please sign in to comment.