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
1
vote
1 answer
" Invalid or incomplete introspection result" error when i load the graphql endpoint for my django project
I have a Django project where I am using Graphql but after writing out only one mutation, the /graphql does not run properly, throwing the following error.
{
"message": "Invalid or incomplete introspection result. Ensure that you are passing…

Vianney K
- 11
- 3
1
vote
0 answers
TypeError: '<' not supported between instances of 'FilterSetMetaclass' and 'ID'
I am having some issues with my django app since updating my dependencies. I updated django from 2.2.28 to 3.2. The python version in the application is 3.6. I have problem with graphen.
Error:
File…

troleoaleo
- 19
- 2
1
vote
0 answers
Password reset using graphene-django?
In our on going project we are migrating all our views from django to react using graphene. Originally, we used the built in django authentication system for user registration, login and password reset. To migrate the login view, we used…

NICOLÁS ANTONIO PINO LEVA
- 25
- 1
- 4
1
vote
0 answers
'NoneType' object has no attribute 'app' in saleor
I am using saleor backend for my current project. There I have to execute saleor graphql queries and mutations inside the code. So instead of hitting graphql api using url I am using schema.execute() with query and variables. With this approach the…

Shivam Maithil
- 11
- 2
1
vote
1 answer
calling a synchronous function asynchronously in django-graphene mutation
My mutation contains a function which calls an API to send SMS.
Since this function's execution may take some time, and its result doesn't have anything to do with what the mutation returns (It does not have to be send back to the client); I prefer…

Amir Mozafar
- 11
- 4
1
vote
1 answer
How to customize graphene-django response?
I have a GraphQL API with graphene-django and I want to customize the query response. Here is the default response;
{
"data": {
"materials": {
}
},
"errors": {
}
}
However, I want to customize it like this;
{
"data": {
…

Aslı Kök
- 616
- 8
- 19
1
vote
1 answer
Django GrahpQL ACL?
Is there a Django GraphQL ACL? Like you can't access the Query/Mutation if the user has no permission.
For Example, the login user has a only permission on products Query/Mutation but no permission on human resources Query/Mutation. How can I return…

John Fernando
- 57
- 4
1
vote
1 answer
Interface for DjangoFilterConnectionField
I have two classes
class RegisteredUser(graphene.ObjectType):
class Meta:
interfaces = (BaseClient, )
name = graphene.String()
group = graphene.String()
policy = graphene.Int()
event =…

abhishekrana
- 144
- 1
- 9
1
vote
1 answer
Accessing node's full path in graphene middleware
I am trying to add some logging to my graphene server utilizing a middleware. As per the documentation (Docs - 3.2.3), I can view some limited path info from the parent by pulling out the name from the root's meta node (root._meta.name which will…

J M
- 13
- 2
1
vote
1 answer
How to perform a django filter on a related field with related name in graphene
I have an event model with a foreign keys to location and photographer models.
# event model
...
class Event(models.Model):
STATUS = (
("Scheduled", "Scheduled"),
("Cancelled", "Cancelled"),
("Available", "Available"),
…

keystroke33
- 159
- 3
- 11
1
vote
1 answer
Django models Count and Q methods are throwing type error
I'm trying to generate dynamic query based on user input values. The normal query would be like this:
result = (
my_model
.objects
.aggregate(
Type1=Count(
'pk',
filter=Q(db_field=1)),
…

mc-user
- 1,769
- 4
- 14
- 25
1
vote
1 answer
User defined fields in graphQL
Making an employee management system with graphene-Django and I have a JsonB field that I don't know the shape of because each company will defined the shape.
Here's the model:
class Employee(models.Model):
bonuses =…

Yankz Kuyateh
- 612
- 1
- 5
- 18
1
vote
0 answers
How to use the result of a graphene resolved field in another field
I have this use case:
class ProjectType(graphene.objectType):
tasks = graphene.List(TaskType)
duration = graphene.Int() # days
def resolve_tasks():
return self.tasks.all()
def resolve_duration():
return…

rymanso
- 869
- 1
- 9
- 21
1
vote
0 answers
How to filter by year, month, or day in django graphene query
I am building a django graphql api with graphene for photography events. Each event has a location, photographer and event date. I want to be able to filter all events by year, month or day, e.g. return all events happening in April 2022 or all…

keystroke33
- 159
- 3
- 11
1
vote
0 answers
Create object with multiple relations in graphene django
Hi guys I have the following models in my project
class User(AbstractUser):
email = models.EmailField(_('email address'), unique=True, blank=False, null=False)
username = None
first_name = None
last_name = None
USERNAME_FIELD =…

isaac finkelstein
- 298
- 2
- 12