# Path: gql/gql.py
# def gql(request_string: str) -> DocumentNode:
#     """Given a String containing a GraphQL request, parse it into a Document.
# 
#     :param request_string: the GraphQL request as a String
#     :type request_string: str
#     :return: a Document which can be later executed or subscribed by a
#         :class:`Client <gql.client.Client>`, by an
#         :class:`async session <gql.client.AsyncClientSession>` or by a
#         :class:`sync session <gql.client.SyncClientSession>`
# 
#     :raises GraphQLError: if a syntax error is encountered.
#     """
#     source = Source(request_string, "GraphQL request")
#     return parse(source)


from gql import gql
        ...NameAndAppearances
        friends {
          ...NameAndAppearances
          friends {
            ...NameAndAppearances
          }
        }
      }
    }
    fragment NameAndAppearances on Character {
      name
      appearsIn
    }
''')

gql('''
    query HeroSpaceshipQuery {
      hero {
        favoriteSpaceship
      }
    }
''') # GQL101: Cannot query field "favoriteSpaceship" on type "Character".

gql('''
    query HeroNoFieldsQuery {
      hero
    }
''') # GQL101: Field "hero" of type "Character" must have a sub selection.



# Path: gql/gql.py
# def gql(request_string: str) -> DocumentNode:
#     """Given a String containing a GraphQL request, parse it into a Document.
# 
#     :param request_string: the GraphQL request as a String
#     :type request_string: str
#     :return: a Document which can be later executed or subscribed by a
#         :class:`Client <gql.client.Client>`, by an
#         :class:`async session <gql.client.AsyncClientSession>` or by a
#         :class:`sync session <gql.client.SyncClientSession>`
# 
#     :raises GraphQLError: if a syntax error is encountered.
#     """
#     source = Source(request_string, "GraphQL request")
#     return parse(source)


# Path: gql-checker/tests/test_cases/validation.py
from gql import gql

        ...NameAndAppearances
        friends {
          ...NameAndAppearances
          friends {
            ...NameAndAppearances
          }
        }
      }
    }
    fragment NameAndAppearances on Character {
      name
      appearsIn
    }
''')

gql('''
    query HeroSpaceshipQuery {
      hero {
        favoriteSpaceship
      }
    }
''') # GQL101: Cannot query field "favoriteSpaceship" on type "Character".

gql('''
    query HeroNoFieldsQuery {
      hero
    }
''') # GQL101: Field "hero" of type "Character" must have a sub selection.



gql('''