@@ -11,17 +11,17 @@ schema_def = { description? ~ "schema" ~ directive* ~ schema_selection_set }
1111 schema_field = { schema_key ~ ":" ~ identifier }
1212generic_type_def = { description_variables? ~ description? ~ "type " ~ identifier ~ directive* ~ "=" ~ modified_ref }
1313type_def = { description_variables? ~ description? ~ "type " ~ identifier ~ generic? ~ implements? ~ directive* ~ type_selection_set }
14- implements = { "implements" ~ identifier ~ ("&" ~ identifier)* }
1514 type_selection_set = { "{" ~ (field_with_args | spread_reference)* ~ "}" }
1615generic_input_def = { description_variables? ~ description? ~ "input " ~ identifier ~ directive* ~ "=" ~ modified_ref }
1716input_def = { description_variables? ~ description? ~ "input " ~ identifier ~ generic? ~ directive* ~ input_selection_set }
1817 input_selection_set = { "{" ~ (field_without_args | spread_reference)* ~ "}" }
1918enum_def = { description? ~ "enum " ~ identifier ~ directive* ~ enum_selection_set }
2019 enum_selection_set = { "{" ~ (field_without_args_without_value | spread_reference)* ~ "}" }
21- interface_def = { description? ~ "interface " ~ identifier ~ directive* ~ interface_selection_set }
22- interface_selection_set = { "{" ~ field_with_args* ~ "}" }
20+ interface_def = { description? ~ "interface " ~ identifier ~ implements? ~ directive* ~ interface_selection_set }
21+ interface_selection_set = { "{" ~ (spread_reference | field_with_args) * ~ "}" }
2322scalar_def = { description? ~ "scalar " ~ identifier ~ directive* }
2423union_def = { description? ~ "union " ~ identifier ~ directive* ~ "=" ~ identifier ~ ("|" ~ identifier )* }
24+
2525directive_def = { description? ~"directive" ~ "@" ~ identifier ~ arguments? ~ directive_repeatable? ~ "on" ~ directive_location ~ ("|" ~ directive_location)* }
2626 directive_repeatable = @{ "repeatable" }
2727 directive_location = @{
@@ -46,6 +46,7 @@ directive_def = { description? ~"directive" ~ "@" ~ identifier ~ arguments? ~ di
4646 "VARIABLE_DEFINITION"
4747 }
4848
49+ implements = { "implements" ~ identifier ~ ("&" ~ identifier)* }
4950field_with_args = { description? ~ identifier ~ arguments? ~ ":" ~ value_type ~ directive* }
5051field_without_args = { description? ~ identifier ~ ":" ~ value_type ~ directive* }
5152field_without_args_without_value = { description? ~ identifier ~ directive* }
0 commit comments