Class: GraphqlRails::DumpGraphqlSchema
- Inherits:
-
Object
- Object
- GraphqlRails::DumpGraphqlSchema
- Defined in:
- lib/graphql_rails/tasks/dump_graphql_schema.rb
Overview
Generates graphql schema dump files
Defined Under Namespace
Classes: MissingGraphqlRouterError
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(group:, router:, dump_dir: nil) ⇒ DumpGraphqlSchema
constructor
A new instance of DumpGraphqlSchema.
Constructor Details
#initialize(group:, router:, dump_dir: nil) ⇒ DumpGraphqlSchema
Returns a new instance of DumpGraphqlSchema.
14 15 16 17 18 |
# File 'lib/graphql_rails/tasks/dump_graphql_schema.rb', line 14 def initialize(group:, router:, dump_dir: nil) @group = group @router = router @dump_dir = dump_dir end |
Class Method Details
.call(**args) ⇒ Object
10 11 12 |
# File 'lib/graphql_rails/tasks/dump_graphql_schema.rb', line 10 def self.call(**args) new(**args).call end |
Instance Method Details
#call ⇒ Object
20 21 22 |
# File 'lib/graphql_rails/tasks/dump_graphql_schema.rb', line 20 def call File.write(schema_path, schema_dump) end |