summaryrefslogtreecommitdiff
path: root/tests/functional/graphql/test_graphql.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-05-04 00:16:41 +0200
committerNejc Habjan <nejc.habjan@siemens.com>2022-12-11 13:33:02 +0100
commit097997a6fd4a5e09474b3bffd48d879491018361 (patch)
treee6015c0323b4f597f7241d5d3c4493a934cc2537 /tests/functional/graphql/test_graphql.py
parentc7cf0d1f172c214a11b30622fbccef57d9c86e93 (diff)
downloadgitlab-feat/graphql.tar.gz
feat: add basic GraphQL support (wip)feat/graphql
Diffstat (limited to 'tests/functional/graphql/test_graphql.py')
-rw-r--r--tests/functional/graphql/test_graphql.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/functional/graphql/test_graphql.py b/tests/functional/graphql/test_graphql.py
new file mode 100644
index 0000000..6bba059
--- /dev/null
+++ b/tests/functional/graphql/test_graphql.py
@@ -0,0 +1,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"