{"id":18466519,"url":"https://github.com/graphql-python/webob-graphql","last_synced_at":"2025-04-08T08:32:14.166Z","repository":{"id":57477664,"uuid":"87275180","full_name":"graphql-python/webob-graphql","owner":"graphql-python","description":"GraphQL integration for WebOb based frameworks: Pyramid, Pylons...","archived":false,"fork":false,"pushed_at":"2020-08-07T18:49:29.000Z","size":31,"stargazers_count":28,"open_issues_count":4,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-17T11:01:19.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/graphql-python.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":"2017-04-05T06:39:51.000Z","updated_at":"2021-12-15T23:12:46.000Z","dependencies_parsed_at":"2022-09-18T20:21:23.081Z","dependency_job_id":null,"html_url":"https://github.com/graphql-python/webob-graphql","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/graphql-python%2Fwebob-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fwebob-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fwebob-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-python%2Fwebob-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-python","download_url":"https://codeload.github.com/graphql-python/webob-graphql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247804680,"owners_count":20999026,"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":[],"created_at":"2024-11-06T09:16:37.888Z","updated_at":"2025-04-08T08:32:13.800Z","avatar_url":"https://github.com/graphql-python.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebOb-GraphQL\n\n[![Build Status](https://travis-ci.org/graphql-python/webob-graphql.svg?branch=master)](https://travis-ci.org/graphql-python/webob-graphql) [![Coverage Status](https://coveralls.io/repos/graphql-python/webob-graphql/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/graphql-python/webob-graphql?branch=master) [![PyPI version](https://badge.fury.io/py/webob-graphql.svg)](https://badge.fury.io/py/webob-graphql)\n\nAdds GraphQL support to your WebOb (Pyramid, Pylons, ...) application.\n\n## Usage\n\nUse the `GraphQLView` view from `webob_graphql`\n\n### Pyramid\n\n```python\nfrom wsgiref.simple_server import make_server\nfrom pyramid.view import view_config\n\nfrom webob_graphql import serve_graphql_request\n\nfrom schema import schema\n\ndef graphql_view(request):\n    return GraphQLView(request=request, schema=schema, graphiql=True).dispatch_request(request)\n\nif __name__ == '__main__':\n    with Configurator() as config:\n        config.add_route('graphql', '/graphql')\n        config.add_view(graphql_view, route_name='graphql')\n        app = config.make_wsgi_app()\n    server = make_server('0.0.0.0', 6543, app)\n    server.serve_forever()\n```\nThis will add `/graphql` endpoint to your app and enable the GraphiQL IDE.\n\n### Supported options for GraphQLView\n\n * `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.\n * `context`: A value to pass as the `context_value` to graphql `execute` function. By default is set to `dict` with request object at key `request`.\n * `root_value`: The `root_value` you want to provide to graphql `execute`.\n * `pretty`: Whether or not you want the response to be pretty printed JSON.\n * `graphiql`: If `True`, may present [GraphiQL](https://github.com/graphql/graphiql) when loaded directly from a browser (a useful tool for debugging and exploration).\n * `graphiql_version`: The graphiql version to load. Defaults to **\"1.0.3\"**.\n * `graphiql_template`: Inject a Jinja template string to customize GraphiQL.\n * `graphiql_html_title`: The graphiql title to display. Defaults to **\"GraphiQL\"**.\n * `batch`: Set the GraphQL view as batch (for using in [Apollo-Client](http://dev.apollodata.com/core/network.html#query-batching) or [ReactRelayNetworkLayer](https://github.com/nodkz/react-relay-network-layer))\n * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/).\n * `encode`: the encoder to use for responses (sensibly defaults to `graphql_server.json_encode`).\n * `format_error`: the error formatter to use for responses (sensibly defaults to `graphql_server.default_format_error`.\n * `enable_async`: whether `async` mode will be enabled.\n * `subscriptions`: The GraphiQL socket endpoint for using subscriptions in graphql-ws.\n * `headers`: An optional GraphQL string to use as the initial displayed request headers, if not provided, the stored headers will be used.\n * `default_query`: An optional GraphQL string to use when no query is provided and no stored query exists from a previous session. If not provided, GraphiQL will use its own default query.\n* `header_editor_enabled`: An optional boolean which enables the header editor when true. Defaults to **false**.\n* `should_persist_headers`:  An optional boolean which enables to persist headers to storage when true. Defaults to **false**.\n\n## Contributing\nSince v3, `webob-graphql` code lives at [graphql-server](https://github.com/graphql-python/graphql-server) repository to keep any breaking change on the base package on sync with all other integrations. In order to contribute, please take a look at [CONTRIBUTING.md](https://github.com/graphql-python/graphql-server/blob/master/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-python%2Fwebob-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-python%2Fwebob-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-python%2Fwebob-graphql/lists"}