Use this tag for questions about Graphene-Django, integration features of Graphene (a framework for building GraphQL APIs) that are designed to make working with Django simple.
Questions tagged [graphene-django]
386 questions
0
votes
1 answer
How to return a function as a query result in graphene?
I have a post model, and I want to know if the currently logged in user has liked the post or not:
Would something like this work or should I use a different request to know if the user has liked/not liked the post:
class…

Mati
- 61
- 1
- 3
0
votes
0 answers
Graphene-Django, fetching 10,000+ data points
I am building a backend GraphQL service with Django & Graphene and I am having trouble with figuring out what the best way would be to fetch thousands of data points in a performant manner.
Some context, we have an experiment that has 35,000 data…

kennycodes
- 526
- 3
- 11
- 19
0
votes
1 answer
default value of model.UUIDField() doesnt seem to be called in django graphene
I am trying to build an application with django and graphene and I want to set a default value for one of the fields in my model. The mutation is really straight forward. I've passed all the required arguments as objects and the optional ones with…

Samarth Kathal
- 11
- 2
0
votes
1 answer
Problem with vuedraggable and apollo mutation
In my project I'm using Django - graphene-django (graphQL) - Apollo - VueJS - Vuetify and for the drag and drop concerns I'm trying to use Vuedraggable.
I'm actually trying to build a kanban board with columns and cards to move from column to …

lbris
- 1,068
- 11
- 34
0
votes
1 answer
Graphene Django disable suggestions "Did you mean ..."
When you post an query with syntax errors graphql/graphene makes suggestions to you. By example, sending "i", it suggest "ID".
query{
users{
i
}
}
{
"errors": [
{
"message": "Cannot query field \"i\" on type \"User\". Did…

cristhiam
- 496
- 1
- 4
- 17
0
votes
1 answer
Graphen Django Dynamic Query
Is there any way to create Dynamic queries in django graphene without mentioning object type. What I am currently doing is I created an ObjectType class and with a string type field and when I call the query i send the model name as an argument and…
0
votes
1 answer
Graphene_django Mutatation
I'm trying to make a mutation of user model via graphql (graphene_django).
Here is a code sample.
class UserMutation(graphene.Mutation):
class Arguments:
email = graphene.String(required=True)
name = graphene.String(required=True)
…

Exoriri
- 327
- 3
- 21
0
votes
1 answer
How can I call a django model function in a graphene resolver?
I have model with getQuality function defined in it.
Graphql type is
class Person(DjangoObjectType):
class Meta:
model = PersonModel
quality = graphene.String()
def resolve_quality(self, info):
person =…

a-c-sreedhar-reddy
- 568
- 4
- 14
0
votes
1 answer
django graphene rate limit (throttling)
I am building a REST Api on Django RF. I need to set a requests limit from IP. It's easy to do that for a regular Api endpoint in views.py just adding following settings
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': [
…

Константин Манойло
- 176
- 3
- 14
0
votes
1 answer
How we can make filtered query in schema.py in graphene-django project without using Relay feature?
I am new to back-end programming especially in graphene-django.
my question is how can we create filtered query in schema.py in graphene-django project without using Relay feature? i saw this before but i don't want to use Relay feature. rather…

Hossein Vejdani
- 961
- 8
- 19
0
votes
1 answer
Graphene always returning "none" in Json
Im fairly new to GraphQL and Graphene so it's hard for me to grasp whats wrong with my code. I can't even succeed with the simplest of the examples with GraphQL. Here is my code:
models.py
class Task(models.Model):
task_name =…

Helmut K.
- 121
- 1
- 3
- 11
0
votes
1 answer
updateMutation doesn't update data
My goal is to update and display new data for {data.contact.contactInformation} automatically, once I click the button for the updateMutation. However, it only works once I refresh the page. From my understanding, the IDs must be returned and then…

Joey Coder
- 3,199
- 8
- 28
- 60
0
votes
1 answer
How to access authenticated user in graphene-django resolve method?
I have added this to my Query class and it's returning null in response.
me = graphene.Field(UserType)
def resolve_user(root, info):
logger.info("***** Inside resolve ****")
return info.context.user
and my UserType is defined like…

manu
- 1,072
- 1
- 14
- 26
0
votes
1 answer
Graphql trying to create an object of get_user_model : __init__() got an unexpected keyword argument 'request'
I've recently started learning GraphQL. I created a Mutation for a custom-defined model and it's working fine. But when I try to do the same for the Django built-in user model. I'm getting an error. Not able to resolve it.
I'm trying to create a new…

m0dknight
- 169
- 1
- 10