Skip to content

Commit 189ede7

Browse files
committed
Use new class-based API of graphql-ruby
[Intro of new class-based API](http://graphql-ruby.org/schema/class_based_api)
1 parent 8865126 commit 189ede7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

site/code/index.html.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ A full implementation of the GraphQL specification that aims to maintain externa
129129
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
130130
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
131131
132-
### Groovy
132+
### Groovy
133133
134134
#### [gorm-graphql](https://github.com/grails/gorm-graphql/)
135135
136136
**Core Library** - The GORM GraphQL library provides functionality to generate a GraphQL schema based on your GORM entities. In addition to mapping domain classes to a GraphQL schema, the core library also provides default implementations of "data fetchers" to query, update, and delete data through executions of the schema.
137137
138-
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
138+
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
139139
140140
- Provides a controller to receive and respond to GraphQL requests through HTTP, based on their guidelines.
141141
- Generates the schema at startup with spring bean configuration to make it easy to extend.
@@ -145,7 +145,7 @@ A full implementation of the GraphQL specification that aims to maintain externa
145145
146146
See [the documentation](https://grails.github.io/gorm-graphql/latest/guide/index.html) for more information.
147147
148-
#### [GQL](https://grooviter.github.io/gql/)
148+
#### [GQL](https://grooviter.github.io/gql/)
149149
150150
GQL is a Groovy library for GraphQL
151151
@@ -397,15 +397,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
397397
\`\`\`ruby
398398
require 'graphql'
399399
400-
QueryType = GraphQL::ObjectType.define do
401-
name 'Query'
400+
class QueryType < GraphQL::Schema::Object
401+
graphql_name 'Query'
402402
field :hello do
403403
type types.String
404404
resolve -> (obj, args, ctx) { 'Hello world!' }
405405
end
406406
end
407407
408-
Schema = GraphQL::Schema.define do
408+
class Schema < GraphQL::Schema
409409
query QueryType
410410
end
411411

0 commit comments

Comments
 (0)