# From https://graphql-ruby.org/fields/arguments
field :search_posts, [PostType], null: false do
# `argument` called on `self`, depends on the `.bind(GraphQL::Schema::Field)`
argument :category, String
end
field :search_posts, [PostType], null: false do |field|
# `argument` called on `field`, depends on the `.params(field: GraphQL::Schema::Field)`
field.argument :category, String
end
Type of Change
Changes
GraphQL::Schema::HasFields#field
supports an optional argument, in a way that makes both of these legal:graphql
0.13.1
Sorbet typechecker 0.5.11305 git 68535070f161acbb6a5668ecf95114fca3460918 debug_symbols=true clean=1