wikimedia/mediawiki-extensions-Wikibase

View on GitHub
build/dist-size/analyze/queries/getCommits.js

Summary

Maintainability
A
0 mins
Test Coverage
'use strict';

const gql = require( 'apollo-boost' ).gql;

module.exports = function () {
    return gql`
        query getCommitOid( $repoOwner: String!, $repoName: String!, $filePath: String!, $endCursor: String ) {
            repository( owner: $repoOwner, name: $repoName ) {
                defaultBranchRef {
                    target {
                        ... on Commit {
                            history( first: 100, after: $endCursor, path: $filePath ) {
                                nodes {
                                    committedDate
                                    oid
                                    messageHeadline
                                }
                                pageInfo {
                                    hasNextPage
                                    endCursor
                                }
                            }
                        }
                    }
                }
            }
        }
    `;
};