lib/graphql/language/parser.y in graphql-1.13.4 vs lib/graphql/language/parser.y in graphql-1.13.5

- old
+ new

@@ -145,18 +145,20 @@ | DIRECTIVE name_without_on: IDENTIFIER | FRAGMENT + | REPEATABLE | TRUE | FALSE | operation_type | schema_keyword enum_name: /* any identifier, but not "true", "false" or "null" */ IDENTIFIER | FRAGMENT + | REPEATABLE | ON | operation_type | schema_keyword enum_value_definition: @@ -420,12 +422,16 @@ description_opt INPUT name directives_list_opt LCURLY input_value_definition_list RCURLY { result = make_node(:InputObjectTypeDefinition, name: val[2], directives: val[3], fields: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1]) } directive_definition: - description_opt DIRECTIVE DIR_SIGN name arguments_definitions_opt ON directive_locations { - result = make_node(:DirectiveDefinition, name: val[3], arguments: val[4], locations: val[6], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1]) + description_opt DIRECTIVE DIR_SIGN name arguments_definitions_opt directive_repeatable_opt ON directive_locations { + result = make_node(:DirectiveDefinition, name: val[3], arguments: val[4], locations: val[7], repeatable: !!val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1]) } + + directive_repeatable_opt: + /* nothing */ + | REPEATABLE directive_locations: name { result = [make_node(:DirectiveLocation, name: val[0].to_s, position_source: val[0])] } | directive_locations PIPE name { val[0] << make_node(:DirectiveLocation, name: val[2].to_s, position_source: val[2]) } end