Replace this template with your information
Describe your question in as much detail as possible:
-
What are you seeing, and how does it differ from what you expect to see?
- When running a GraphQL Request, I get the error
{"errors":[{"message":"No query string was present"}]}
- When running a GraphQL Request, I get the error
-
Consider including screenshots, error messages, and/or other helpful visuals
- Full Request command
curl https://gitlab.com/api/graphql -H "Authorization: Bearer $GITLAB_TOKEN" -H 'Conent-Type: application/json' --data '{ "query": "{ currentUser { bot } }" }'
-
What version are you on (Hint:
/help
) ? and are you using self-managed or gitlab.com?- I am running my request against gitlab.com
-
What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
- I have tried running my command in the GraphQL Explorer and it runs successfully.
- I have searched on Bing and Google, but was not able to find any satisfactory results. The closest I was able to find were java - GraphQL api consuming with spring boot Resttemplate resulting in {"errors":[{"message":"No query string was present"}]} always - Stack Overflow and No query string was present- GraphQL Javascript - Stack Overflow, neither of which helped me.
- I have also tried
curl https://gitlab.com/api/graphql -H "Authorization: Bearer $GITLAB_TOKEN" -H 'Conent-Type: application/graphql' --data 'currentUser { bot }'
but got the same result.
- Additional information
cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=21.04 DISTRIB_CODENAME=hirsute DISTRIB_DESCRIPTION="Ubuntu 21.04" NAME="Ubuntu" VERSION="21.04 (Hirsute Hippo)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 21.04" VERSION_ID="21.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=hirsute UBUNTU_CODENAME=hirsute
curl --version
curl 7.74.0 (x86_64-pc-linux-gnu) libcurl/7.74.0 OpenSSL/1.1.1j zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh/0.9.5/openssl/zlib nghttp2/1.43.0 librtmp/2.3
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
Thanks for taking the time to be thorough in your request, it really helps!