{"id":19423485,"url":"https://github.com/4rthem/graphql-mapper-demo-symfony","last_synced_at":"2026-07-15T20:34:02.485Z","repository":{"id":98952254,"uuid":"59323845","full_name":"4rthem/graphql-mapper-demo-symfony","owner":"4rthem","description":"A GraphQL Mapper demo with Symfony","archived":false,"fork":false,"pushed_at":"2016-05-20T20:19:30.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-22T17:48:52.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/4rthem.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":"2016-05-20T20:18:57.000Z","updated_at":"2016-05-20T20:19:31.000Z","dependencies_parsed_at":"2023-05-02T22:30:54.126Z","dependency_job_id":null,"html_url":"https://github.com/4rthem/graphql-mapper-demo-symfony","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/4rthem/graphql-mapper-demo-symfony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rthem%2Fgraphql-mapper-demo-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rthem%2Fgraphql-mapper-demo-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rthem%2Fgraphql-mapper-demo-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rthem%2Fgraphql-mapper-demo-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4rthem","download_url":"https://codeload.github.com/4rthem/graphql-mapper-demo-symfony/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rthem%2Fgraphql-mapper-demo-symfony/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279170788,"owners_count":26118639,"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-10-16T02:00:06.019Z","response_time":53,"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":[],"created_at":"2024-11-10T13:39:10.641Z","updated_at":"2025-10-16T08:51:01.160Z","avatar_url":"https://github.com/4rthem.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL Mapper demo\n\nA demo for the [GraphQL Mapper Bundle](https://github.com/4rthem/graphql-mapper-bundle)\n\n## Installation\n\nInstall composer dependencies:\n\n```bash\ncomposer install\n```\n\nCreate your database:\n\n```bash\nbin/console doctrine:database:create\nbin/console doctrine:schema:create\n```\n\nRun the following SQL query in order to get fixtures:\n\n```sql\nINSERT INTO `sw_characters` (`id`, `name`, `appearsIn`, `discr`, `homePlanet`, `primaryFunction`) VALUES\n(1000, 'Luke Skywalker', '[4,5,6]', 'human', 'Tatooine', NULL),\n(1001, 'Darth Vader', '[4,5,6]', 'human', 'Tatooine', NULL),\n(1002, 'Han Solo', '[4,5,6]', 'human', NULL, NULL),\n(1003, 'Leia Organa', '[4,5,6]', 'human', 'Alderaan', NULL),\n(1004, 'Wilhuff Tarkin', '[4]', 'human', NULL, NULL),\n(2000, 'C-3PO', '[4,5,6]', 'droid', NULL, 'Protocol'),\n(2001, 'R2-D2', '[4,5,6]', 'droid', NULL, 'Astromech'),\n(2002, 'test-droid', '[5,4]', 'droid', NULL, 'tester');\n\nINSERT INTO `friend` (`character_source`, `character_target`) VALUES\n(1000, 1002),\n(1000, 1003),\n(1000, 2000),\n(1000, 2001),\n(1001, 1004),\n(1002, 1000),\n(1002, 1003),\n(1002, 2001),\n(1003, 1000),\n(1003, 1002),\n(1003, 2000),\n(1003, 2001),\n(1004, 1001),\n(2000, 1000),\n(2000, 1002),\n(2000, 1003),\n(2000, 2001),\n(2001, 1000),\n(2001, 1002),\n(2001, 1003);\n```\n\n## Usage\n\nRun the local server:\n\n```bash\nbin/console server:run\n```\n\nthen you can query your schema at `POST http://localhost:8000/graphql/query`\n\n### Exemple\n\nFor the given cURL request:\n\n```bash\ncurl -XPOST 'http://localhost:8000/graphql/query' -d 'query=query FooBar {\n    luke: hero(episode: EMPIRE) {\n        id,\n        name,\n        friends {\n            id, name\n        }\n    },\n    droid(id: \"2001\") {\n        primaryFunction\n    }\n}'\n```\n\nyou should receive the following response:\n\n```json\n{\n    \"data\": {\n        \"luke\": {\n            \"id\":1000,\n            \"name\":\"Luke Skywalker\",\n            \"friends\": [\n                {\n                    \"id\":1002,\n                    \"name\":\"Han Solo\"\n                },\n                {\n                    \"id\":1003,\n                    \"name\":\"Leia Organa\"\n                },\n                {\n                    \"id\":2000,\n                    \"name\":\"C-3PO\"\n                },\n                {\n                    \"id\":2001,\n                    \"name\":\"R2-D2\"\n                }\n            ]\n        },\n        \"droid\":{\n            \"primaryFunction\":\"Astromech\"\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4rthem%2Fgraphql-mapper-demo-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4rthem%2Fgraphql-mapper-demo-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4rthem%2Fgraphql-mapper-demo-symfony/lists"}