Class: GraphQL::Repl
- Inherits:
-
Object
- Object
- GraphQL::Repl
- Defined in:
- lib/graph_ql/repl.rb
Instance Method Summary collapse
-
#initialize(schema) ⇒ Repl
constructor
A new instance of Repl.
- #run ⇒ Object
Constructor Details
#initialize(schema) ⇒ Repl
Returns a new instance of Repl.
3 4 5 |
# File 'lib/graph_ql/repl.rb', line 3 def initialize(schema) @schema = schema end |
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/graph_ql/repl.rb', line 7 def run puts "Starting a repl for schema (type 'quit' to exit)" while line = gets do if line == "quit\n" exit end execute_query(line) end end |