{"id":22736086,"url":"https://github.com/0xfourzerofour/vertex","last_synced_at":"2025-04-14T03:21:29.365Z","repository":{"id":40582731,"uuid":"483165728","full_name":"0xfourzerofour/vertex","owner":"0xfourzerofour","description":"Serverless GraphQL API Gateway","archived":false,"fork":false,"pushed_at":"2022-09-12T04:26:57.000Z","size":25786,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T17:21:20.531Z","etag":null,"topics":["api-gateway","go","golang","graphql","microservice","nextjs","proxy","reverse-proxy","serverless","service"],"latest_commit_sha":null,"homepage":"","language":"Go","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/0xfourzerofour.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":"2022-04-19T08:45:04.000Z","updated_at":"2023-09-15T06:33:43.000Z","dependencies_parsed_at":"2022-08-09T23:41:10.530Z","dependency_job_id":null,"html_url":"https://github.com/0xfourzerofour/vertex","commit_stats":null,"previous_names":["joshpauline/vertex"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fvertex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fvertex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fvertex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfourzerofour%2Fvertex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xfourzerofour","download_url":"https://codeload.github.com/0xfourzerofour/vertex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814046,"owners_count":21165671,"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":["api-gateway","go","golang","graphql","microservice","nextjs","proxy","reverse-proxy","serverless","service"],"created_at":"2024-12-10T21:17:27.409Z","updated_at":"2025-04-14T03:21:29.341Z","avatar_url":"https://github.com/0xfourzerofour.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Vertex GraphQL Api Gateway ### \n\nThis Project is inspired by current pitfalls that I have come across at work with monolithic graphql schemas.\nVertex aims to solve this issue by allowing a single graphql endpoint to many downstream services by parsing \nthe query body and matching the query to a service. \n\nVertex is designed to be a serverless Graphql api gateway that can run on the AWS Lambda platform. All the proxy logic is called\nby the vertex handler. All the handler needs is the context to a vertex config (service query map, introspection schema, fasthttp client)\n\n[![](https://mermaid.ink/img/pako:eNp9j00KwjAQRq8SZt1eIAtB2qgLF9UGFZouQhNtsElKTMHS9u6m_iwEcRbD8L3HMDNAZYUEDBfH2xrRlBkUalkkjZLGlyiOF-OG0iyaWx4d8xElw4HsKTlNLzd5Opmz935EabGeF-225Q9I_sHVF4QItHSaKxFuG-aEga-llgxwGAV3VwbMTMHrWsG9JEJ56wCfeXOTEfDO27w3FWDvOvmRUsXDn_ptTQ8RuVGX)](https://mermaid-js.github.io/mermaid-live-editor/edit#pako:eNp9j00KwjAQRq8SZt1eIAtB2qgLF9UGFZouQhNtsElKTMHS9u6m_iwEcRbD8L3HMDNAZYUEDBfH2xrRlBkUalkkjZLGlyiOF-OG0iyaWx4d8xElw4HsKTlNLzd5Opmz935EabGeF-225Q9I_sHVF4QItHSaKxFuG-aEga-llgxwGAV3VwbMTMHrWsG9JEJ56wCfeXOTEfDO27w3FWDvOvmRUsXDn_ptTQ8RuVGX)\n\n# NOTE: THIS IS STILL VERY EXPERIMENTAL SO DO NOT USE IN PRODUCTION ANYTIME SOON\n\n## Example Lambda Proxy Integration\n\n```\npackage main\n\nimport (\n\t_ \"embed\"\n\t\"github.com/joshpauline/vertex/internal/clients\"\n\t\"github.com/joshpauline/vertex/pkg/vertex\"\n\n\t\"github.com/aws/aws-lambda-go/lambda\"\n)\n\n//go:embed schema.graphql\nvar schema string\n\nfunc main() {\n\n\texampleMap := map[string]string{\n\t\t\"countries\": \"countries.trevorblades.com/graphql\",\n\t\t\"allFilms\":  \"swapi-graphql.netlify.app/.netlify/functions/index\",\n\t}\n\n\tvert := vertex.NewVertex(exampleMap, schema, clients.FHTTP())\n\n\tlambda.Start(vert.Handler)\n}\n\n```\n\n# Vertex CLI\n\nA CLI tool that generates a JSON file to be used with the Vertex Graphql Proxy\n\nThe `generate` command accepts 4 flags\n\n - --schema || -s\n - --output || -o\n - --name || -n\n - --url || -u\n\nIt will generate the following JSON file\n\n```\n{\n    \"serviceName\": \"example-service-name\",\n    \"serviceUrl\": \"service.com/graphql\",\n    \"schema\": \"*** graphql schema definition\",\n    \"queryMap\": {\n      \"exampleQuery\": \"service.com/graphql\"\n    }\n}\n\n```\n\n## Exciting findings\n\n - requests can be parsed within 0.01-0.1ms which will only get faster after I implement request caching\n\n## Considerations\n\n - There cannot be overlapping types throughout the graphql schemas (Might be an option for query polymorphism based on different variables)\n - Services must have introspection turned on at the API level (I am working around this using a ci tool to publish schemas)\n - This project is still early days so do not use in production\n\n## TODO\n\n - Create cli tool to publish schemas from service CI [current tool only for generation](https://github.com/joshpauline/vertex-cli) \n - create cli tool to deploy schemas from service ci to remove need for introspection\n - Load all graphs into one schema for playground introspection\n - Add Web socket functionality for subsriptions\n - cache full introspection graph in memory for fast retrieval\n - Cache hash of request body for faster proxying\n - Load and save services from DynamoDB\n - Logging\n - Load services from CLI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfourzerofour%2Fvertex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xfourzerofour%2Fvertex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfourzerofour%2Fvertex/lists"}