<commit_before>import { makeExecutableSchema } from'graphql-tools';

import Activity from './types/activity';
import Gamer from './types/gamer';
import Like from './types/like';
import Dislike from './types/dislike';
import ActivityComment from './types/comment';

import resolvers from './resolvers'

const RootQuery = `
  type RootQuery {
    activity(activityId: String!): Activity
    gamer(id: String!): Gamer
  }

  type RootMutation {
    createGamer(gamer: GamerInput!): Gamer
    submitActivity(activity: ActivityInput!): Activity
    deleteActivity(activityId: String!): Activity
    likeActivity(like: LikeInput!, activityId: String!): Like
    dislikeActivity(dislike: DislikeInput!, activityId: String!): Dislike
    commentActivity(comment: CommentInput!, activityId: String!): ActivityComment
  }
`;

const SchemaDef = `
  schema {
    query: RootQuery
    mutation: RootMutation
  }
`;

const InputDef = `
  input GamerInput {
    id: String!
    username: String!
    domainPic: String!
    isNewGamer: Boolean!
  }

  input ActivityInput {
    activityId: String!
    content: String!
    createdAt: String!
    activityType: String!
    creator: String!
    votes: Int!
  }

  input LikeInput {
    id: String!
    activityId: String!
    response: Int!
    voter: String!
    timeVoted: String!
  }

  input DislikeInput {
    id: String!
    activityId: String!
    response: Int!
    voter: String!
    timeVoted: String!
  }

  input CommentInput {
    id: String!
    activityId: String!
    content: String!
    commentor: String!
    timeCommented: String!
  }
`;

const schema = makeExecutableSchema({
  typeDefs: [SchemaDef, RootQuery, Activity, Gamer, InputDef, Like, Dislike, ActivityComment],
  resolvers,
});

export default schema;<commit_msg>challenge mutations<commit_after>import { makeExecutableSchema } from'graphql-tools';

import Activity from './types/activity';
import Gamer from './types/gamer';
import Like from './types/like';
import Dislike from './types/dislike';
import ActivityComment from './types/comment';
import Challenge from './types/challenge';

import resolvers from './resolvers'

const RootQuery = `
  type RootQuery {
    activity(activityId: String!): Activity
    gamer(id: String!): Gamer
  }

  type RootMutation {
    createGamer(gamer: GamerInput!): Gamer
    submitActivity(activity: ActivityInput!): Activity
    deleteActivity(activityId: String!): Activity
    updateActivity(activityId: String!, activity: ActivityUpdateInput!): Activity
    likeActivity(like: LikeInput!, activityId: String!): Like
    dislikeActivity(dislike: DislikeInput!, activityId: String!): Dislike
    commentActivity(comment: CommentInput!, activityId: String!): ActivityComment
    createChallenge(challenge: ChallengeInput!): Challenge
    deleteChallenge(id: String!): Challenge
  }
`;

const SchemaDef = `
  schema {
    query: RootQuery
    mutation: RootMutation
  }
`;

const InputDef = `
  input GamerInput {
    id: String!
    username: String!
    domainPic: String!
    isNewGamer: Boolean!
  }

  input ActivityInput {
    activityId: String!
    content: String!
    createdAt: String!
    activityType: String!
    creator: String!
  }

  input ActivityUpdateInput {
    content: String!
  }

  input LikeInput {
    id: String!
    activityId: String!
    response: Int!
    voter: String!
    timeVoted: String!
  }

  input DislikeInput {
    id: String!
    activityId: String!
    response: Int!
    voter: String!
    timeVoted: String!
  }

  input CommentInput {
    id: String!
    activityId: String!
    content: String!
    commentor: String!
    timeCommented: String!
  }

  input ChallengeInput {
    id: String!
    creator: String!
    timeCreated: String!
    participants: [String!]
    game: String!
    objective: String!
    goal: Int
    timeStart: String!
    timeEnd: String!
    placements: [String]
    rewards: [String!]
  }
`;

const schema = makeExecutableSchema({
  typeDefs: [SchemaDef, RootQuery, Activity, Gamer, InputDef, Like, Dislike, ActivityComment, Challenge],
  resolvers,
});

export default schema;
{'fraction_non_alphanumeric': 0.10648148148148148, 'fraction_numerical': 0.0, 'mean_word_length': 3.659477866061294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6763334', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1238, 'n_words': 338}