{"size": 506, "ext": "js", "max_stars_repo_path": "mutations/resolvers/query.js", "max_stars_repo_name": "pinceladasdaweb/graphql", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "mutations/resolvers/query.js", "max_issues_repo_name": "pinceladasdaweb/graphql", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "mutations/resolvers/query.js", "max_forks_repo_name": "pinceladasdaweb/graphql", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.4482758621, "max_line_length": 74, "alphanum_fraction": 0.6304347826}
const { profiles: profilesData, users: usersData } = require('../data/db')

const users = () => {
  return usersData
}

const user = (parent, args) => {
  const selected = usersData.filter(u => u.id === args.id)

  return selected ? selected[0] : null
}

const profiles = () => {
  return profilesData
}

const profile = (parent, args) => {
  const selected = profilesData.filter(p => p.id === args.id)

  return selected ? selected[0] : null
}

module.exports = {
  users,
  user,
  profiles,
  profile
}
