Skip to main content

Opencrud Graphene Django implementation

Project description

# OpenCrud Graphene Django implementation

## Usage

import graphene
from graphene_django.types import DjangoObjectType

from django.contrib.auth import models as auth_models
from graphene import Node

from opencrud.connection import WithOpenCrudConnection
from opencrud.list import OpenCrudDjangoFilterListField
from opencrud.filter import OpenCrudDjangoFilterConnectionField
from opencrud.field import OpenCrudDjangoField

class User(DjangoObjectType):
class Meta:
filter_fields = ('id', 'email', )
interfaces = (Node, )

class Query(graphene.ObjectType):
user = OpenCrudDjangoField(User)
users = OpenCrudDjangoFilterListField(User)
users_connection = OpenCrudDjangoFilterConnectionField(User)

## Contributing

After cloning this repo, ensure dependencies are installed by running:

pip install -e ".[test]"

After developing, the full test suite can be evaluated by running:

py.test opencrud --cov=opencrud # Use -v -s for verbose mode

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for graphene-django-opencrud, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size graphene_django_opencrud-1.0.0-py3-none-any.whl (12.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size graphene-django-opencrud-1.0.0.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page