{"id":19604389,"url":"https://github.com/khrt/graphql-perl","last_synced_at":"2025-04-27T19:32:35.823Z","repository":{"id":150685800,"uuid":"87347467","full_name":"khrt/graphql-perl","owner":"khrt","description":"A Perl implementation of GraphQL","archived":false,"fork":false,"pushed_at":"2017-09-13T01:24:55.000Z","size":294,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T02:21:57.971Z","etag":null,"topics":["graphql","graphql-perl","perl"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khrt.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":"2017-04-05T19:16:37.000Z","updated_at":"2019-11-24T12:00:44.000Z","dependencies_parsed_at":"2023-04-10T01:32:36.101Z","dependency_job_id":null,"html_url":"https://github.com/khrt/graphql-perl","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/khrt%2Fgraphql-perl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrt%2Fgraphql-perl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrt%2Fgraphql-perl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khrt%2Fgraphql-perl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khrt","download_url":"https://codeload.github.com/khrt/graphql-perl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251196023,"owners_count":21550888,"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-perl","perl"],"created_at":"2024-11-11T09:36:39.618Z","updated_at":"2025-04-27T19:32:35.809Z","avatar_url":"https://github.com/khrt.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nGraphQL - A Perl port of the reference implementation of [GraphQL](http://graphql.org/).\n\n# SYNOPSIS\n\n    use GraphQL qw/:types graphql/;\n\n    my $schema = GraphQLSchema(\n        query =\u003e $Query,\n        mutation =\u003e $Mutation;\n    );\n\n    my $result = graphql($schema, $query);\n\n# DESCRIPTION\n\nGraphQL is a port of the [reference GraphQL implementation](https://github.com/graphql/graphql-js)\nimplements GraphQL types, parser, validation, execution, and introspection.\n\n# TYPES\n\nTo import all available GraphQL types use `:types` tag from [GraphQL](https://metacpan.org/pod/GraphQL) class.\n\n## Object Types and Fields\n\n## Object\n\nObject represents a list of named fields, each of which yield a value of a\nspecific type.\n\n    GraphQLObjectType(\n        name =\u003e '',\n        fields =\u003e {\n            ...\n        },\n    );\n\nPossible parameters of an object:\n\n- name;\n- fields - see [\"Fields\"](#fields);\n- description - optional;\n- interfaces - optional;\n- is\\_type\\_of - optional;\n\n### Fields\n\nList of named fields.\n\n    {\n        args =\u003e {\n            ...\n        },\n        type =\u003e GraphQLString,\n        resolve =\u003e sub {\n            my ($obj, $args) = @_;\n            ...\n        },\n    }\n\nPossible argument of a field:\n\n- type;\n- args - see [\"Arguments\"](#arguments);\n- resolve - must a code ref if passed;\n- description - optional;\n- deprecation\\_reason - optional;\n\n### Arguments\n\nArguments are applicable to fields and should defined like a HASH ref of\narguments of HASH ref with type.\n\n    {\n        arg_name =\u003e {\n            type =\u003e GraphQL,\n            description =\u003e 'Argument description',\n        },\n    }\n\nPossible parameters of an argument:\n\n- type;\n- description - optional;\n- default\\_value - optional;\n\n[GraphQL::Language::Object](https://metacpan.org/pod/GraphQL::Language::Object)\n\n## Scalar Types\n\nGraphQL provides a number of built‐in scalars, but type systems can add\nadditional scalars with semantic meaning.\n\n- GraphQLBoolean\n- GraphQLFloat\n- GraphQLInt\n- GraphQLID\n- GraphQLString\n\n[GraphQL::Language::Scalar](https://metacpan.org/pod/GraphQL::Language::Scalar)\n\n## Enumeration Types\n\nEnumeration types are a special kind of scalar that is restricted to a\nparticular set of allowed values.\n\n    GraphQLEnumType(\n        name =\u003e 'Color',\n        values =\u003e {\n            RED =\u003e { value =\u003e 0 },\n            GREEN =\u003e { value =\u003e 1 },\n            BLUE =\u003e { value =\u003e 2 },\n        },\n    );\n\n[GraphQL::Language::Enum](https://metacpan.org/pod/GraphQL::Language::Enum)\n\n## Lists\n\nList modifier marks type as _List_, which indicates that this field will return\nan array of that type.\n\n    GraphQLList($Type);\n\nThe [\"Non-Null\"](#non-null) and [\"List\"](#list) modifiers can be combined.\n\n    GraphQLList(GraphQLNonNull($Type)); # [$Type!]\n\n[GraphQL::Language::List](https://metacpan.org/pod/GraphQL::Language::List)\n\n## Non-Null\n\nThe Non-Null type modifier means that server always expects to return a\nnon-null value for a field.\nGetting a null value will trigger a GraphQL execution error, letting the client\nknow that something has gone wrong.\n\n    GraphQLList($Type);\n\nThe [\"Non-Null\"](#non-null) and [\"List\"](#list) modifiers can be combined.\n\n    GraphQLNonNull(GraphQLList($Type)); # [$Type]!\n\n[GraphQL::Language::NonNull](https://metacpan.org/pod/GraphQL::Language::NonNull)\n\n## Interfaces\n\nLike many type systems, GraphQL supports interfaces. An Interface is an abstract\ntype that includes a certain set of fields that a type must include to implement\nthe interface.\n\n- name;\n- fields - see [\"Fields\"](#fields);\n- description - optional;\n- resolve\\_type - must be a CODE ref, optional;\n\n    GraphQLInterfaceType(\n        name =\u003e 'Interface',\n        fields =\u003e {\n            ...\n        },\n        resolve_type =\u003e {\n            my ($obj, $context, $info) = @_;\n            ...\n        }\n    );\n\n[GraphQL::Language::Interface](https://metacpan.org/pod/GraphQL::Language::Interface)\n\n## Union Types\n\nUnion types are very similar to interfaces, but they don't get to specify any\ncommon fields between the types.\n\n    GraphQLUnionType(\n        name =\u003e 'Union',\n        types =\u003e [$Type0, $Type1],\n    );\n\n[GraphQL::Language::Union](https://metacpan.org/pod/GraphQL::Language::Union)\n\n## Schema\n\nEvery GraphQL service has a _query_ type and may or may not have a _mutation_ type.\nThese types are the same as a regular object type, but they are special because\nthey define the entry point of every GraphQL query.\n\n    GraphQLSchema(\n        query =\u003e $Query,\n        mutation =\u003e $Mutation,\n    );\n\n[GraphQL::Type::Schema](https://metacpan.org/pod/GraphQL::Type::Schema).\n\n# INTROSPECTION\n\n[GraphQL::Type::Introspection](https://metacpan.org/pod/GraphQL::Type::Introspection).\n\n# LIMITATIONS\n\n`Boolean`, `NULL`.\n\n# EXAMPLES\n\nSee _examples_ directory.\n\n# GITHUB\n\n[https://github.com/khrt/graphql-perl](https://github.com/khrt/graphql-perl)\n\n# AUTHOR\n\nArtur Khabibullin - rtkh@cpan.org\n\n# LICENSE\n\nThis module and all the modules in this package are governed by the same license\nas Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrt%2Fgraphql-perl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhrt%2Fgraphql-perl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhrt%2Fgraphql-perl/lists"}