graphene-python Questions

1

I've been looking into using a DataLoader in Django to optimise Graphene resolvers. I have been having trouble finding a working example of this as it requires multi threading. Based on what I can ...
Kipp asked 14/8, 2023 at 16:35

6

Solved

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 'vu...
Audley asked 9/9, 2018 at 19:17

1

I'm trying to implement GraphQL mutation for a "complex" object. Let's say we have a Contact with three fields: firstName, lastName and address, which is object with one field street: Her...
Mausoleum asked 18/5, 2017 at 5:46

1

While using graphene with Relay in django, there is an option to use filtering while querying the data. class AnimalNode(DjangoObjectType): class Meta: model = Animal filter_fields = ['name', '...
Thirdrate asked 21/7, 2018 at 9:11

4

Solved

I'm trying to do this (see title), but it's a bit complicated since the string I'm trying to build has to have the following properties: mulitiline contains curly braces I want to inject variables...
Notebook asked 15/6, 2020 at 8:23

1

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; howeve...
Foltz asked 19/9, 2020 at 2:37

1

Solved

which lib is better to integrate with a new django project? i red the docs and still doesnt know how performatic or easier to integrate each one can be in prod environment. i used graphene before t...
Touchdown asked 29/9, 2022 at 18:38

3

Solved

I almost spent 3 days to find a way for creating a dynamic schema in python graphene. the only related result I could find is the below link: https://github.com/graphql-python/graphene/blob/master/...
Omidyar asked 28/5, 2018 at 5:23

1

I have two Django models - Teacher and Student and have a many-to-many relationship. Teachers can have multiple students and students can have multiple teachers. There is 'through' model called 'Re...

6

Solved

I'm starting to wrap my head around with GraphQl/Graphene. I'm building a schema connected to a MongoDB. All seems to work so far except mutations. I've been following the example here and here wit...
Lenlena asked 15/10, 2017 at 3:15

3

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 you'r...
Goldsberry asked 31/10, 2019 at 3:7

1

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 interfaces = ...
Canica asked 23/11, 2018 at 22:11

3

Solved

I have a Graphene interface with Relay and filters. It works pretty well but I would like to add the order_by options. My objects look like: class FooGQLType(DjangoObjectType): class Meta: mode...
Cockup asked 13/8, 2019 at 13:11

4

I want to access details from Github using Github GraphQl v4 API. I found Graphene library, but I'm not sure how to authenticate with a personal access token in Python. I tried to search on Google ...
Exempt asked 30/8, 2017 at 10:18

2

Solved

I am new to Relay and am trying to put together my first app. I already have a GraphQL server (using Graphene) that is backed by a PostgreSQL DB via SQLAlchemy automap, and published as a Flask app...
Cork asked 18/10, 2017 at 11:25

1

I'm using graphene-django to build my API. I have a DjangoObjectType named StoreType which represents the model Store. This model has a MultiSelectField named opening_days that indicates what days ...
Strake asked 28/7, 2020 at 19:56

2

Solved

I have the following situation: I have a User, each user has a Inventory. I'm struggling to declare the user's inventory in the Mutation "CreateUser". Here is the following mutation for creating th...
Tobin asked 7/7, 2018 at 15:18

3

Solved

I use graphen-django for build a GraphQL API. I have succesfully create this API, but I can't pass a argument for filter my response. This is my models.py: from django.db import models class App...
Springlet asked 2/11, 2016 at 14:7

2

Solved

I have a graphene mutation like this: class User(ObjectType): username = String() class ImportUsers(Mutation): class Arguments: users = List(User) Output = List(User) @staticmethod def mu...
Self asked 21/5, 2020 at 8:54

1

My app has several many-to-many relationships with a through-model like so: class Person(models.Model): name = models.CharField() class Group(models.Model): name = models.CharField() members =...
Kameko asked 27/4, 2019 at 13:11

1

Whenever exceptions are raised they're logged in the console (and in Sentry if it's used). Many of these exceptions are only intended to be shown to the user. For example, django-graphql-jwt raise...
Gravitative asked 30/9, 2019 at 9:54

5

I'm trying to perform a GraphQL query using Django and Graphene. To query one single object using the id I did the following: { samples(id:"U2FtcGxlU2V0VHlwZToxMjYw") { edges { nodes { name }...
Wits asked 16/1, 2019 at 13:49

2

I would like to know why Relay spec is in graphene-django? I understand that using relay in graphene-django we get pagination and filters by default. My requirement is to call graphql apis from R...
Rustler asked 6/8, 2018 at 4:53

4

Solved

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{ username ...
Senhauser asked 31/3, 2019 at 14:57

1

Solved

I'm using graphene with sqlalchemy and I have an output object that contains a computed field. The field is computed according to some input (query) parameter and more or less look like this (to si...
Stannite asked 4/8, 2020 at 14:34

© 2022 - 2024 — McMap. All rights reserved.