Skip to content

Commit 4c83d69

Browse files
authored
Fix graphene example
1 parent 5c2a863 commit 4c83d69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/code/index.html.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ Then run \`python hello.py\` with this code in \`hello.py\`:
320320
import graphene
321321
322322
class Query(graphene.ObjectType):
323-
hello = graphene.String()
323+
hello = graphene.String(name=graphene.String(default_value="stranger"))
324324
325-
def resolve_hello(self, args, context, info):
326-
return 'Hello world!'
325+
def resolve_hello(self, info, name):
326+
return 'Hello ' + name
327327
328328
schema = graphene.Schema(query=Query)
329329
result = schema.execute('{ hello }')

0 commit comments

Comments
 (0)