{"id":19012161,"url":"https://github.com/garlicservices/graphql-bundle","last_synced_at":"2025-04-22T23:28:44.047Z","repository":{"id":62509080,"uuid":"147533600","full_name":"garlicservices/graphql-bundle","owner":"garlicservices","description":"GraphQL bundle improve level of communication among Garlic microservices","archived":false,"fork":false,"pushed_at":"2020-01-06T16:56:53.000Z","size":86,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-17T16:03:56.967Z","etag":null,"topics":["graphql","graphql-bundle","microservices","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/garlicservices.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}},"created_at":"2018-09-05T14:43:37.000Z","updated_at":"2019-12-23T10:11:32.000Z","dependencies_parsed_at":"2022-11-02T13:16:20.918Z","dependency_job_id":null,"html_url":"https://github.com/garlicservices/graphql-bundle","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garlicservices%2Fgraphql-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garlicservices%2Fgraphql-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garlicservices%2Fgraphql-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garlicservices%2Fgraphql-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garlicservices","download_url":"https://codeload.github.com/garlicservices/graphql-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250339652,"owners_count":21414397,"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":["graphql","graphql-bundle","microservices","symfony-bundle"],"created_at":"2024-11-08T19:17:01.497Z","updated_at":"2025-04-22T23:28:44.031Z","avatar_url":"https://github.com/garlicservices.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Garlic GraphQL bundle\n\nThis bundle allow to communicate microservices via graphql to each other.\nIt should be installed on both endpoints for proper message encode/decode flow.\n\nThis bundle based on [youshido-php/GraphQLBundle](https://github.com/youshido-php/GraphQLBundle), so special thanks to this guys for the excellent work! We've just made a couple updates ;)\n\n## Configuration\n\nThere are necessary things make this bundle works:\n\n### Add bundle to the Symfony project\n\n```bash\ncomposer require garlic/graphql\n```\n\n### Initialize GraphQL schema(create schema, query and mutation fields)\n\n```bash\nbin/console make:graphql:init\n```\n\n### Create graphql type (command able to get fields from existing Entity)\n\n```bash\nbin/console make:graphql:type\n```\n\nThe command suggest you to create full CRUD mutations and queries, just type \"y\" to do so. \nThere would be created CRUD-classes with related functionality.\nLast thing you need to make this bundle working is to update your service.yaml\n```yaml\n# Make graphql services public\nApp\\Service\\GraphQL\\:\n    resource: '../src/Service/GraphQL/*'\n    public: true\n```\n\n### Make your first graphql query or mutation\n\n```bash\nbin/console make:graphql:query\n```\n\nNow you can review and update newly created files! \n\nIt's time to run your first query! Try to send your query to **mydomain.com/graphql**\n\n## Usage\n### Example steps to use bundle after init\n1. Create Entity (for example Apartments)\n2. Create GraphQL type by using command above (for example name it Apartment), type \"y\" to make CRUD mutations automatically.\n3. Try to execute a query\n```\n{\n  ApartmentFind(id:1){\n    id\n  }\n}\n\n```\n\n### Using related types\n1. Let's create new Entity (for example Address) and connect it to Apartments by using many to one relation.\n2. Create GraphQL type \"Address\" similar to step one\n3. Add newly created type to Apartment type as `new Address()`\n4. Try to find Apartment with address fields (for example id)\n```\n{\n  ApartmentFind(id:1){\n    id\n    address {\n        id\n    }\n  }\n}\n``` \n\nor directly by Address \"where\" query (for example id)\n\n```\n{\n  ApartmentFind(address:{id:1}){\n    id\n    address {\n        id\n    }\n  }\n}\n```\n## GraphiQL extension\nYou can write queries in interactive editor with integrated documentation about schemas, queries and mutation. \nTo run this editor just run graphiql extension. Type to access to extension - **mydomain.com/graphql/explorer** \nExtension is accessible only in development mode of Symfony application.\n\n## Enjoy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarlicservices%2Fgraphql-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarlicservices%2Fgraphql-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarlicservices%2Fgraphql-bundle/lists"}