Comments (2)
Is there any update on this?
from graphene-django-cud.
Hi I have these models
class package(models.Model): items = models.ManyToManyField('product.item', verbose_name=_("Items"), related_name="package_items") class item(models.Model): products = models.ManyToManyField('product.product', verbose_name=_("Products"), null=True, blank=True) class product(models.Model): options = models.ManyToManyField("product.option", verbose_name=_("Product options"), null=True, blank=True)
and this is my mutation for
package
anditem
class create_package(DjangoCreateMutation): class Meta: model = package many_to_many_extras = { 'items': { 'add':{'type': 'CreateitemInput'} } } class create_item(DjangoCreateMutation): class Meta: model = item many_to_many_extras = { 'products': { 'add':{'type': 'CreateproductInput'} } } class create_product(DjangoCreateMutation): class Meta: model = product many_to_many_extras = { 'options': { 'add':{'type': 'CreateoptionInput'} } }
And when I run a mutation like this:
mutation{ createPackage( input:{ name:"random" description:"boring" sideBarText:"sample" items:[ 1 ] itemsAdd:[ { name:"bla bla bla" displayName:"kdjhb" products:[ "cHJvZHVjdF90eXBlOjE=" ] productsAdd:[ { name:"product bla" description:"double trouble" price:"99.99" } ] } ] } ){ package{ name items{ edges{ node{ name products{ edges{ node{ name price } } } } } } } } }
I only get the added product returned, why isn't the other product being added?
many-to-many is working on my side
Please can you highlight or point out which item is added and which ones are not added?
from graphene-django-cud.
Related Issues (20)
- How to query errors from the mutation result? HOT 1
- This package ROCKS!!! HOT 1
- many_to_one_extras not correctly saving reverse relations
- Cryptic error message on `unique_together` error when using DjangoPatchMutation
- Mutations and DateField issue in graphene-django-cud code
- Improve documentation
- Incompatibility with latest graphene-django v3.1.2, due to import of `compat.JSONField`
- Release after graphene-django's compat.JSONField removal HOT 1
- Missing documentation in "Nested fields" about excluding fields
- many_to_many_extras with through table referencing the same model HOT 2
- Respect Django's own validation mechanism HOT 7
- Some proposals for improvement HOT 1
- Make it possible to configure calling `obj.full_clean` on all mutations as a part of natural object validation HOT 3
- [Batch mutations]: Create a hook for altering a single object's input data
- Add support for optional foreign keys with foreign_key_extras
- Add get_or_create support for foreign_key_extras
- Any way to generate InputTypes without writing a mutation class? HOT 2
- Getting error 'super' object has no attribute 'items' when performing a create mutation on model with a ForeignKey on itself
- Nested one-to-one fields
- End of life HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphene-django-cud.