From 2e295eefd667af3fa32834ee745d2167b76b7bb2 Mon Sep 17 00:00:00 2001 From: Joao Garin Date: Wed, 30 Oct 2019 10:32:52 +0000 Subject: [PATCH] docs(queries): Fix throwing exception problem (#850) * docs(queries): Fix throwing exception problem * fix routes * use Graphql Erorr --- doc/queries/nodes.md | 3 +++ doc/queries/routes.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/doc/queries/nodes.md b/doc/queries/nodes.md index 13736270f..b21224bfe 100644 --- a/doc/queries/nodes.md +++ b/doc/queries/nodes.md @@ -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} */ diff --git a/doc/queries/routes.md b/doc/queries/routes.md index 8b5a9f003..a4e82a310 100644 --- a/doc/queries/routes.md +++ b/doc/queries/routes.md @@ -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} */