Skip to content

Commit 755f938

Browse files
authored
Merge pull request #707 from code0-tech/656-input-types-doesnt-follow-the-naming-conventions-of-payload-types
Fix some naming conventions
2 parents e62800c + 6f01d20 commit 755f938

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

app/graphql/types/input/flow_setting_input_type.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ module Input
55
class FlowSettingInputType < Types::BaseInputObject
66
description 'Input type for flow settings'
77

8-
argument :flow_setting_id, String, required: true,
9-
description: 'The identifier (not database id) of the flow setting'
8+
argument :flow_setting_identifier, String, required: true,
9+
description: 'The identifier (not database id) of the flow setting'
1010

11-
argument :object, GraphQL::Types::JSON, required: true,
12-
description: 'The value of the flow setting'
11+
argument :value, GraphQL::Types::JSON, required: true,
12+
description: 'The value of the flow setting'
1313
end
1414
end
1515
end

app/graphql/types/input/generic_mapper_input_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Input
55
class GenericMapperInputType < Types::BaseInputObject
66
description 'Input type for generic mappers'
77

8-
argument :sources, [Types::Input::DataTypeIdentifierInputType],
8+
argument :source_data_type_identifiers, [Types::Input::DataTypeIdentifierInputType],
99
required: true, description: 'The source data type identifier for the mapper'
1010

1111
argument :target, String,

app/services/namespaces/projects/flows/create_service.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def execute
2323
settings = []
2424
if params.key?(:flow_settings)
2525
params[:flow_settings].each do |graphql_setting|
26-
setting = FlowSetting.new(flow_setting_id: graphql_setting.flow_setting_id,
27-
object: graphql_setting.object)
26+
setting = FlowSetting.new(flow_setting_id: graphql_setting.flow_setting_identifier,
27+
object: graphql_setting.value)
2828
if setting.invalid?
2929
t.rollback_and_return! ServiceResponse.error(
3030
message: 'Invalid flow setting',

docs/graphql/input_object/flowsettinginput.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Input type for flow settings
88

99
| Name | Type | Description |
1010
|------|------|-------------|
11-
| `flowSettingId` | [`String!`](../scalar/string.md) | The identifier (not database id) of the flow setting |
12-
| `object` | [`JSON!`](../scalar/json.md) | The value of the flow setting |
11+
| `flowSettingIdentifier` | [`String!`](../scalar/string.md) | The identifier (not database id) of the flow setting |
12+
| `value` | [`JSON!`](../scalar/json.md) | The value of the flow setting |

docs/graphql/input_object/genericmapperinput.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Input type for generic mappers
88

99
| Name | Type | Description |
1010
|------|------|-------------|
11-
| `sources` | [`[DataTypeIdentifierInput!]!`](../input_object/datatypeidentifierinput.md) | The source data type identifier for the mapper |
11+
| `sourceDataTypeIdentifiers` | [`[DataTypeIdentifierInput!]!`](../input_object/datatypeidentifierinput.md) | The source data type identifier for the mapper |
1212
| `target` | [`String!`](../scalar/string.md) | The target data type identifier for the mapper |

spec/requests/graphql/mutation/namespace/projects/flows/create_mutation_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
type: flow_type.to_global_id.to_s,
6262
startingNodeId: 'gid://sagittarius/NodeFunction/999',
6363
settings: {
64-
flowSettingId: 'key',
65-
object: {
64+
flowSettingIdentifier: 'key',
65+
value: {
6666
'key' => 'value',
6767
},
6868
},

0 commit comments

Comments
 (0)