{"size": 691, "ext": "js", "max_stars_repo_path": "src/schema/index.js", "max_stars_repo_name": "estrada9166/graphql-basics", "max_stars_repo_stars_event_min_datetime": "2018-04-10T23:27:39.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-07T08:13:20.000Z", "max_issues_repo_path": "src/schema/index.js", "max_issues_repo_name": "estrada9166/graphql-basics", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/schema/index.js", "max_forks_repo_name": "estrada9166/graphql-basics", "max_forks_repo_forks_event_min_datetime": "2018-06-26T09:01:58.000Z", "max_forks_repo_forks_event_max_datetime": "2018-06-26T09:01:58.000Z"}
{"max_stars_count": 10, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 22.2903225806, "max_line_length": 70, "alphanum_fraction": 0.7250361795}
const { GraphQLSchema, GraphQLObjectType } = require('graphql')

// Import queries
const GetUser = require('./queries/getUser')

// Import mutations
const AddNewUserMutation = require('./mutations/addUser')
const AddVisitedPlaceMutation = require('./mutations/addVisitedPlace')

const RootQueryType = new GraphQLObjectType({
  name: 'RootQuery',
  fields: () => ({
    user: GetUser
  })
})

const RootMutationType = new GraphQLObjectType({
  name: 'RootMutation',
  fields: () => ({
    AddUser: AddNewUserMutation,
    AddVisitedPlace: AddVisitedPlaceMutation
  })
})

const ncSchema = new GraphQLSchema({
  query: RootQueryType,
  mutation: RootMutationType
})

module.exports = ncSchema
