{"id":15192495,"url":"https://github.com/appointy/protoc-gen-jaal","last_synced_at":"2026-03-08T08:34:52.302Z","repository":{"id":132582126,"uuid":"194983719","full_name":"Appointy/protoc-gen-jaal","owner":"Appointy","description":"Develop Relay compliant GraphQL server","archived":false,"fork":false,"pushed_at":"2020-01-09T04:00:56.000Z","size":87,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T07:31:41.745Z","etag":null,"topics":["go","golang","graphql","graphql-api","graphql-schema","graphql-server","relay-server"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Appointy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-07-03T05:12:25.000Z","updated_at":"2023-04-15T20:18:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"4efde408-b1eb-4191-88f7-493f24d19060","html_url":"https://github.com/Appointy/protoc-gen-jaal","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/Appointy%2Fprotoc-gen-jaal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appointy%2Fprotoc-gen-jaal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appointy%2Fprotoc-gen-jaal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appointy%2Fprotoc-gen-jaal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Appointy","download_url":"https://codeload.github.com/Appointy/protoc-gen-jaal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238536086,"owners_count":19488654,"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":["go","golang","graphql","graphql-api","graphql-schema","graphql-server","relay-server"],"created_at":"2024-09-27T21:41:08.716Z","updated_at":"2025-10-27T18:30:26.146Z","avatar_url":"https://github.com/Appointy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protoc-gen-jaal - Develop Relay compliant GraphQL servers\n\nprotoc-gen-jaal is a protoc plugin used to generate [Jaal](https://github.com/appointy/jaal) APIs. The server built from these APIs is GraphQL spec compliant as well as Relay compliant. protoc-gen-jaal also handles oneOf by registering it as a Union on the schema.\n\n## Getting Started\n\nLet's get started with a quick example.\n\n```protobuf\nsyntax = \"proto3\";\n\npackage customer;\n\noption go_package = \"customerpb\";\n\nimport \"schema/schema.proto\";\n\nservice Customers {\n    // CreateCustomer creates new customer.\n    rpc CreateCustomer (CreateCustomerRequest) returns (Customer) {\n        option (graphql.schema) = {\n            mutation : \"createCustomer\"\n        };\n    };\n\n    // GetCustomer returns the customer by its unique user id.\n    rpc GetCustomer (GetCustomerRequest) returns (Customer) {\n        option (graphql.schema) = {\n            query : \"customer\"\n        };\n    };\n}\n\nmessage CreateCustomerRequest {\n    string email = 1;\n    string first_name = 2;\n    string last_name = 3;\n}\n\nmessage GetCustomerRequest {\n    string id = 1;\n}\n\nmessage Customer {\n    string id = 1;\n    string email = 2;\n    string first_name = 3;\n    string last_name = 4;\n}\n```\n\nprotoc-gen-jaal uses the method option *schema* to determine whether to register an rpc as query or as mutation. If an *rpc* is not tagged, then it will not be registered on the GraphQL schema. To generate Relay compliant servers, protoc-gen-jaal generates the input and payload of each mutation with clientMutationId. The graphql schema of above example is as follows:\n\n```GraphQl Schema\ninput CreateCustomerInput {\n    clientMutationId: String\n    email: String\n    firstName: String\n    lastName: String\n}\n\ntype CreateCustomerPayload {\n    clientMutationId: String!\n    payload: Customer\n}\n\ntype Customer {\n    email: String!\n    firstName: String!\n    id: ID!\n    lastName: String!\n}\n\ntype Mutation {\n    createCustomer(input: CreateCustomerInput): CreateCustomerPayload\n}\n\ntype Query {\n    customer(id: ID): Customer\n}\n```\n\n### Installing\n\nThe installation of protoc-gen-jaal can be done directly by running go get.\n\n```\ngo get go.appointy.com/protoc-gen-jaal\n```\n\n### Usage\n\nFor a proto file customer.proto, the corresponding code is generated in customer.gq.go.\n\n```\nprotoc \\\n  -I . \\\n  -I ${GOPATH}/src \\\n  -I ${GOPATH}/src/go.appointy.com/protoc-gen-jaal \\\n  --go_out=grpc=plugins:. \\\n  --jaal_out:. \\\n  customer.proto \u0026\u0026 goimports -w .\n```\n\nprotoc-gen-jaal generates the code to register each message as input and payload. The payload is registered with the name of message. The input is registered with the name of message suffixed with \"Input\". protoc-gen-jaal implicitly registers field named id as GraphQL ID.\n\n## Available Options\n\nThe behaviour of protoc-gen-jaal can be modified using the following options:\n\n### File Option\n\n* file_skip : This option is used to skip the generation of gq file.\n\n### Method Option\n\n* schema : This option is used to tag an rpc as query or mutation.\n\n### Message Options\n\n* skip : This option is used to skip the registration of a message on the graphql schema.\n\n* name : This option is used to change default name of message on graphql schema.\n\n* type : This option is used to change go type of the message in the gq file.\n\n### Field Options\n\n* input_skip : This option is used to skip the registration of the field on input object.\n\n* payload_skip : This option is used to skip the registration of the field on payload object.\n\n* id : This option is used to expose the field as GraphQL ID. Only string field can be tagged with this option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappointy%2Fprotoc-gen-jaal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappointy%2Fprotoc-gen-jaal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappointy%2Fprotoc-gen-jaal/lists"}