-
-
Save hash32bot/88b8bb5a79481dd55f677e5fce3d892e to your computer and use it in GitHub Desktop.
Root Query - Sinatra App http://bit.ly/2V9p6OL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'graphql' | |
require_relative 'types/speaker' | |
class QueryType < GraphQL::Schema::Object | |
description "The query root of this schema" | |
field :speakers, [Types::Speaker], null: false do | |
description 'Get all speakers of the system' | |
end | |
def speakers | |
Speaker.all | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment