{"id":18392909,"url":"https://github.com/drklrd/graphql-apollo-part-2","last_synced_at":"2025-04-12T11:25:26.189Z","repository":{"id":88247777,"uuid":"101192764","full_name":"drklrd/graphql-apollo-part-2","owner":"drklrd","description":"PART - II [Graphql-Apollo]","archived":false,"fork":false,"pushed_at":"2017-08-23T14:58:16.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T01:31:43.386Z","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:57.000Z","updated_at":"2017-08-23T14:58:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"79b106c6-235a-456c-a04d-a4771ee70876","html_url":"https://github.com/drklrd/graphql-apollo-part-2","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-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drklrd%2Fgraphql-apollo-part-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drklrd%2Fgraphql-apollo-part-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drklrd%2Fgraphql-apollo-part-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drklrd","download_url":"https://codeload.github.com/drklrd/graphql-apollo-part-2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248559179,"owners_count":21124429,"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.005Z","updated_at":"2025-04-12T11:25:26.162Z","avatar_url":"https://github.com/drklrd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PART - II [Graphql-Apollo]\n\nPart Two for the Udemy's GraphQL course. Focussing only on the frontend part. Build on top of :\n\n#### Lyrical-GraphQL\nStarter project from a GraphQL course on Udemy.com\n\nOther components added on top of the starter project.\n\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-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrklrd%2Fgraphql-apollo-part-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrklrd%2Fgraphql-apollo-part-2/lists"}