{"id":13725296,"url":"https://github.com/esseswann/graphql-binary","last_synced_at":"2025-04-22T08:31:05.424Z","repository":{"id":39962573,"uuid":"208882569","full_name":"esseswann/graphql-binary","owner":"esseswann","description":"GraphQL binary protocol for smaller network traffic and parsing performance","archived":false,"fork":false,"pushed_at":"2023-07-18T21:48:35.000Z","size":2209,"stargazers_count":88,"open_issues_count":6,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T21:15:25.646Z","etag":null,"topics":["binary-protocol","graphql","msgpack","protobuf"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/esseswann.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":"2019-09-16T19:36:45.000Z","updated_at":"2025-01-23T02:57:34.000Z","dependencies_parsed_at":"2024-11-09T22:47:09.645Z","dependency_job_id":"b6fbe03f-0e76-48cb-aaa6-8f366d4d78ce","html_url":"https://github.com/esseswann/graphql-binary","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/esseswann%2Fgraphql-binary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esseswann%2Fgraphql-binary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esseswann%2Fgraphql-binary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esseswann%2Fgraphql-binary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esseswann","download_url":"https://codeload.github.com/esseswann/graphql-binary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250206108,"owners_count":21392188,"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":["binary-protocol","graphql","msgpack","protobuf"],"created_at":"2024-08-03T01:02:18.552Z","updated_at":"2025-04-22T08:31:04.893Z","avatar_url":"https://github.com/esseswann.png","language":"TypeScript","readme":"# GraphQL Binary\nGraphQL Binary protocol packs and unpacks GraphQL query into a schema-tied ByteArrays which allows up to 5x traffic reduction and significant parsing (unpack stage) performance boost\n\nMoreover the response is also optimised by removing the keys, storing integers in bytes, having c-like strings\\arrays and so on similarly to Protobuf in terms of schema and to MessagePack in terms of values encoding\n\nFor some developrs the most interesting feature is encoding\\decoding custom types, e.g. [Date type with seconds precision taking only 4 bytes](https://github.com/esseswann/graphql-binary/blob/master/src/fixtures/customScalarHandlers.ts#L11)\n\n# Stage\nThis project is currently in proof on concept stage. We have no intent on supporting Union and Interface types in the first release. Fragments will be inlined for multiple reasons\n\n# Concept \n```graphql\nquery BasicQuery {\n  int\n  float\n  boolean\n  string\n  withArgs (\n    int: 1\n    boolean: true\n    string: \"string\"\n  )\n  map {\n    id\n    map {\n      id\n      map {\n        id\n      }\n    }\n  }\n}\n```\n\nis converted to this\n```javascript\nUint8Array(30) [\n  0, 1, 2, 3, 5, 6, 1, 1, 8, 1,\n  195, 9, 7, 166, 115, 116, 114, 105, 110, 103,\n  4, 0, 1, 0, 1, 0, 255, 255, 255, 255\n]\n```\nby using a GraphQL schema where each Field is assigned a 8-bit integer index starting from top level Type definitions and boiling down to each individual type. \nObviously it can be optimised yet\n\n# Usage ⚗️\nClone repository and execute\n```shell\nyarn \u0026\u0026 yarn dev \u003cfile you want to be working on\u003e\n```\nThen after you're finished \n```shell\nyarn test\n```\nDon't forget to force Jest to rerun tests by inputting `a` in the Jest console\n\n# Limitations\nCurrently the implementation will break if schema contains a type that has more than 255 fields\n\n# Support\nAll contributions are warmly welcome. Please follow issues section or consider these:\n- Test coverage compatible to graphql-js\n- Documentation\n- Ports for other languages\n\nPlease follow the Functional style\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesseswann%2Fgraphql-binary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesseswann%2Fgraphql-binary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesseswann%2Fgraphql-binary/lists"}