Skip to content

Commit f1c675c

Browse files
authored
Merge pull request graphql#646 from ohler55/patch-1
Add Agoo to the list of Ruby Servers
2 parents b189dd2 + 47b0037 commit f1c675c

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
@@ -530,6 +530,40 @@ puts Schema.execute('{ hello }').to_json
530530
531531
There are also nice bindings for Relay and Rails.
532532
533+
#### [Agoo](https://github.com/ohler55/agoo)
534+
535+
A high performance web server with support for GraphQL. Agoo strives for a simple, easy to use API for GraphQL.
536+
537+
\`\`\`ruby
538+
require 'agoo'
539+
540+
class Query
541+
def hello
542+
'hello'
543+
end
544+
end
545+
546+
class Schema
547+
attr_reader :query
548+
549+
def initialize
550+
@query = Query.new()
551+
end
552+
end
553+
554+
Agoo::Server.init(6464, 'root', thread_count: 1, graphql: '/graphql')
555+
Agoo::Server.start()
556+
Agoo::GraphQL.schema(Schema.new) {
557+
Agoo::GraphQL.load(%^type Query { hello: String }^)
558+
}
559+
sleep
560+
561+
# To run this GraphQL example type the following then go to a browser and enter
562+
# a URL of localhost:6464/graphql?query={hello}
563+
#
564+
# ruby hello.rb
565+
\`\`\`
566+
533567
### Rust
534568
535569
- [graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust

0 commit comments

Comments
 (0)