Class: Graphqlmd::Graphqlmd
- Inherits:
-
Object
- Object
- Graphqlmd::Graphqlmd
- Includes:
- Graphqlmd
- Defined in:
- lib/graphqlmd.rb
Constant Summary
Constants included from Graphqlmd
CLIENT_MUTATION_ID, IGNORED_OBJECT_NAMES, LIST, NON_NULL, SCALAR, SCHEMA_QUERY, VERSION
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ Graphqlmd
constructor
A new instance of Graphqlmd.
Constructor Details
#initialize(options) ⇒ Graphqlmd
Returns a new instance of Graphqlmd.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/graphqlmd.rb', line 10 def initialize @url = [:url] @title = [:title] @note = [:note] @is_hide_client_mutation_id = [:is_hide_client_mutation_id] @is_hide_table_of_contents = [:is_hide_table_of_contents] @is_hide_deprecated = [:is_hide_deprecated] @is_hide_scalar = [:is_hide_scalar] @is_allow_links = [:is_allow_links] @is_vuepress = [:is_vuepress] @ignored_queries = [:ignored_queries] @ignored_mutations = [:ignored_mutations] @ignored_objects = [:ignored_objects] end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/graphqlmd.rb', line 25 def call response = fetch_schema data = JSON.parse(response.body).dig 'data', 'schema' puts_title puts_note puts_top_table_of_contents puts_queries data['queries'] puts_mutations data['mutations'] puts_objects data['types'] end |