Skip to content

Commit 231fa23

Browse files
authored
Merge pull request graphql#623 from coderliu/origin/patch-1
Use new class-based API of graphql-ruby
2 parents 9c26e41 + 189ede7 commit 231fa23

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
@@ -400,15 +400,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
400400
\`\`\`ruby
401401
require 'graphql'
402402
403-
QueryType = GraphQL::ObjectType.define do
404-
name 'Query'
403+
class QueryType < GraphQL::Schema::Object
404+
graphql_name 'Query'
405405
field :hello do
406406
type types.String
407407
resolve -> (obj, args, ctx) { 'Hello world!' }
408408
end
409409
end
410410
411-
Schema = GraphQL::Schema.define do
411+
class Schema < GraphQL::Schema
412412
query QueryType
413413
end
414414

0 commit comments

Comments
 (0)