{"id":20003234,"url":"https://github.com/mbrsagor/graphql","last_synced_at":"2025-03-02T00:24:30.060Z","repository":{"id":38710864,"uuid":"134100816","full_name":"mbrsagor/graphql","owner":"mbrsagor","description":"JavaScript GraphSql","archived":false,"fork":false,"pushed_at":"2024-03-29T04:17:23.000Z","size":41495,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T13:25:21.355Z","etag":null,"topics":["graphsql","javascript"],"latest_commit_sha":null,"homepage":"","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/mbrsagor.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":"2018-05-19T21:58:11.000Z","updated_at":"2023-03-04T02:47:53.000Z","dependencies_parsed_at":"2024-01-28T17:32:43.647Z","dependency_job_id":"73f6c9ad-1932-4183-808a-021ef0d259c1","html_url":"https://github.com/mbrsagor/graphql","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/mbrsagor%2Fgraphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2Fgraphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2Fgraphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2Fgraphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbrsagor","download_url":"https://codeload.github.com/mbrsagor/graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241441853,"owners_count":19963492,"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":["graphsql","javascript"],"created_at":"2024-11-13T05:24:44.382Z","updated_at":"2025-03-02T00:24:30.030Z","avatar_url":"https://github.com/mbrsagor.png","language":"JavaScript","readme":"# graphql\n\u003e JavaScript Graphql Repo.\n\n###### What is Graphql?\nThis is my simple `GraphQL` web-app which has very quite and simple example of graphql user management system. Be like `Query` and `Mutation` basic operations.\n\n##### Download the repository and run the `Backend` application in your local machine:\nplease follow the below instructions:\n\n```bash\ngit clone https://github.com/mbrsagor/graphql.git\ncd graphql/server\nyarn install\nyarn dev\n```\nRuns the app in the development mode.\\\nOpen [http://localhost:4000](http://localhost:4000) to view it in the browser.\n\n##### Run the `Frontend` part:\n```bash\ncd client\nyarn install\nyarn start\n```\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\n###### For the `Query` response body:\n```javascript\nquery {\n  users {\n    id\n    name\n    email\n    age\n  }\n}\n```\n###### For the `Mutation` (create/post) response body:\n```javascript\nmutation {\n  createUser(id: 6, name: \"Mamun-khan\", email: \"mamun@gmail.com\", age: 29) {\n    id\n    name\n    email\n    age\n  }\n}\n```\n\n#### Example of GraphQL if you want to create new one backend:\n\u003e Basically if you want to setup newly I recommend you please follow the below instructions:\n```bash\nyarn init \nyarn add --dev graphpack\n```\nThen add the code for you project `package.json` file.\n```json\n\"scripts\": {\n    \"dev\": \"graphpack\",\n    \"build\": \"graphpack build\"\n}\n```\nN:B: Then continue to the following steps which possesses my project `src` directory.\n\n\n```bash\nnpm install graphql\n```\nThen:\n```javascript\nvar { graphql, buildSchema } = require('graphql');\n\nvar schema = buildSchema(`\n  type Query {\n    sagor: String\n  }\n`);\n\nvar root = { sagor: () =\u003e 'Hello Sagor!' };\n\ngraphql(schema, '{ sagor }', root).then((response) =\u003e {\n  console.log(response);\n});\n```\n\n\u003e Frontend\n```javascript\nimport {\n  graphql,\n  GraphQLSchema,\n  GraphQLObjectType,\n  GraphQLString,\n} from 'graphql';\n\nvar schema = new GraphQLSchema({\n  query: new GraphQLObjectType({\n    name: 'RootQueryType',\n    fields: {\n      hello: {\n        type: GraphQLString,\n        resolve() {\n          return 'world';\n        },\n      },\n    },\n  }),\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbrsagor%2Fgraphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbrsagor%2Fgraphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbrsagor%2Fgraphql/lists"}