Skip to content
Gatsby.js source plugin for loading information from GitLab
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.prettierrc
gatsby-node.js
license
package.json
readme.md
yarn.lock

readme.md

gatsby-source-gitlab

Gatsby.js source plugin for loading information from GitLab

Learn more about Gatsby and its plugins here: https://www.gatsbyjs.org/docs/plugins/

See it live on the example site! Source Code for the example site.

Install

npm install gatsby-source-gitlab
# OR
yarn add gatsby-source-gitlab

How to use

// gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-gitlab`,
    options: {
      // You can get your access token on your GitLab profile
      accessToken: 'your access token here',
    }
  },
]

GraphQL Queries

To see all possible queries please use the GraphiQL editor which is available under http://localhost:8000/___graphql

Get all projects of the user:

query {
  allGitlabProjects {
    edges {
      node {
        id
        name
        description
        created_at
        visibility
        default_branch
        web_url
        readme_url
        owner {
          id
          name
        }
        forks_count
        star_count
        archived
        import_status
        name_with_namespace
        path_with_namespace
        path
        last_activity_at
        creator_id
        namespace {
          id
          name
          path
          kind
          full_path
        }
        _links {
          self
          issues
          merge_requests
          repo_branches
          labels
          events
          members
        }
      }
    }
  }
}

Get all user information:

query {
  gitlabUser {
    id
    name
    email
    username
    bio
    state
    avatar
    location
    website
    profile_url
    organization
    socialMedia {
      skype
      twitter
      linkedin
    }
  }
}

License

MIT © Byurhan Beyzat.
Buy me a coffee

You can’t perform that action at this time.