Class: GraphqlRails::Router::BuildSchemaActionType::SchemaActionType

Inherits:
GraphQL::Schema::Object
  • Object
show all
Defined in:
lib/graphql_rails/router/build_schema_action_type.rb

Class Method Summary collapse

Class Method Details

.fields_for_nested_routes(type_name_prefix:, scoped_routes:) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/graphql_rails/router/build_schema_action_type.rb', line 16

def fields_for_nested_routes(type_name_prefix:, scoped_routes:)
  routes_by_scope = scoped_routes.dup
  unscoped_routes = routes_by_scope.delete(ROUTES_KEY) || []

  scoped_only_fields(type_name_prefix, routes_by_scope)
  unscoped_routes.each { route_field(_1) }
end

.inspectObject



11
12
13
# File 'lib/graphql_rails/router/build_schema_action_type.rb', line 11

def self.inspect
  "#{GraphQL::Schema::Object}(#{graphql_name})"
end