{"id":17705121,"url":"https://github.com/player259/graphql-bundle","last_synced_at":"2025-10-06T18:47:02.628Z","repository":{"id":57042596,"uuid":"312976203","full_name":"player259/graphql-bundle","owner":"player259","description":"Integrates graphql-php library into symfony applications","archived":false,"fork":false,"pushed_at":"2021-08-02T10:13:32.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T04:48:28.549Z","etag":null,"topics":["api","graphql","php","symfony","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/player259.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":"2020-11-15T06:59:37.000Z","updated_at":"2021-08-02T10:12:09.000Z","dependencies_parsed_at":"2022-08-24T01:10:35.888Z","dependency_job_id":null,"html_url":"https://github.com/player259/graphql-bundle","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/player259/graphql-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player259%2Fgraphql-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player259%2Fgraphql-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player259%2Fgraphql-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player259%2Fgraphql-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/player259","download_url":"https://codeload.github.com/player259/graphql-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/player259%2Fgraphql-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270083866,"owners_count":24524040,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","graphql","php","symfony","symfony-bundle"],"created_at":"2024-10-24T22:06:29.009Z","updated_at":"2025-10-06T18:46:57.577Z","avatar_url":"https://github.com/player259.png","language":"PHP","readme":"# Player259GraphQLBundle\n\n## About\n\nThe Player259GraphQLBundle integrates [webonyx/graphql-php](https://github.com/webonyx/graphql-php) library\ninto symfony applications.\n\n[![CI Status](https://github.com/player259/graphql-bundle/workflows/CI/badge.svg?branch=master\u0026event=push)](https://github.com/player259/graphql-bundle/actions)\n\n[Usage documentation](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst).\n\n## Features\n\n* Types-as-services with Dependency Injection\n* Controller-like resolvers with [Autowiring](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst#autowiring)\n* Type definition and resolvers in the same class, see [Basic usage](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst#basic-usage)\n* No extra configuration files\n* No static calls\n* Native [webonyx/graphql-php](https://github.com/webonyx/graphql-php) type system with all its features and great [documentation](https://webonyx.github.io/graphql-php/)\n* Integrated [Type Registry](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst#type-registry)\n* Possible [Code splitting](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst#code-splitting) for Query and Mutation types\n* Simplified [Deferred resolving](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst#deferred-resolving) with integrated buffer\n\n## Installation\n\nThe Player259GraphQLBundle requires PHP 7.1+ and Symfony 4.4+.\n\nYou can install the bundle using [Symfony Flex](https://symfony.com/doc/current/setup/flex.html):\n\n    $ composer require player259/graphql-bundle\n\nIf you're not using Flex, then add the bundle to your `config/bundles.php`:\n\n```php\n// config/bundles.php\nreturn [\n    // ...\n    Player259\\GraphQLBundle\\Player259GraphQLBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\nImport routing file:\n\n```yaml\n# in app/config/routes.yaml\nplayer259_graphql:\n    resource: '@Player259GraphQLBundle/Resources/config/routing.xml'\n    prefix: /\n```\n\nOr assign endpoint to specific url:\n\n```yaml\n# in app/config/routes.yaml\nplayer259_graphql_index:\n    path: /graphql\n    controller: Player259\\GraphQLBundle\\Controller\\GraphQLController\n```\n\nBy default bundle registers `/graphql` endpoint.\n\n## Configuration\n\nDefault configuration in `config/packages/player259_graphql.yaml`.\n\n```yaml\n# in app/config/packages/player259_graphql.yml\nplayer259_graphql:\n    debug: '%kernel.debug%'\n    logger: '?logger'\n```\n\nWith `debug` option set to `true` response errors will contain `debugMessage` and `trace`.\n\n`logger` parameter is a service name to log exceptions.  \nIf it's prefixed with `?` it will not throw exception if no such service exists.\n\n## Example\n\nTo create your first GraphQL API (with default Symfony 5 installation and no configuration):\n\n1. Create class which extends webonyx `ObjectType` with name `Query`\n2. Add at least one field and resolver\n3. Make a request to `/graphql` url\n\n```php\n\u003c?php\n\nnamespace App\\GraphQL;\n\nuse GraphQL\\Type\\Definition\\ObjectType;\nuse GraphQL\\Type\\Definition\\Type;\nuse Symfony\\Component\\Security\\Core\\Security;\n\nclass QueryType extends ObjectType\n{\n    public function __construct()\n    {\n        $config = [\n            'name' =\u003e 'Query',\n            'fields' =\u003e [\n                'username' =\u003e [\n                    'type' =\u003e Type::string(),\n                    'description' =\u003e 'Current User username',\n                ],\n            ],\n        ];\n\n        parent::__construct($config);\n    }\n\n    public function resolveUsername(Security $security): ?string\n    {\n        return $security-\u003egetUser() ? $security-\u003egetUser()-\u003egetUsername() : null;\n    }\n}\n```\n\n## Documentation\n\nUsage examples can be found in [documentation](https://github.com/player259/graphql-bundle/blob/master/Resources/doc/index.rst).\n\n\n## Not yet implemented\n\nPass execution rules, disabling introspection, query depth and complexity.\n\nDispatching events to override server parameters such as promiseAdapter, error formatters and handlers.\n\nAllow to merge non-root types to get more flexibility.\n\nMaybe custom type config property `resolveMethod` to call specific method or another service.\n\nAnother option is annotations, something like `@GraphQL\\Resolve(\"App\\GraphQL\\QueryType\", \"users\")`\nso it could be attached to any service with public method.\nThere will be no autowiring but it can be useful in some cases.\n\n## License\n\nReleased under the MIT License, see LICENSE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayer259%2Fgraphql-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplayer259%2Fgraphql-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayer259%2Fgraphql-bundle/lists"}