Giter Site home page Giter Site logo

Comments (4)

geekashu avatar geekashu commented on May 31, 2024

Any guiding pointers? Anyone?

from graphene-django-cud.

geekashu avatar geekashu commented on May 31, 2024

Here is what I have done so far, I am still struggling. I am leaving the custom field option for now. I think nested fields can work for my use case.

class DashboardUpdateMutation(DjangoPatchMutation):
    class Meta:
        model = Dashboard
        login_required = True
        many_to_one_extras = {
            "dashboard_widgets": {
                "update": {"type": "WidgetUpdateInput!"}
            }
        }
mutation{
  updateDashboard(id: "RGFzaGJvYXJkTm9kZTox", input: {
    name: "Main Dashboard",
    dashboardWidgetsUpdate: [
      {id: "V2lkZ2V0Tm9kZToxMQ==", layout: "{\"x\":0,\"y\":0,\"w\":12,\"h\":3}"},
      {id: "V2lkZ2V0Tm9kZToy", layout: "{\"x\":0,\"y\":0,\"w\":12,\"h\":3}"},
      {id: "V2lkZ2V0Tm9kZTox", layout: "{\"x\":0,\"y\":0,\"w\":12,\"h\":3}"},
  ],

  }) {
    dashboard {
                id,
                name,
                dashboardWidgets{
                    edges{
                        node{
                            id,
                            name,
                        }
                    }   
                }
            },
  }
}

But I am getting errors on executing mutation Argument \"input\" has invalid value {name: \"Main Dashboard\",

from graphene-django-cud.

tOgg1 avatar tOgg1 commented on May 31, 2024

Hi Geekashu. Sorry about the slow response.

Adding custom fields is on the TODO-list. I'll fast track it and get it out in 0.7.0.

from graphene-django-cud.

tOgg1 avatar tOgg1 commented on May 31, 2024

Closed by #42.

from graphene-django-cud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.