Framework for trivial code, Easy and Fast for learn, Easy and Fast for use
Project description
Quick start
Installation
For installing graphene_django_cruddals, just run this command in your shell
pip install graphene_django_cruddals
Basic usage
To use it, simply create a new class that inherits "CruddalsModel
"
Suppose we have the following model.
class Restaurant(models.Model):
name = models.CharField(
max_length=100,
help_text='The name of the restaurant'
)
slug = models.SlugField(
help_text='The slug of the restaurant',
blank=True,
null=True,
unique=True,
editable=False,
max_length=100
)
Then we can create a complete CRUD+DALS with the following code
class CruddalsRestaurant(CruddalsModel):
class Meta:
model = Restaurant
Now you can use the schema
that was generated for you,
schema = CruddalsRestaurant.Schema
or use in your root Query
and Mutation
class Query(
# ... your others queries
CruddalsRestaurant.Query,
graphene.ObjectType,
):
pass
class Mutation(
# ... your others mutations
CruddalsRestaurant.Mutation,
graphene.ObjectType,
):
pass
schema = graphene.Schema( query=Query, mutation=Mutation, )
and this is it, now you can go to Graphiql and see the new queries and mutations that graphene django cruddals made for you
Documentation
Coming soon!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for graphene_django_cruddals-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e34cf52bae297e467475e7c600b57b031c707536e85dec24bc411fa3acc5afec |
|
MD5 | cf6df1cc33aacfc5de3d56358f2b61db |
|
BLAKE2b-256 | 4f4a096d6ca7914a4e110bc0129d69485bcb6e921b3578985c2c80ec09bb6b7d |
Close
Hashes for graphene_django_cruddals-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2778c38d65ec4357e6be46b05d0deef92b0ce6e3e172f1a1525c511ff81d52e |
|
MD5 | 0be0a81de5a0271466b5c4f9e2b92be1 |
|
BLAKE2b-256 | 295f7de6ce33a48debc56572bd8da5a3bc48d77985dd2d61662671cbde6ffe88 |