Skip to content

Commit

Permalink
docs(queries): Fix throwing exception problem (#850)
Browse files Browse the repository at this point in the history
* docs(queries): Fix throwing exception problem

* fix routes

* use Graphql Erorr
  • Loading branch information
joaogarin authored and pmelab committed Oct 30, 2019
1 parent 9209b65 commit 2e295ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/queries/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Now we have an "Article" type in the schema with three fields `id`, `label` and
To add the resolvers we go to our schema implementation and call the appropriate data producers inside the `getResolverRegistry` method. Because our types are extending a common `NodeInterface` we need to also tell what to resolve for a particular type, otherwise it could be an Article or a Page.

```php
use GraphQL\Error\Error;
...

/**
* {@inheritdoc}
*/
Expand Down
3 changes: 3 additions & 0 deletions doc/queries/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ In this schema we can see that we can query a node by its route, that takes a pa
To add the resolvers we go to our schema implementation and call the appropriate data producers inside the `getResolverRegistry` method.

```php
use GraphQL\Error\Error;
...

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 2e295ee

Please sign in to comment.