{"id":24558152,"url":"https://github.com/rse/graphql-io","last_synced_at":"2025-04-19T09:58:58.516Z","repository":{"id":57253477,"uuid":"94676969","full_name":"rse/graphql-io","owner":"rse","description":"GraphQL Network Communication Framework","archived":false,"fork":false,"pushed_at":"2020-09-04T03:07:41.000Z","size":68,"stargazers_count":41,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T00:43:00.964Z","etag":null,"topics":["client","communication","framework","graphql","network","server"],"latest_commit_sha":null,"homepage":"http://graphql-io.com/","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/rse.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}},"created_at":"2017-06-18T09:15:37.000Z","updated_at":"2023-10-17T19:58:37.000Z","dependencies_parsed_at":"2022-08-31T22:20:15.784Z","dependency_job_id":null,"html_url":"https://github.com/rse/graphql-io","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rse%2Fgraphql-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rse","download_url":"https://codeload.github.com/rse/graphql-io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248553788,"owners_count":21123521,"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":["client","communication","framework","graphql","network","server"],"created_at":"2025-01-23T05:47:31.396Z","updated_at":"2025-04-19T09:58:58.501Z","avatar_url":"https://github.com/rse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[GraphQL-IO](https://github.com/rse/graphql-io) \u0026nbsp;|\u0026nbsp;\n[GraphQL-IO-Client](https://github.com/rse/graphql-io-client) \u0026nbsp;|\u0026nbsp;\n[GraphQL-IO-Server](https://github.com/rse/graphql-io-server)\n\n\u003cimg src=\"https://rawgit.com/rse/graphql-io/master/graphql-io.svg\" width=\"250\" align=\"right\" alt=\"\"/\u003e\n\nGraphQL-IO\n==========\n\nGraphQL Network Communication Framework\n\n\u003cp/\u003e\n\u003cimg src=\"https://nodei.co/npm/graphql-io.png?downloads=true\u0026stars=true\" alt=\"\"/\u003e\n\n\u003cp/\u003e\n\u003cimg src=\"https://david-dm.org/rse/graphql-io.png\" alt=\"\"/\u003e\n\n**ATTENTION**: This is just a meta-package for GraphQL-IO. Please check out\n[GraphQL-IO-Client](https://github.com/rse/graphql-io-client) and\n[GraphQL-IO-Server](https://github.com/rse/graphql-io-server)\nfor the real client and server implementation packages!\n\nAbout\n-----\n\nThis is a [GraphQL](http://graphql.org/)-based network communication framework for\nJavaScript clients, running under either Node.js or in the Browser,\nand JavaScript servers, running under Node.js.\nThe client-side is provided by the module\n[GraphQL-IO-Client](https://github.com/rse/graphql-io-client),\nthe server-side is provided by the module\n[GraphQL-IO-Server](https://github.com/rse/graphql-io-server).\nThis is just a meta-package which bundles\nthe server and client packages for being able to conveniently reference both\nthe server and the client in their latest versions through a single package.\nFeel free to just use (particular versions of) the individual packages directly.\n\nOn the client-side, it is based on the GraphQL engine [GraphQL.js](http://graphql.org/graphql-js/), the\nGraphQL client library [Apollo Client](https://github.com/apollographql/apollo-client), its\nWebSocket network interface [Apollo Client WS](https://github.com/rse/apollo-client-ws)\nand the HTTP client library [Axios](https://github.com/mzabriskie/axios).\n\nOn the server-side, it is based on the GraphQL engine [GraphQL.js](http://graphql.org/graphql-js/),\nthe GraphQL schema execution library [GraphQL-Tools](http://dev.apollodata.com/tools/graphql-tools/),\nthe GraphQL type definition library [GraphQL-Tools-Types](https://github.com/rse/graphql-tools-types),\nthe GraphQL subscription management library [GraphQL-Tools-Subscribe](https://github.com/rse/graphql-tools-subscribe),\nthe network communication framework [HAPI](https://hapijs.com),\nthe WebSocket integration plugin [HAPI-Plugin-WebSocket](https://github.com/rse/hapi-plugin-websocket)\nand the GraphiQL integration plugin [HAPI-Plugin-GraphiQL](https://github.com/rse/hapi-plugin-graphiql).\n\nInstallation\n------------\n\n```shell\n# all-in-one\n$ npm install graphql-io\n\n# client-side only\n$ npm install graphql-io-client\n\n# server-side only\n$ npm install graphql-io-server\n```\n\nUsage\n-----\n\n```js\n/*  all-in-one  */\nimport { Client } from \"graphql-io\"\nimport { Server } from \"graphql-io\"\n\n/*  client-side only  */\nimport { Client } from \"graphql-io-client\"\n\n/*  server-side only  */\nimport { Server } from \"graphql-io-server\"\n```\n\nFor particular usage details, please see the\n[GraphQL-IO-Client](https://github.com/rse/graphql-io-client) package\nand its [GraphQL-IO-Client API](https://github.com/rse/graphql-io-client/blob/master/src/graphql-io.d.ts)\nand the [GraphQL-IO-Server](https://github.com/rse/graphql-io-server) package\nand its [GraphQL-IO-Server API](https://github.com/rse/graphql-io-server/blob/master/src/graphql-io.d.ts).\n\nSample\n------\n\n```js\n/*  Hello World Server  */\nconst { Server } = require(\"graphql-io-server\")\nconst server = new Server({ url: \"http://127.0.0.1:12345/api\" })\nserver.at(\"graphql-resolver\", () =\u003e ({\n    Root: { hello: [ \"hello: String\", () =\u003e \"world\" ] }\n}))\nawait server.start()\n```\n\n```js\n/*  Hello World Client  */\nconst { Client } = require(\"graphql-io-client\")\nconst client = new Client({ url: \"http://127.0.0.1:12345/api\" })\nawait client.connect()\nlet result = await client.query(\"{ hello }\")\nawait client.disconnect()\nconsole.log(result.data)\n```\n\nFor more elaborate samples, check out the [Samples](https://github.com/rse/graphql-io/tree/master/sample/) folder.\nThese samples show a minimum Hello World, subscriptions over separate client connections,\nreal-time performance of server, usage from within Node.js and the Browser, etc.\n\nLicense\n-------\n\nCopyright (c) 2016-2019 Ralf S. Engelschall (http://engelschall.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frse%2Fgraphql-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frse%2Fgraphql-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frse%2Fgraphql-io/lists"}