{"size": 448, "ext": "js", "max_stars_repo_path": "src/graphql/queries/period/single.js", "max_stars_repo_name": "marcusvieira88/football-team-manager-be", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/graphql/queries/period/single.js", "max_issues_repo_name": "marcusvieira88/football-team-manager-be", "max_issues_repo_issues_event_min_datetime": "2021-05-08T07:06:51.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-08T07:06:51.000Z", "max_forks_repo_path": "src/graphql/queries/period/single.js", "max_forks_repo_name": "marcusvieira88/football-team-manager-backend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 23.5789473684, "max_line_length": 56, "alphanum_fraction": 0.5602678571}
import {GraphQLID, GraphQLNonNull} from 'graphql';
import periodType from '../../types/period/period';
import PeriodSchema from '../../../models/PeriodSchema';

export default {
    type: periodType,
    args: {
        id: {
            name: 'id',
            type: new GraphQLNonNull(GraphQLID)
        }
    },
    resolve(root, params, ctx, options) {

        return PeriodSchema
            .findById(params.id)
            .exec();
    }
};