Skip to content

Commit 056aa4d

Browse files
authored
Add Agoo to the list of Ruby Servers
1 parent c0cc5e1 commit 056aa4d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

site/code/index.html.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,40 @@ puts Schema.execute('{ hello }').to_json
414414
415415
There are also nice bindings for Relay and Rails.
416416
417+
#### [Agoo](https://github.com/ohler55/agoo)
418+
419+
A high performance web server with support for GraphQL. Agoo strives for a simple, easy to use API for GraphQL.
420+
421+
\`\`\`ruby
422+
require 'agoo'
423+
424+
class Query
425+
def hello
426+
'hello'
427+
end
428+
end
429+
430+
class Schema
431+
attr_reader :query
432+
433+
def initialize
434+
@query = Query.new()
435+
end
436+
end
437+
438+
Agoo::Server.init(6464, 'root', thread_count: 1, graphql: '/graphql')
439+
Agoo::Server.start()
440+
Agoo::GraphQL.schema(Schema.new) {
441+
Agoo::GraphQL.load(%^type Query { hello: String }^)
442+
}
443+
sleep
444+
445+
# To run this GraphQL example type the following then go to a browser and enter
446+
# a URL of localhost:6464/graphql?query={hello}
447+
#
448+
# ruby hello.rb
449+
\`\`\`
450+
417451
### Scala
418452
419453
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)): A Scala GraphQL library that supports [Relay](https://facebook.github.io/relay/).

0 commit comments

Comments
 (0)