Skip to main content
The GitLab integration is a powerful feature that bridges your GraphQL schema management with your development workflow. This integration allows you to automatically sync schema in proposals with GitLab projects, streamlining your development process and keeping your schemas in sync with your codebase.

Setup and Configuration

1

Navigate to the "Integrations" tab under "Settings".

2

Click on the "Connect GitLab" button.

GitLab Integration
3

You will be redirected to GitLab to authorize the WunderGraph Hub application.

Grant the necessary permissions (api, read_repository, write_repository) to allow the integration to manage your projects.
4

Once authorized, you will be redirected back to the WunderGraph Hub.

5

Now you can navigate to any of your graphs, click on the dropdown on the top left corner, select "Integrations" and select "Git".

Graph GitLab Settings
6

You can now select the projects you want to connect to the subgraphs in WunderGraph Hub.

7

Once you have selected the projects, you can click on the "Save Mappings" button to connect the projects to the subgraphs in WunderGraph Hub.

This will create initialization MRs in all the selected projects with the respective subgraph schema.Graph GitLab Mappings

Merge Request Lifecycle

The GitLab integration automatically synchronizes merge request states with your schema proposal status, ensuring your development workflow stays aligned with your schema management process. Merge Request State Management:
StateBehavior
Ready for ReviewWhen a proposal is created in opened state, a merge request is automatically created in “ready for review” state across all mapped projects.
DraftWhen a proposal is moved to draft state, the merge request transitions to draft state.
ClosedWhen the proposal is closed, the corresponding merge request is also closed.
ReopenedIf a closed proposal is reopened, the merge request is also reopened.

How It Works

Streamlined Development Workflow

The GitLab integration eliminates the friction between schema design and implementation by automatically creating branches in your mapped projects whenever a schema proposal is made. This means developers can immediately start implementing changes without manual setup.

Automatic Merge Request Creation

When a schema proposal is created in the hub, the integration automatically:
  • Creates a new branch in the mapped project
  • Stores the proposed schema files directly in the branch
  • Creates a merge request with the schema changes on new changes after creating a proposal or by opening the proposal.