question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Saving data into vuex coming from django-graphene backend.

See original GitHub issue

Hi,

First of all thank you for vuex-orm. For me is just a dream come true to be able to replicate a part of back-end data to front-end and using vuex-orm-graphql to be able to do int in one request. I think this is a amazing project.

Now i try to use vuex-orm-graphql plugin, and i have some issues in implementing it in my project. I am sending following query: screen shot 2018-07-30 at 14 36 15

And i receive the following response: screen shot 2018-07-30 at 14 39 29

Until this point all is as expected.

I would like to save a list of articles into store. Now i need somebody to point me in the right direction because everything that i had tried failed. My last “working” aka no errors saved in the store:

screen shot 2018-07-30 at 14 45 47

Also tried to create articleModel and articlesModel that has a many relation to articleModel. Failed. I do receive this in console:

Vuex-ORM: GraphQL Plugin Ignoring entity article because it's not in the schema.

I am doing something wrong and now i am out of ideas.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andreisimacommented, Aug 1, 2018

Thank you.

I also will continue this investigation further, right now i am hands deep in Transformer and in Store.insertData Up so far i have managed to get 10 records inserted in the store but they are not as expected

> data:Object
   >  _no_key_1:Object
            $id:"_no_key_1"
            $isPersisted:false
    >  _no_key_2:Object
            $id:"_no_key_2"
            $isPersisted:false
.......

I will dig more into this. As a info for you am am using Facebook Relay specs because that is what my back-end follows. If i try to customise the output (that can be done) i am losing all the good stuff that is coming by default (first, last, cursor, etc. ), and i fell no joy in implementing them manually, if can be done.

I will try to provide a PR and maybe a fix for it. I am not that proficient in JS but i can try.

0reactions
phortxcommented, Oct 6, 2018

This is fixed by @WitteStier with #58 . Thank you very much!

I will release RC 17 now so you guys can test if this works for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to structure a mutation in vuex orm graphql to connect ...
I'm having problems making queries and creating / updating / deleting things in django graphql through the graphql plugin of vuex orm. From...
Read more >
Create a Fullstack app with Django, GraphQL and VueJS
This tutorial introduces the concept of building and using a django backend to serve your VueJS application using GraphQl (Graphene) as your ...
Read more >
Create a Modern Application with Django and Vue #2
Let's start by setting up GraphQL in the backend. We need to install a new package called graphene-django . Run the following command: ......
Read more >
Vue.js and Django - Reddit
Hello my fellow Djangonauts! I'm going to be starting a new job in a couple weeks using Vue.js with Django, and I was...
Read more >
Do you need GraphQL with Django? - DEV Community ‍ ‍
Tagged with graphql, javascript, django, productivity. ... information that you need from UI and trigger actions (mutations) to send data to the backend....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found