...

Text file src/github.com/vektah/gqlparser/validator/imported/spec/LoneAnonymousOperation.spec.yml

Documentation: github.com/vektah/gqlparser/validator/imported/spec

     1- name: no operations
     2  rule: LoneAnonymousOperation
     3  schema: 0
     4  query: |2-
     5          
     6          fragment fragA on Type {
     7            field
     8          }
     9          
    10  errors: []
    11- name: one anon operation
    12  rule: LoneAnonymousOperation
    13  schema: 0
    14  query: |2-
    15          
    16          {
    17            field
    18          }
    19          
    20  errors: []
    21- name: multiple named operations
    22  rule: LoneAnonymousOperation
    23  schema: 0
    24  query: |2-
    25          
    26          query Foo {
    27            field
    28          }
    29          
    30          query Bar {
    31            field
    32          }
    33          
    34  errors: []
    35- name: anon operation with fragment
    36  rule: LoneAnonymousOperation
    37  schema: 0
    38  query: |2-
    39          
    40          {
    41            ...Foo
    42          }
    43          fragment Foo on Type {
    44            field
    45          }
    46          
    47  errors: []
    48- name: multiple anon operations
    49  rule: LoneAnonymousOperation
    50  schema: 0
    51  query: |2-
    52          
    53          {
    54            fieldA
    55          }
    56          {
    57            fieldB
    58          }
    59          
    60  errors:
    61    - message: This anonymous operation must be the only defined operation.
    62      locations:
    63        - {line: 2, column: 7}
    64    - message: This anonymous operation must be the only defined operation.
    65      locations:
    66        - {line: 5, column: 7}
    67- name: anon operation with a mutation
    68  rule: LoneAnonymousOperation
    69  schema: 0
    70  query: |2-
    71          
    72          {
    73            fieldA
    74          }
    75          mutation Foo {
    76            fieldB
    77          }
    78          
    79  errors:
    80    - message: This anonymous operation must be the only defined operation.
    81      locations:
    82        - {line: 2, column: 7}
    83- name: anon operation with a subscription
    84  rule: LoneAnonymousOperation
    85  schema: 0
    86  query: |2-
    87          
    88          {
    89            fieldA
    90          }
    91          subscription Foo {
    92            fieldB
    93          }
    94          
    95  errors:
    96    - message: This anonymous operation must be the only defined operation.
    97      locations:
    98        - {line: 2, column: 7}

View as plain text