...

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

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

     1- name: with only operation
     2  rule: ExecutableDefinitions
     3  schema: 0
     4  query: |2-
     5          
     6          query Foo {
     7            dog {
     8              name
     9            }
    10          }
    11          
    12  errors: []
    13- name: with operation and fragment
    14  rule: ExecutableDefinitions
    15  schema: 0
    16  query: |2-
    17          
    18          query Foo {
    19            dog {
    20              name
    21              ...Frag
    22            }
    23          }
    24          
    25          fragment Frag on Dog {
    26            name
    27          }
    28          
    29  errors: []
    30- name: with type definition
    31  rule: ExecutableDefinitions
    32  schema: 0
    33  query: |2-
    34          
    35          query Foo {
    36            dog {
    37              name
    38            }
    39          }
    40          
    41          type Cow {
    42            name: String
    43          }
    44          
    45          extend type Dog {
    46            color: String
    47          }
    48          
    49  errors:
    50    - message: The Cow definition is not executable.
    51      locations:
    52        - {line: 8, column: 7}
    53    - message: The Dog definition is not executable.
    54      locations:
    55        - {line: 12, column: 7}
    56- name: with schema definition
    57  rule: ExecutableDefinitions
    58  schema: 0
    59  query: |2-
    60          
    61          schema {
    62            query: Query
    63          }
    64          
    65          type Query {
    66            test: String
    67          }
    68          
    69          extend schema @directive
    70          
    71  errors:
    72    - message: The schema definition is not executable.
    73      locations:
    74        - {line: 2, column: 7}
    75    - message: The Query definition is not executable.
    76      locations:
    77        - {line: 6, column: 7}
    78    - message: The schema definition is not executable.
    79      locations:
    80        - {line: 10, column: 7}

View as plain text