{"id":13486612,"url":"https://github.com/graphql-python/gql-next","last_synced_at":"2025-07-04T01:34:02.731Z","repository":{"id":55098989,"uuid":"161832699","full_name":"graphql-python/gql-next","owner":"graphql-python","description":"A Python GraphQL Client library providing ability to validate and make type-safe GraphQL calls","archived":false,"fork":false,"pushed_at":"2021-09-09T18:55:40.000Z","size":185,"stargazers_count":78,"open_issues_count":13,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-15T00:12:32.147Z","etag":null,"topics":["graphene","graphql","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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-python.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}},"created_at":"2018-12-14T19:41:28.000Z","updated_at":"2025-05-11T16:05:25.000Z","dependencies_parsed_at":"2022-08-14T11:50:57.903Z","dependency_job_id":null,"html_url":"https://github.com/graphql-python/gql-next","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graphql-python/gql-next","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fgql-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fgql-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fgql-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fgql-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-python","download_url":"https://codeload.github.com/graphql-python/gql-next/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fgql-next/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260897481,"owners_count":23079220,"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":["graphene","graphql","python","python3"],"created_at":"2024-07-31T18:00:49.067Z","updated_at":"2025-06-20T06:36:56.118Z","avatar_url":"https://github.com/graphql-python.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"DEPRECATION NOTICE: this package is deprecated in favor of the new changes made in `gql` over at https://github.com/graphql-python/gql\n\n# GQL: Python GraphQL Client Library\n\n[![Build Status](https://travis-ci.org/ekampf/gql-nesxt.svg?branch=master)](https://travis-ci.org/graphql-python/gql-next)\n[![Coverage Status](https://coveralls.io/repos/github/ekampf/gql/badge.svg?branch=master)](https://coveralls.io/github/graphql-python/gql?branch=master)\n\n## Introduction\n\nGQL is a GraphQL Client Python library intended to help Python application make GraphQL\nAPI call while enjoying the advantages that come with GraphQL.\n\n- **Strongly Typed** response objects (dynamically created in build time to match your query)\n- **Query Validation** that checks your code's queries against the GraphQL server's schema.\n\n## Installation\n\nSimply install from PyPi:\n\n```bash\npip install gql-next\n```\n\nThen go to your project folder and run `gql init`\n\n## Quick Start\n\n`gql` works by parsing query files (`**/*.graphql` by default) into their own Python module where\nan class, named after the operation defined in the file, allows you to make that query and get a typed\nresponse.\n\nFor example, given the following file `get_film.graphql` file:\n```\nquery GetFilm($id: ID!) {\n  film(id: $id) {\n    title\n    director\n  }\n}\n```\n\nA `get_film.py` will be created defining a `GetFilm` class:\n\n```python\n# AUTOGENERATED file. Do not Change!\nfrom typing import Any, Callable, Mapping, List\nfrom enum import Enum\nfrom dataclasses import dataclass\nfrom dataclasses_json import dataclass_json\nfrom gql.clients import Client, AsyncIOClient\n\n\n@dataclass_json\n@dataclass\nclass GetFilm:\n    @dataclass_json\n    @dataclass\n    class GetFilmData:\n        @dataclass_json\n        @dataclass\n        class Film:\n            title: str\n            director: str\n        film: Film = None\n\n    data: GetFilmData = None\n    errors: Any = None\n\n    @classmethod\n    def execute(cls, id: str, on_before_callback: Callable[[Mapping[str, str], Mapping[str, str]], None] = None) -\u003e GetFilm:\n        ...\n\n    @classmethod\n    async def execute_async(cls, id: str, on_before_callback: Callable[[Mapping[str, str], Mapping[str, str]], None] = None) -\u003e GetFilm:\n        ...\n```\n\nAllowing you to make the GraphQL query:\n\n```python\nfrom .get_film import GetFilm\n\nresult = GetFilm.execute('meaning_of_life')\nfilm = result.data.film\n```\n\n*Important notes:*\n* Operations defined in graphql query __must be named__ so that we can name the relevant Python Class which you can then import in your code\n\n\n## How it works\n\n\n### The `gql` client\n\n#### `gql init`\nInitializes a project to use GQL as client - writes a .gql.json configuration file.\n\n#### `gql run`\n\nRun through your project's files and compile GraphQL queries into into Python types.\n\n#### `gql watch`\n\nUseful during development. Listen to file changes in your project's folder and continuously\nbuilds GraphQL queries as they change.\nThis allows you to:\n* Immediately verify query changes you make are valid.\n* Enjoy your IDE's autocomplete features on GraphQL auto-generated objects while developing\nas `watch` will auto-update them as you change queries.\n\n\n# Sponsors\n\n\u003ca href=\"https://ebates.com\"\u003e\u003cimg src=\"https://opensource.ebates.com/static/images/ebates-rakuten.svg\" width=\"250\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-python%2Fgql-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-python%2Fgql-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-python%2Fgql-next/lists"}