Git Product home page Git Product logo

gatsby-source-gitlab's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.