How to use the ariadne.contrib.django.views.GraphQLView.as_view function in ariadne

To help you get started, we’ve selected a few ariadne examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mirumee / ariadne / tests / django / test_query_execution.py View on Github external
def view(schema):
    return GraphQLView.as_view(schema=schema)
github mirumee / ariadne / tests / django / test_configuration.py View on Github external
def execute_query(request_factory, schema, query, **kwargs):
    view = GraphQLView.as_view(schema=schema, **kwargs)
    request = request_factory.post(
        "/graphql/", data=query, content_type="application/json"
    )
    response = view(request)
    return json.loads(response.content)
github rafalp / Misago / misago / graphql / admin / __init__.py View on Github external
def register_urlpatterns(self, urlpatterns):
        # GraphQL API
        urlpatterns.namespace(r"^graphql/", "graphql")
        urlpatterns.patterns(
            "graphql", url(r"^$", GraphQLView.as_view(schema=schema), name="index")
        )