We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9c26e41 + 189ede7 commit 231fa23Copy full SHA for 231fa23
site/code/index.html.js
@@ -400,15 +400,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
400
\`\`\`ruby
401
require 'graphql'
402
403
-QueryType = GraphQL::ObjectType.define do
404
- name 'Query'
+class QueryType < GraphQL::Schema::Object
+ graphql_name 'Query'
405
field :hello do
406
type types.String
407
resolve -> (obj, args, ctx) { 'Hello world!' }
408
end
409
410
411
-Schema = GraphQL::Schema.define do
+class Schema < GraphQL::Schema
412
query QueryType
413
414
0 commit comments