Skip to content

Commit 75f84e4

Browse files
authored
graphql: Add 'as' option to argument method signature (#981)
* graphql: Add test for argument method with 'as' option * graphql: Add 'as' option to argument method signature
1 parent d524dec commit 75f84e4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

gems/graphql/1.12/_test/test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def ping = context[:ping]
5454

5555
field :article, String, null: false do
5656
argument :id, ID, required: true
57+
argument :external_id, ID, required: false, as: :internal_id
5758
end
5859

5960
field :error_field, String, null: false

gems/graphql/1.12/graphql.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module GraphQL
1515
?default_value: untyped,
1616
?description: String,
1717
?validates: Hash[untyped, untyped],
18+
?as: Symbol,
1819
) ?{ (*untyped) -> void } -> void
1920
end
2021

0 commit comments

Comments
 (0)