Skip to content

Commit 375f7ad

Browse files
KnerioTaucher2003
andauthored
Apply suggestions from code review
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com> Signed-off-by: Dario Pranjic <96529060+Knerio@users.noreply.github.com>
1 parent 043a95e commit 375f7ad

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

app/graphql/sagittarius_schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class SagittariusSchema < GraphQL::Schema
55
mutation(Types::MutationType)
66
query(Types::QueryType)
77

8-
default_max_page_size 120
8+
default_max_page_size 50
99
max_depth 20
1010
connections.add(ActiveRecord::Relation, Sagittarius::Graphql::StableConnection)
1111

app/graphql/types/runtime_function_definition_type.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Types
44
class RuntimeFunctionDefinitionType < Types::BaseObject
55
description 'Represents a runtime function definition'
66

7-
authorize :read_runtime
7+
authorize :read_runtime_function_definition
88

99
field :runtime, Types::RuntimeType,
1010
null: false, description: 'The runtime this runtime function definition belongs to'
@@ -13,7 +13,7 @@ class RuntimeFunctionDefinitionType < Types::BaseObject
1313
null: true,
1414
description: 'Function definitions of the runtime function definition'
1515

16-
field :parameters, Types::RuntimeParameterDefinitionType.connection_type,
16+
field :runtime_parameter_definitions, Types::RuntimeParameterDefinitionType.connection_type,
1717
null: true,
1818
description: 'Parameter definitions of the runtime function definition'
1919

app/graphql/types/runtime_parameter_definition_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Types
44
class RuntimeParameterDefinitionType < Types::BaseObject
55
description 'Represents a runtime parameter definition'
66

7-
authorize :read_runtime
7+
authorize :read_runtime_parameter_definition
88

99
field :identifier, String,
1010
null: false,

app/policies/runtime_policy.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ class RuntimePolicy < BasePolicy
55

66
rule { can?(:read_runtime) }.policy do
77
enable :read_data_type
8+
enable :read_runtime_function_definition
9+
enable :read_runtime_parameter_definition
810
end
911
end

0 commit comments

Comments
 (0)