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"