{"id":20218816,"url":"https://github.com/juliannicholls/graphql-bootcamp","last_synced_at":"2025-04-10T15:47:52.292Z","repository":{"id":40654316,"uuid":"271801896","full_name":"JulianNicholls/GraphQL-Bootcamp","owner":"JulianNicholls","description":"Code from the GraphQL Bootcamp by Andrew Mead on Udemy at https://www.udemy.com/course/graphql-bootcamp","archived":false,"fork":false,"pushed_at":"2024-11-19T07:44:34.000Z","size":1961,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T13:36:41.294Z","etag":null,"topics":["apollo-boost","graphql","graphql-yoga","prisma"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JulianNicholls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-06-12T13:13:25.000Z","updated_at":"2024-11-19T07:44:24.000Z","dependencies_parsed_at":"2023-10-03T12:25:00.599Z","dependency_job_id":"780e5bc6-a102-4a72-8796-4a7b6f581538","html_url":"https://github.com/JulianNicholls/GraphQL-Bootcamp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FGraphQL-Bootcamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FGraphQL-Bootcamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FGraphQL-Bootcamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FGraphQL-Bootcamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulianNicholls","download_url":"https://codeload.github.com/JulianNicholls/GraphQL-Bootcamp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243741,"owners_count":21071094,"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":["apollo-boost","graphql","graphql-yoga","prisma"],"created_at":"2024-11-14T06:40:00.084Z","updated_at":"2025-04-10T15:47:52.265Z","avatar_url":"https://github.com/JulianNicholls.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL-Bootcamp\nCode from the GraphQL Bootcamp by Andrew Mead on [Udemy](https://www.udemy.com/course/graphql-bootcamp)\n\n## Progress\n\nCompleted Section 9 - Testing\n\n## Query examples for reference\n\nThese are query and mutation examples to remember the syntax when it's more than\njust a simple query or mutation.\n\n### Name your queries in the GraphQL playground\n\nIf you name your queries, mutations and subscriptions, then you can have\nmultiple ones in each tab and pressing the go button will show a list\nof actions to run. e.g.\n\n```\nquery Users {\n  users {\n    id\n    name\n    email\n    age\n    posts { title }\n    comments { text }\n  }\n}\n\nmutation NewPost {\n  createPost(\n    data: {\n      title: \"A new hope\"\n      body: \"Battle among the stars\"\n      published: true\n      author: \"10\"\n    }\n  ) {\n    id\n    title\n    body\n    author { name }\n  }\n}\n\nmutation DeleteUser {\n  deleteUser(id: \"10\") {\n    id\n    name\n  }\n}\n\nmutation updateUser {\n  deleteUser(id: \"10\", data: { email: 'newjulian@example.com }) {\n    id\n    name\n    email\n  }\n}\n```\n\n### Fragments and Named Results\n```\n{\n  first: company(id: \"1\") {   /* named result */\n    ...companyDetails\n  }\n\n  company(id: \"2\") {\n    ...companyDetails\n  }\n}\n\nmutation {\n  addCompany(name: \"Woolworth\") {\n    ...companyDetails\n  }\n}\n\nfragment companyDetails on Company {\n  id, name, description\n}\n```\n\n### Parameterised Queries and Mutations\n```\nquery Song($id: ID!) {\n  song(id: $id) {\n    id, title\n  }\n}\n\nmutation AddSong($title: String!) {\n  addSong(title: $title) {\n    id\n  }\n}\n```\n\n## Differences from Andrew\n\n* Obviously, I am using git from the very beginning 😀\n\n* I have installed ESLint in each project. My preferences are semicolons and\n  single-quotes YMMV 😀\n\n* I have kept the basics files, startable with `npm run start-basics`.\n\n* I use arrow functions almost exclusively.\n\n* I destructure much more and don't declare redundant arguments, so this:\n\n```\nPost: {\n  author: (parent, args, context, info) =\u003e USERS.find((user) =\u003e parent.author === user.id),\n},\n```\n\nbecomes this\n\n```\nPost: {\n  author: ({ author }) =\u003e USERS.find(({ id }) =\u003e author === id),\n},\n```\n\nat least in the early stages.\n\n* I have implemented many of the suggested tests, and some of mine are subtly\n  different, e.g. my comment and post subscriptions do an update rather than\n  a delete, so that the ID can be checked as part of the subscription callback.\n\n## Git client\n\nI have used Git at the command-line for more than 10 years. Over that time, I have tried\nmany different graphical shells for Git, without finding one that was easier\nand nicer to use than the command-line (in my view).\n\nI have now found that [GitKraken](https://www.gitkraken.com) is an excellent\nGit shell and would advise using it to everyone.\n\n## Questions\n\nIf you have any questions about this repository, or any others of mine, please\ndon't hesitate to contact me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliannicholls%2Fgraphql-bootcamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliannicholls%2Fgraphql-bootcamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliannicholls%2Fgraphql-bootcamp/lists"}