{"id":25280288,"url":"https://github.com/nattatorn-dev/graphql-mongodb-advance","last_synced_at":"2026-04-09T17:04:13.402Z","repository":{"id":89862298,"uuid":"92153060","full_name":"nattatorn-dev/graphql-mongodb-advance","owner":"nattatorn-dev","description":"This is a basic backend boilerplate for setting up a graphql server with mongodb and express.","archived":false,"fork":false,"pushed_at":"2017-07-23T15:24:41.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T10:49:24.443Z","etag":null,"topics":["backend","es7","express","graphql","mongodb","mongoose","node","seeding"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nattatorn-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-23T09:13:52.000Z","updated_at":"2017-09-05T19:28:08.000Z","dependencies_parsed_at":"2023-06-15T22:00:36.919Z","dependency_job_id":null,"html_url":"https://github.com/nattatorn-dev/graphql-mongodb-advance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nattatorn-dev/graphql-mongodb-advance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nattatorn-dev%2Fgraphql-mongodb-advance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nattatorn-dev%2Fgraphql-mongodb-advance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nattatorn-dev%2Fgraphql-mongodb-advance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nattatorn-dev%2Fgraphql-mongodb-advance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nattatorn-dev","download_url":"https://codeload.github.com/nattatorn-dev/graphql-mongodb-advance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nattatorn-dev%2Fgraphql-mongodb-advance/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260336334,"owners_count":22993736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","es7","express","graphql","mongodb","mongoose","node","seeding"],"created_at":"2025-02-12T18:39:01.767Z","updated_at":"2025-12-30T19:57:36.487Z","avatar_url":"https://github.com/nattatorn-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-mongodb-backend-example\n\n\nThis is a basic backend boilerplate for setting up a graphql server with mongodb and express.\n\n## installation\n```\nnpm install\n```\n\n```\nnpm start\n```\n\n## GraphQL\ngo to http://localhost:8080/graphql to work with the graphqil to make queries\nfrom schema.js\nroot query is:\n\n```Javascript\nexport var Schema = new GraphQLSchema({\n  query: QueryType,\n});\n```\nQueryType has these fields that can be queried on: in types/query.js\n- node\n- users : retrieves all users\n- user(id) : retrieves user by id\n- posts : retrieves all posts\n- post(id) : retrieves post by id\n- comments : retrieves all  comments\n- comment(id) : retrieves all comments by id\n\ngraphiql queries look like this:\n![graphiql screenshot](http://i68.tinypic.com/1zz486p.png)\n## Database\n### Models\n- user\n- post\n- comment\n\nExample schema in [model].js\n```Javascript\nimport mongoose from 'mongoose';\n\nlet newModelSchema = new mongoose.Schema({\n  _id: {\n    type: String,\n    required: true,\n    default: mongoose.Types.ObjectId,\n  content: {\n    type: String,\n  },\n  createdAt: {\n    type: Date,\n    default: Date.now,\n  },\n  //add in field for graphql type\n  type: {\n    type: String,\n  }\n})\n\nexport default mongoose.model('User', UserSchema);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnattatorn-dev%2Fgraphql-mongodb-advance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnattatorn-dev%2Fgraphql-mongodb-advance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnattatorn-dev%2Fgraphql-mongodb-advance/lists"}