{ "info": { "author": "Tiago Requeijo", "author_email": "tiago.requeijo.dev@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "    \n
\n\n# wagtail-graphql\n> An app to automatically add GraphQL support to a Wagtail website\n\nThis [Wagtail](https://wagtail.io/) app adds [GraphQL](https://graphql.org/) types to other Wagtail apps. The objective is for this library to interact with an existing website in a generic way and with minimal effort.\nIn particular, it makes minimal assumptions about the structure of the website\nto allow for a generic API.\n\n## Installing / Getting started\n\nTo install as a general app:\n\n```shell\npip install wagtail-graphql\n```\n\nAdd it together with [graphene_django](https://github.com/graphql-python/graphene-django) to the Django INSTALLED_APPS:\n\n```python\nINSTALLED_APPS = [\n ...\n 'wagtail_graphql',\n 'graphene_django',\n ...\n]\n\n```\n\n### Initial Configuration\n\nAdd the required [graphene](https://github.com/graphql-python/graphene) schema `GRAPHENE` and a `GRAPHQL_API` dictionary.\nInclude all the Wagtail apps the library should generate bindings to in the `APPS` list and optionally specify the prefix for each app in `PREFIX`. To remove a leading part of all the urls for a specific site, specify the `URL_PREFIX` parameter for each needed host.\n\n```python\nGRAPHENE = {\n 'SCHEMA': 'wagtail_graphql.schema.schema',\n}\n\nGRAPHQL_API = {\n 'APPS': [\n 'home'\n ],\n 'PREFIX': {\n 'home': '' # optional, prefix for all the app classes generated by the wrapper\n },\n 'URL_PREFIX': {\n 'localhost': '/home' # optional, read from the site information if not specified \n }\n}\n```\nThe example above generates bindings for the `home` app, . Every url in this example\nwill be stripped of the initial `/home` substring.\n\nFinally, set up the GraphQL views in the project `urls.py`.\nFor example, to add two endpoints for GraphQL and the [GraphiQL](https://github.com/graphql/graphiql) IDE: \n\n```python\nfrom django.views.decorators.csrf import csrf_exempt\nfrom graphene_django.views import GraphQLView\n\nurlpatterns = [\n ...\n url(r'^api/graphql', csrf_exempt(GraphQLView.as_view())),\n url(r'^api/graphiql', csrf_exempt(GraphQLView.as_view(graphiql=True, pretty=True)),\n ...\n]\n```\nNote that the urls above need to appear before the `wagtail_urls` catchall entry.\n\n#### Images\n\nTo be able to generate urls for images the following also needs to be included in the project's `urls.py`:\n\n```python\nfrom wagtail.images.views.serve import ServeView\n\nurlpatterns = [\n ...\n url(r'^images/([^/]*)/(\\d*)/([^/]*)/[^/]*$', ServeView.as_view(), name='wagtailimages_serve'),\n ...\n]\n```\n\n\n### Multi-site configuration\nThis library works transparently with a multi-site Wagtail install without any extra configuration required. To strip a custom leading prefix for each site, specify each host in the `URL_PREFIX`. For exaple, for two hosts `host1.example.com` and `host2.example.com`:\n\n```\nGRAPHQL_API = {\n ...\n 'URL_PREFIX': {\n 'host1.example.com': '/prefix1',\n 'host2.example.com': '/prefix2'\n }\n ...\n}\n```\nNote that the prefix for a site is taken from the root page url if a host is not included in the `URL_PREFIX` dictionary. \n\n\n## Developing\n\nTo develop this library, download the source code and install a local version in your Wagtail website.\n\n\n## Features\n\nThis project is intended to require minimal configuration and interaction. It currently supports \n\n* [Page models](https://docs.wagtail.io/en/master/topics/pages.html)\n* [Snippets](https://docs.wagtail.io/en/master/topics/snippets.html)\n* Images\n* Documents\n* [StreamFields](https://docs.wagtail.io/en/master/topics/streamfield.html) with [Basic Blocks](https://docs.wagtail.io/en/naster/topics/streamfield.html#basic-block-types) and [StructBlocks](https://docs.wagtail.io/en/master/topics/streamfield.html#structblock) \n \n\n## Contributing\n\nIf you'd like to contribute, please fork the repository and use a feature\nbranch. Pull requests are welcome.\n\n## Links\n\n- Repository: https://github.com/tr11/wagtail-graphql\n- Issue tracker: https://github.com/tr11/wagtail-graphql/issues\n\n## Licensing\n\nThe code in this project is licensed under MIT license.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tr11/wagtail-graphql", "keywords": "wagtail,graphql,api,wagtail-graphql", "license": "MIT", "maintainer": "Tiago Requeijo", "maintainer_email": "tiago.requeijo.dev@gmail.com", "name": "wagtail-graphql", "package_url": "https://pypi.org/project/wagtail-graphql/", "platform": "", "project_url": "https://pypi.org/project/wagtail-graphql/", "project_urls": { "Homepage": "https://github.com/tr11/wagtail-graphql", "Repository": "https://github.com/tr11/wagtail-graphql" }, "release_url": "https://pypi.org/project/wagtail-graphql/0.3.0/", "requires_dist": [ "graphene_django (>=2.2,<3.0)", "graphene_django_optimizer (>=0.3.5,<0.4.0)", "wagtail (>=2.3,<3.0)", "wagtailmenus (>=2.12,<3.0); extra == \"menus\"", "python-dateutil (>=2.6,<3.0)" ], "requires_python": ">=3.6,<3.8", "summary": "An app to automatically add GraphQL support to a Wagtail website", "version": "0.3.0" }, "last_serial": 4976817, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "f7290866ed3dc7f54a82c5e16aa4b5b1", "sha256": "7e8db5a803711de277bbed205d4bdf577fac7e72076679e23bd30c5ef3644fa5" }, "downloads": -1, "filename": "wagtail_graphql-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f7290866ed3dc7f54a82c5e16aa4b5b1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<3.8", "size": 43545, "upload_time": "2019-01-03T20:02:50", "url": "https://files.pythonhosted.org/packages/6d/3c/1684ccb4e8a2406bd96956683bd710fae2b1cbe60e13e6be879611beb7a8/wagtail_graphql-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "910e9af47270dbbf7ab7f3205eab9480", "sha256": "b32ce048d1d19832d82603c70ef3346d99a4d9c8f197228ab4b21632622d1597" }, "downloads": -1, "filename": "wagtail-graphql-0.1.2.tar.gz", "has_sig": false, "md5_digest": "910e9af47270dbbf7ab7f3205eab9480", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 13412, "upload_time": "2019-01-03T20:02:48", "url": "https://files.pythonhosted.org/packages/ef/fe/7d42d13e5d6a0d53540e08173d86a1ecba326581f55f2e7b403869c06af3/wagtail-graphql-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "dcf05d41241f004719dc33fb0cce75dc", "sha256": "68d41f2ac4a21cf15b79c6a6c871e51920ff2756edf3712c923a82b5d7831bb7" }, "downloads": -1, "filename": "wagtail_graphql-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "dcf05d41241f004719dc33fb0cce75dc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<3.8", "size": 46620, "upload_time": "2019-01-04T21:44:36", "url": "https://files.pythonhosted.org/packages/37/fc/a40166011af11f69bbe47b775c6dcaf935ddcbf7627fb6ef861797bb30f1/wagtail_graphql-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c292eb74d4a04e38dfb81a8284acf16d", "sha256": "cd227adc00c99e9b42e934debad78a67449ac8742dbd3565e202075198a7fa27" }, "downloads": -1, "filename": "wagtail-graphql-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c292eb74d4a04e38dfb81a8284acf16d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 14501, "upload_time": "2019-01-04T21:44:34", "url": "https://files.pythonhosted.org/packages/e8/f3/040eee9248da9a268abe0b8e5382bcb61f0039e8ff713a92530be2d83677/wagtail-graphql-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "234d83724a36a04ae8a8fce50c5addfa", "sha256": "3cb3b23cb55a5299ac8414aafe608c0f7b6e97b1509b90d9b1810a691ef9f563" }, "downloads": -1, "filename": "wagtail_graphql-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "234d83724a36a04ae8a8fce50c5addfa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<3.8", "size": 56467, "upload_time": "2019-01-06T21:42:12", "url": "https://files.pythonhosted.org/packages/2f/4a/d1d1fc7b6cb86f9677de7986c7ee5a2413d995c943a6deab09645410fd38/wagtail_graphql-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e792fa331673135e375ebbd5d6d9877", "sha256": "bb1b44ceba751cf33835c00de06c8c04f602421bd41fe19cd881caad6fc3e75a" }, "downloads": -1, "filename": "wagtail-graphql-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5e792fa331673135e375ebbd5d6d9877", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 16071, "upload_time": "2019-01-06T21:42:10", "url": "https://files.pythonhosted.org/packages/dc/45/458bbf8db9b4f959f965b96a6dc870187129988ce13a4653609c0607bfec/wagtail-graphql-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "bd3b3c0ed91eeb0fea1b7bdb8b3bcac0", "sha256": "4ee4ad6c3f4f2b065167a7f1004e9ea40a963f6d4e3d98660a2bd2df321a4df1" }, "downloads": -1, "filename": "wagtail_graphql-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bd3b3c0ed91eeb0fea1b7bdb8b3bcac0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<3.8", "size": 58509, "upload_time": "2019-02-25T17:33:29", "url": "https://files.pythonhosted.org/packages/64/e9/5b09f48952b2ebe0a881c6a2a4c225681b3264baed1a5305abda15b7b7a3/wagtail_graphql-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7caf76b163f303128ddb4fef9ee93cc9", "sha256": "628e45728e3f2eb276d99f71a691bbd1e909cfc09360d90d89cbe7269501df0a" }, "downloads": -1, "filename": "wagtail-graphql-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7caf76b163f303128ddb4fef9ee93cc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 16739, "upload_time": "2019-02-25T17:33:27", "url": "https://files.pythonhosted.org/packages/8a/27/fa442476fb7606a7ba32b4c23e90b91d99eb805aeb78f31ee5e9f0d66f60/wagtail-graphql-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "dc4f5e53fcc269027b62c6b873e3564b", "sha256": "2caaadb9da90fbfc16bd83a5a594a4c5863963fdf6fc2a35cac488b801ef6c7c" }, "downloads": -1, "filename": "wagtail_graphql-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "dc4f5e53fcc269027b62c6b873e3564b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<3.8", "size": 58897, "upload_time": "2019-03-23T22:35:01", "url": "https://files.pythonhosted.org/packages/d1/b5/113159aebe32dfba01ca47f741b3c94895bce16a2dcdfe89d66690b8092d/wagtail_graphql-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47fc8713c876439e8b33eefe99a07cb3", "sha256": "bacce50d7ee71eec13a2c89fdf25effff7cf3b9808f48c48755db2f227031f15" }, "downloads": -1, "filename": "wagtail-graphql-0.3.0.tar.gz", "has_sig": false, "md5_digest": "47fc8713c876439e8b33eefe99a07cb3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 16947, "upload_time": "2019-03-23T22:34:59", "url": "https://files.pythonhosted.org/packages/b7/b5/cfe77909286598aea28145f46b2eba9ff98d95b587dcb4cea03c07d478b4/wagtail-graphql-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dc4f5e53fcc269027b62c6b873e3564b", "sha256": "2caaadb9da90fbfc16bd83a5a594a4c5863963fdf6fc2a35cac488b801ef6c7c" }, "downloads": -1, "filename": "wagtail_graphql-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "dc4f5e53fcc269027b62c6b873e3564b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<3.8", "size": 58897, "upload_time": "2019-03-23T22:35:01", "url": "https://files.pythonhosted.org/packages/d1/b5/113159aebe32dfba01ca47f741b3c94895bce16a2dcdfe89d66690b8092d/wagtail_graphql-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47fc8713c876439e8b33eefe99a07cb3", "sha256": "bacce50d7ee71eec13a2c89fdf25effff7cf3b9808f48c48755db2f227031f15" }, "downloads": -1, "filename": "wagtail-graphql-0.3.0.tar.gz", "has_sig": false, "md5_digest": "47fc8713c876439e8b33eefe99a07cb3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<3.8", "size": 16947, "upload_time": "2019-03-23T22:34:59", "url": "https://files.pythonhosted.org/packages/b7/b5/cfe77909286598aea28145f46b2eba9ff98d95b587dcb4cea03c07d478b4/wagtail-graphql-0.3.0.tar.gz" } ] }