From 9f1567876713e1e5d75d5a0815821c58dd835855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Sch=C3=BCler?= Date: Wed, 22 Jun 2016 16:54:16 +0200 Subject: [PATCH] Make it more obvious that `node` is required for relay Give the error message that occurs if you forget the node Field, so googling for this brings you right to the documentation --- docs/pages/docs/relay.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/docs/relay.md b/docs/pages/docs/relay.md index 03dbdee2..fd477da9 100644 --- a/docs/pages/docs/relay.md +++ b/docs/pages/docs/relay.md @@ -54,6 +54,8 @@ class Query(graphene.ObjectType): node = relay.NodeField() ``` +If you encounter an error like `Cannot query field "node" on type "Query"`, you most likely forgot to add the `node` Field. + ## Mutations Most APIs don't just allow you to read data, they also allow you to write. In GraphQL, this is done using mutations. Just like queries, Relay puts some additional requirements on mutations, but Graphene nicely manages that for you. All you need to do is make your mutation a subclass of `relay.ClientIDMutation`.