{"id":18392916,"url":"https://github.com/drklrd/graphql-apollo-part-1","last_synced_at":"2025-04-12T11:25:29.382Z","repository":{"id":88247767,"uuid":"101192663","full_name":"drklrd/graphql-apollo-part-1","owner":"drklrd","description":"PART - I  [Graphql-Apollo]","archived":false,"fork":false,"pushed_at":"2017-08-23T14:58:01.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T01:31:41.638Z","etag":null,"topics":[],"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/drklrd.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-08-23T14:56:05.000Z","updated_at":"2017-08-23T14:58:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"ceba4092-df75-4f2b-a674-184467d10882","html_url":"https://github.com/drklrd/graphql-apollo-part-1","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/drklrd%2Fgraphql-apollo-part-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drklrd%2Fgraphql-apollo-part-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drklrd%2Fgraphql-apollo-part-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drklrd%2Fgraphql-apollo-part-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drklrd","download_url":"https://codeload.github.com/drklrd/graphql-apollo-part-1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248559188,"owners_count":21124430,"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":[],"created_at":"2024-11-06T01:58:33.853Z","updated_at":"2025-04-12T11:25:29.362Z","avatar_url":"https://github.com/drklrd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PART - I  [Graphql-Apollo]\n\nPart One for the Udemy's GraphQL course. Focussing only on the backend part.\n\n```javascript\n\nquery {\n    user(id: \"23\"){\n        friends {\n            company {\n                name\n            }\n        }\n    }\n\n}\n\n```\n\nRootquery is like entry point of data . RootQuery allows to jump at very specific node.\n\n\nResolve function resolves differences between incoming data model and datatype we are trying to use in graphQL\n\n\n### Naming the query  :\n\n```javascript\n\nquery findCompany{\n    company(id : \"1\"){\n        id\n        name\n    }\n}\n\n```\n\n\nMultiple query for same type ....\n\n```javascript\n\n{\n\n    apple : company(id : \"1\"){\n        id\n        name\n    }\n\n    google : company(id : \"1\"){\n        id\n        name\n    }\n\n}\n\n```\n\n\n### Query fragments... essentially just a list of properties we want to get access to.\n\n```javascript\n\n{\n\n    apple : company(id : \"1\"){\n        ...companyDetails\n    }\n\n    google : company(id : \"1\"){\n        ...companyDetails\n    }\n\n}\n\nfragment companyDetails on Company{\n    id\n    name\n    description\n}\n\n```\n\n\n### mutation\n\n```javascript\nmutation {\n  addUser(firstName:\"Mero\",age:23){\n    id\n    firstName\n    age\n  }\n}\n```\n\n#### Delete user\n\n```javascript\n    mutation{\n        deleteUser(id:\"23\"){\n            id\n        }\n    }\n```\n\n\n### Also consider going through :\nApollo developers\ndev.apollodata.com/react/cache-updates.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrklrd%2Fgraphql-apollo-part-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrklrd%2Fgraphql-apollo-part-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrklrd%2Fgraphql-apollo-part-1/lists"}