{"id":15062317,"url":"https://github.com/graphql-perl/graphql-perl","last_synced_at":"2025-08-18T11:11:15.640Z","repository":{"id":44994169,"uuid":"91703892","full_name":"graphql-perl/graphql-perl","owner":"graphql-perl","description":"GraphQL in Perl 5","archived":false,"fork":false,"pushed_at":"2022-10-01T22:59:13.000Z","size":798,"stargazers_count":71,"open_issues_count":6,"forks_count":18,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-10T14:46:21.147Z","etag":null,"topics":["graphql","graphql-perl","moo","perl"],"latest_commit_sha":null,"homepage":"https://metacpan.org/release/GraphQL","language":"Perl","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/graphql-perl.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2017-05-18T14:35:05.000Z","updated_at":"2024-06-11T14:53:16.000Z","dependencies_parsed_at":"2022-08-29T06:50:52.940Z","dependency_job_id":null,"html_url":"https://github.com/graphql-perl/graphql-perl","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/graphql-perl/graphql-perl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-perl%2Fgraphql-perl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-perl%2Fgraphql-perl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-perl%2Fgraphql-perl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-perl%2Fgraphql-perl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-perl","download_url":"https://codeload.github.com/graphql-perl/graphql-perl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-perl%2Fgraphql-perl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270982201,"owners_count":24679449,"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-18T02:00:08.743Z","response_time":89,"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":["graphql","graphql-perl","moo","perl"],"created_at":"2024-09-24T23:34:20.090Z","updated_at":"2025-08-18T11:11:15.612Z","avatar_url":"https://github.com/graphql-perl.png","language":"Perl","funding_links":[],"categories":["Libraries"],"sub_categories":["Perl Libraries"],"readme":"# NAME\n\nGraphQL - Perl implementation of GraphQL\n\n# PROJECT STATUS\n\n| OS      |  Build status |\n|:-------:|--------------:|\n| Linux   | [![Build Status](https://travis-ci.org/graphql-perl/graphql-perl.svg?branch=master)](https://travis-ci.org/graphql-perl/graphql-perl) |\n\n[![CPAN version](https://badge.fury.io/pl/GraphQL.svg)](https://metacpan.org/pod/GraphQL) [![Coverage Status](https://coveralls.io/repos/github/graphql-perl/graphql-perl/badge.svg?branch=master)](https://coveralls.io/github/graphql-perl/graphql-perl?branch=master)\n\n# SYNOPSIS\n\n    use GraphQL::Schema;\n    use GraphQL::Type::Object;\n    use GraphQL::Type::Scalar qw($String);\n    use GraphQL::Execution qw(execute);\n\n    my $schema = GraphQL::Schema-\u003efrom_doc(\u003c\u003c'EOF');\n    type Query {\n      helloWorld: String\n    }\n    EOF\n    post '/graphql' =\u003e sub {\n      send_as JSON =\u003e execute(\n        $schema,\n        body_parameters-\u003e{query},\n        { helloWorld =\u003e 'Hello world!' },\n        undef,\n        body_parameters-\u003e{variables},\n        body_parameters-\u003e{operationName},\n        undef,\n      );\n    };\n\nThe above is from [the sample Dancer 2 applet](https://github.com/graphql-perl/sample-dancer2).\n\n# DESCRIPTION\n\nThis module is a port of the GraphQL reference implementation,\n[graphql-js](https://github.com/graphql/graphql-js), to Perl 5.\n\nIt now supports Promises, allowing asynchronous operation. See\n[Mojolicious::Plugin::GraphQL](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AGraphQL) for an example of how to take advantage\nof this.\n\nAs of 0.39, supports GraphQL subscriptions.\n\nSee [GraphQL::Type](https://metacpan.org/pod/GraphQL%3A%3AType) for description of how to create GraphQL types.\n\n## Introduction to GraphQL\n\nGraphQL is a technology that lets clients talk to APIs via a single\nendpoint, which acts as a single \"source of the truth\". This means clients\ndo not need to seek the whole picture from several APIs. Additionally,\nit makes this efficient in network traffic, time, and programming effort:\n\n- Network traffic\n\n    The request asks for exactly what it wants, which it gets, and no\n    more. No wasted traffic.\n\n- Time\n\n    It gets all the things it needs in one go, including any connected\n    resources, so it does not need to make several requests to fill its\n    information requirement.\n\n- Programming effort\n\n    With \"fragments\" that can be attached to user-interface components,\n    keeping track of what information a whole page needs to request can be\n    automated. See [Relay](https://facebook.github.io/relay/) or\n    [Apollo](http://dev.apollodata.com/) for more on this.\n\n## Basic concepts\n\nGraphQL implements a system featuring a [schema](https://metacpan.org/pod/GraphQL%3A%3ASchema),\nwhich features various classes of [types](https://metacpan.org/pod/GraphQL%3A%3AType), some of which\nare [objects](https://metacpan.org/pod/GraphQL%3A%3AType%3A%3AObject). Special objects provide the roots\nof queries (mandatory), and mutations and subscriptions (both optional).\n\nObjects have fields, each of which can be specified to take arguments,\nand which have a return type. These are effectively the properties and/or\nmethods on the type. If they return an object, then a query can specify\nsubfields of that object, and so on - as alluded to in the \"time-saving\"\npoint above.\n\nFor more, see the JavaScript tutorial in [\"SEE ALSO\"](#see-also).\n\n## Hooking your system up to GraphQL\n\nYou will need to decide how to model your system in GraphQL terms. This\nwill involve deciding on what [output object types](https://metacpan.org/pod/GraphQL%3A%3AType%3A%3AObject)\nyou have, what fields they have, and what arguments and return-types\nthose fields have.\n\nAdditionally, you will need to design mutations if you want to be able\nto update/create/delete data. This requires some thought for return types,\nto ensure you can get all the information you need to proceed to avoid\nextra round-trips.\n\nThe easiest way to achieve these things is to make a\n[GraphQL::Plugin::Convert](https://metacpan.org/pod/GraphQL%3A%3APlugin%3A%3AConvert) subclass, to encapsulate the specifics of\nyour system. See the documentation for further information.\n\nFinally, you should consider whether you need \"subscriptions\". These\nare designed to hook into WebSockets. Apollo has a [JavaScript\nmodule](https://github.com/apollographql/graphql-subscriptions) for this.\n\nSpecifying types and fields is straightforward. See [the\ndocument](https://metacpan.org/pod/GraphQL%3A%3AType%3A%3ALibrary#FieldMapOutput) for how to make resolvers.\n\n# DEBUGGING\n\nTo debug, set environment variable `GRAPHQL_DEBUG` to a true value.\n\n# EXPORT\n\nNone yet.\n\n# SEE ALSO\n\n[SQL::Translator::Producer::GraphQL](https://metacpan.org/pod/SQL%3A%3ATranslator%3A%3AProducer%3A%3AGraphQL) - produce GraphQL schemas from a [DBIx::Class::Schema](https://metacpan.org/pod/DBIx%3A%3AClass%3A%3ASchema) (or in fact any SQL database)\n\n[GraphQL::Plugin::Convert::DBIC](https://metacpan.org/pod/GraphQL%3A%3APlugin%3A%3AConvert%3A%3ADBIC) - produce working GraphQL schema from\na [DBIx::Class::Schema](https://metacpan.org/pod/DBIx%3A%3AClass%3A%3ASchema)\n\n[GraphQL::Plugin::Convert::OpenAPI](https://metacpan.org/pod/GraphQL%3A%3APlugin%3A%3AConvert%3A%3AOpenAPI) - produce working GraphQL schema\nfrom an OpenAPI specification\n\n[Sample Mojolicious OpenAPI to GraphQL applet](https://github.com/graphql-perl/sample-mojolicious-openapi)\n\n[Sample Dancer 2 applet](https://github.com/graphql-perl/sample-dancer2)\n\n[Sample Mojolicious applet](https://github.com/graphql-perl/sample-mojolicious)\n\n[Dancer2::Plugin::GraphQL](https://metacpan.org/pod/Dancer2%3A%3APlugin%3A%3AGraphQL)\n\n[Mojolicious::Plugin::GraphQL](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AGraphQL)\n\n[http://facebook.github.io/graphql/](http://facebook.github.io/graphql/) - GraphQL specification\n\n[http://graphql.org/graphql-js/](http://graphql.org/graphql-js/) - Tutorial on the JavaScript version,\nhighly recommended.\n[Translation to\ngraphql-perl](http://blogs.perl.org/users/ed_j/2017/10/graphql-perl---graphql-js-tutorial-translation-to-graphql-perl-and-mojoliciousplugingraphql.html).\n\n# AUTHOR\n\nEd J, `\u003cetj at cpan.org\u003e`\n\n# BUGS\n\nPlease report any bugs or feature requests on\n[https://github.com/graphql-perl/graphql-perl/issues](https://github.com/graphql-perl/graphql-perl/issues).\n\nOr, if you prefer email and/or RT: to `bug-graphql\nat rt.cpan.org`, or through the web interface at\n[http://rt.cpan.org/NoAuth/ReportBug.html?Queue=GraphQL](http://rt.cpan.org/NoAuth/ReportBug.html?Queue=GraphQL). I will be\nnotified, and then you'll automatically be notified of progress on your\nbug as I make changes.\n\n# ACKNOWLEDGEMENTS\n\nThe creation of this work has been sponsored by Perl Careers:\n[https://perl.careers/](https://perl.careers/).\n\nArtur Khabibullin `\u003crtkh at cpan.org\u003e` contributed valuable ports\nof the JavaScript tests.\n\nThe creation of the subscriptions functionality in this work has been\nsponsored by Sanctus.app: [https://sanctus.app](https://sanctus.app).\n\n# LICENSE AND COPYRIGHT\n\nCopyright 2017 Ed J.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the the Artistic License (2.0). You may obtain a\ncopy of the full license at:\n\n[http://www.perlfoundation.org/artistic\\_license\\_2\\_0](http://www.perlfoundation.org/artistic_license_2_0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-perl%2Fgraphql-perl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-perl%2Fgraphql-perl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-perl%2Fgraphql-perl/lists"}