Tag: django
-
Graphene-python performance issues for large data sets
20 The bounty expires in 3 days. Answers to this question are eligible for a +100 reputation bounty. pdoherty926 is looking for a canonical answer. Currently using graphene-python with graphene-django (and graphene-django-optimizer). After receiving a GraphQL query, the database query is successfully completed in a fraction of a second; however, graphene doesn’t send a response…
-
Graphene-python performance issues for large data sets
20 The bounty expires in 3 days. Answers to this question are eligible for a +100 reputation bounty. pdoherty926 is looking for a canonical answer. Currently using graphene-python with graphene-django (and graphene-django-optimizer). After receiving a GraphQL query, the database query is successfully completed in a fraction of a second; however, graphene doesn’t send a response…
-
GraphQL Queries Per App in Django (Graphene)
0 I started moving my REST API endpoints to using GraphQL with Graphene. Seems pretty straightforward so far, but one of the things that I like about the REST API (and I cannot figure out in Graphene) is the structure of "endpoints" for each app. I have a lot of apps in my Django application,…
-
Need to create checkout session GraphQL + Django
0 I need to create a session for Stripe Checkout. According to Stripe Checkout Docs: Add an endpoint on your server that creates a Checkout Session. A Checkout Session controls what your customer sees in the Stripe-hosted payment page such as line items, the order amount and currency, and acceptable payment methods. Return the Checkout…
-
Strawberry with social_django
0 How can I use social_django with strawberry graphql? With graphene, I inherited my strawberry.type from SocialAuthJWT I used in grapgene like this. class SocialAuth(graphql_social_auth.SocialAuthJWT): user = graphene.Field(UserType) @classmethod def resolve(cls, root, info, social, **kwargs): social.user.is_verified = True social.user.save() token = get_token(social.user) return cls(user=social.user, token=token) I’d like to log in with google. python python-3.x django…
-
graphene-django updated now receiving error (reading ‘SubscriptionClient’)
0 I have a app who use graphql so far i was with those requirements : aniso8601==7.0.0 asgiref==3.4.1 attrs==22.1.0 boto3==1.26.13 botocore==1.29.91 certifi==2021.10.8 cffi==1.15.0 charset-normalizer==2.0.7 coreschema==0.0.4 cryptography==3.4.7 defusedxml==0.7.1 Django==3.2.8 django-classy-tags==3.0.1 django-cors-headers==3.10.0 django-graphiql==0.4.4 django-graphql-jwt==0.3.4 django-health-check==3.17.0 django-model-utils==4.2.0 django-sekizai==3.0.1 django-storages==1.13.1 docutils==0.18 exceptiongroup==1.0.1 graphene==2.1.9 graphene-django==2.15.0 graphql-core==2.3.2 graphql-relay==2.0.1 httpie==2.6.0 idna==3.3 iniconfig==1.1.1 itypes==1.2.0 Jinja2==3.0.2 jmespath==0.10.0 JSON-log-formatter==0.5.2 MarkupSafe==2.0.1 packaging==21.3 pluggy==1.0.0 promise==2.3 psycopg2-binary==2.9.3 pycparser==2.21…
-
import error ‘force_text’ from ‘django.utils.encoding’
49 I’m implementing a graphql solution using python, graphene and django and I’m getting the following import error: Result: Failure Exception: ImportError: cannot import name ‘force_text’ from ‘django.utils.encoding’ "/home/site/wwwroot/.python_packages/lib/site-packages/graphene_django/utils/utils.py", line 6, in <module> from django.utils.encoding import force_text I’m not sure about the versions and whether I need to import an additional module. My requirements.txt is…
-
header for authentication in django and graphql
0 { "Authorization": "JWT token" } and in graphQL my query is : query{ allStudents{ name roll } } but stil does’t work for me I am expecting to secure my api end point because all will create tokenauth then can access data import graphene from graphene_django.types import DjangoObjectType import graphql_jwt from .models import Student…
-
Django GraphQL Endpoint Not Found When Requested via Krakend API Gateway
0 Hello StackOverflow Community, I am currently experiencing an issue with a Django project using GraphQL, specifically when attempting to access the GraphQL endpoint through the Krakend API Gateway. Environment: Django: 4.2.6 GraphQL Krakend API Gateway Dockerized environment Problem: When I send a request directly to the Django backend’s /graphql endpoint, it works as expected.…
-
Apollo-client returns “400 (Bad Request) Error” on sending mutation to server
13 I am currently using the vue-apollo package for Apollo client with VueJs stack with django and graphene-python for my GraphQl API. I have a simple setup with vue-apollo below: import Vue from ‘vue’ import { ApolloClient } from ‘apollo-client’ import { HttpLink } from ‘apollo-link-http’ import { InMemoryCache } from ‘apollo-cache-inmemory’ import VueApollo from…