summaryrefslogtreecommitdiff
path: root/tests/functional/graphql/test_graphql.py
blob: 6bba059e36d864707f0c0b7478f7b9b8e7c59329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from gitlab import GraphQLGitlab


def test_graphql_query_current_user(graphql_gl: GraphQLGitlab):
    query = """
query {
  currentUser {
    username
  }
}
"""
    graphql_gl.enable_debug()
    result = graphql_gl.execute(query)
    assert result["user"]["username"] == "root"