From f6bad994276a4e7dd7c0b7825e548656efe40d6c Mon Sep 17 00:00:00 2001 From: Carlos Date: Mon, 6 Feb 2023 09:24:00 -0300 Subject: [PATCH] Create rails-graphql.md --- .../ruby/server/rails-graphql.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/content/code/language-support/ruby/server/rails-graphql.md diff --git a/src/content/code/language-support/ruby/server/rails-graphql.md b/src/content/code/language-support/ruby/server/rails-graphql.md new file mode 100644 index 0000000000..6adebdf042 --- /dev/null +++ b/src/content/code/language-support/ruby/server/rails-graphql.md @@ -0,0 +1,21 @@ +--- +name: Rails GraphQL +description: A Fresh new GraphQL server for Rails applications, with a focus on natural and Ruby-like DSL +url: https://www.rails-graphql.dev/ +github: virtualshield/rails-graphql +gem: rails-graphql +--- + +```ruby +require 'rails-graphql' + +class GraphQL::AppSchema < GraphQL::Schema + query_fields do + field(:hello).resolve { 'Hello World!' } + end +end + +puts GraphQL::AppSchema.execute('{ hello }') +``` + +Less is more! Please check it out the [docs](https://www.rails-graphql.dev/?utm_source=graphql_org).