Authenticating with GraphQL
A GraphQL request can be made as a POST request to /api/graphql with the query as the payload. You can authorize your request by generating a personal access token to use as a bearer token.
To obtain your GitLab personal access token, head over to: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
query Group {
group(fullPath: "gitlab-org") {
id
name
projects {
nodes {
name
}
}
}
}
query ProjectIssue {
project(fullPath: "gitlab-org/graphql-sandbox") {
name
issue(iid: "2") {
title
}
}
}
query Test{
project(fullPath: "gitlab-org/graphql-sandbox") {
name
issues(first: 2) {
edges {
node {
title
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}