arquillian warp NoClassDefFoundError

I have a project using arquillian 1.1.1.Final and I have some working tests using graphene and other extensions. Now I would like to add some tests with warp. But I am getting a...

Custom ConnectionField in graphene

I'm not understanding how to use custom fields in a ConnectionField in graphene. I have something like: class ShipConnection(Connection): extra = String() class Meta: node =...

Django ImportError at /graphql

Just can't understand what's wrong at all: Could not import 'ss.schema.schema' for Graphene setting 'SCHEMA'. AttributeError: type object 'Query' has no attribute '_meta'. This is my Query class...

Apollo client: How to simply debug a 400 code error?

I'm using Apollo-client and I don't understand why this is so hard to debug my error: I'm trying to perform a mutate call on my graphene python implementation of GraphQL. It end up with a 400...

How to limit field access on a model based on user type on Graphene/Django?

Let's say I have a model: class Employee(models.Model): first_name = models.CharField(max_length=40) last_name = models.CharField(max_length=60) salary =...

Authentication/Authorization for default resolvers

I read the description on how to use @login_required and other decorators with resolvers. However, if one is not using explicit resolvers (instead using default ones), how can one enforce similar...

Python graphql exception handling: Is it expected to get errors array with 200 OK response?

According to the documentation in https://www.howtographql.com/graphql-python/6-error-handling/ I use raise GraphQLError to show errors in my Flask GraphQL app mutate functions, like this...

A custom argument in graphene-django

How do I create a custom argument in GraphQL with graphene-django? I currently have this configuration in my schema.py: class Post(DjangoObjectType): class Meta: model = FeedPost ...

Graphene and Django about relationships

I'm very new to Graphene and testing it to see if i could use it for a Django project with complex queries. To test it, i'm trying to create an Ecommerce with the following models class...

apollo client:codegen typescript with @client query fields

Sorry if this is a bit involved, but I'm really trying to close the last mile on being able to use Apollo Client for local as well as server state, with automatic Typescript everywhere. To wit, I...

Delete mutation in Django GraphQL

The docs of Graphene-Django pretty much explains how to create and update an object. But how to delete it? I can imagine the query to look like mutation mut{ deleteUser(id: 1){ user{ ...

Is there a way to get graphene to work with django GenericRelation field?

I have some django model generic relation fields that I want to appear in graphql queries. Does graphene support Generic types? class Attachment(models.Model): user =...

Scraping and parsing citation info from Google Scholar search results

I have a list of around 20000 article's titles and i want to scrape their citation count from google scholar. I am new to BeautifulSoup library. I have this code: import requests from bs4 import...

How to show specific field only to the user profile owner in graphene-django?

I have the following schema in my graphene-django application: import graphene from django.contrib.auth import get_user_model from graphene_django import DjangoObjectType class...

Using GraphQL machinery, but return CSV

A normal REST API might let you request the same data in different formats, with a different Accept header, e.g. application/json, or text/html, or a text/csv formatted response. However, if...

How change the Connection Arguments (after, before) in graphene-python (relay)?

Using: Django 3.x [ Django-Filters 2.2.0, graphene-django 2.8.0, graphql-relay 2.0.1 ] Vue 2.x [ Vue-Apollo ] After applying some filters (iContains etc.) on my graphQL search i tried to change...

Django graphene GraphiQL page not loading when running from Uvicorn

Not sure what I set wrong but I am not getting the graphiql interface when running in uvicorn using uvicorn mysite.asgi:application: [32mINFO[0m: Started server process...

How to send cookies using Hasura

I am using Hasura to interface with a graphql endpoint on my django project using Graphene. I need to ensure that the user has authenticated for all calls to the graphql endpoint. In a typical...

Send files via Apollo Client and receive in Graphene Flask server

I'm using Graphene package in my Flask app (https://github.com/graphql-python/graphene) and graphene-file-upload (https://pypi.org/project/graphene-file-upload/). I need to receive a file through...

How to use a django abstract class with graphene-django?

I'm trying to have a unique interface for two concrete classes that are similar and inherit from a common abstract class. My django model classes: class Metadata(models.Model): name =...

Returning a list of enums with string values with Graphene

This is using Python and the Graphene library. I want to provide a list of constants to my front-end via GraphQL. I went down the route of using inspection, but it will only output the keys of the...

How to write a GraphQL query that will use a range filter on an integer field using `django-filters`?

I am using graphene-python, django-filters and relay in my GraphQL API. Let's imagine I have a type FrameType which has an integer field time_offset and I would like to be able to use a range on...

Filter Embedded Document List in GraphQL

I'm building a GraphQL application in Python/Graphene using a MongoDB backend (through MongoEngine). Everything has been working well, but noticed that there's not a lot documentation for handling...

Django GraphQL JWT: tokenAuth mutation returns "str object has no attribute decode"

Currently I'm running a basic example of django-graphqljwt from the documentation page. https://django-graphql-jwt.domake.io/en/latest/quickstart.html import graphene import graphql_jwt class...

`op_name` parameter for `graphene_django`

The django graphene documentation shows a test example like this: class MyFancyTestCase(GraphQLTestCase): def test_some_query(self): response = self.query( ''' ...

How to customize errors with django-graphql-auth?

I'm working on a project with Django and Graphene, with the library of django_graphql_auth to handle authentication, and i was asked to customize the error message that we receive when we fail a...

AWS Lambda function using CognitoIdentityServiceProvider's adminCreateUser method is failing all of a sudden

In the past few days I've been testing a certain flow using AWS Lambda functions and my lambda function that gets triggered after a pre-sign up in the Cognito User pool was working fine and...

Get RequestError(400, 'search_phase_execution_exception', 'runtime error') for cossimilarity

I am trying to do semantic search with Elasticsearch using tensorflow_hub, but I get RequestError: RequestError(400, 'search_phase_execution_exception', 'runtime error'). From...

How to get the Refresh Token with the django-graphql-social-auth library

Hi I am using the django-graphql-social-auth library and whenever I create a social user using this mutation: import graphene import graphql_social_auth class Mutations(graphene.ObjectType): ...

Graphql bottleneck performance with nested query (Django + React ) makes frontend app unusable. Please help :'(

For this project Im using Python+Django and GraphQL (graphene) in the backend, MySQL as database and React.js for the frontend. In the frontend, after user logs in, I have the following query to...