Skip to content

Commit

Permalink
Reference promises for resolve func
Browse files Browse the repository at this point in the history
In response to graphql#27 and SO questions. I don't believe there is "official" documentation (besides in issues and tests) of Promise support in the resolve function. Totally willing to be wrong :)
  • Loading branch information
chrisbolin committed Mar 22, 2016
1 parent 57d71e1 commit a747503
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ var schema = new GraphQLSchema({
```

This defines a simple schema with one type and one field, that resolves
to a fixed value. A more complex example is included in the top level
[tests](src/__tests__) directory.
to a fixed value. The `resolve` function can return a value, a promise,
or an array of promises. A more complex example is included in the top
level [tests](src/__tests__) directory.

Then, serve the result of a query against that type schema.

Expand Down

0 comments on commit a747503

Please sign in to comment.