graphene-python Questions
5
Solved
I have a backend server in python (Flask + Graphene) and I need to return a JSON object like this:
{
's1': "Section 1",
's2': "Section 2",
's3': "Section 3",
's4': "Section 4"
}
The resolver...
Jaundice asked 14/8, 2018 at 9:21
2
Solved
I am following this tutorial for using Graphene with Django, and everything was going smooth, until I reached the Integration with Django Rest Framework section.
This section says that you can reu...
Baroscope asked 1/4, 2019 at 20:51
4
I'd like to know whether it is possible to get the "original id" of an object as the result of the query. Whenever I make a request to the server, it returns the node "global identifier", something...
Eightfold asked 29/9, 2017 at 13:49
2
I'm a newbie for the graphene and I'm trying to map the following structure into a Object Type and having no success at all
{
"details": {
"12345": {"txt1": "9&...
Germiston asked 25/9, 2017 at 9:46
3
Solved
I'm working with graphene and graphene-django and I have a problem with a IntegerField with choices. graphene create an Enum and the output is "A_1" if the value is 1; "A_2" if the value is 2 and s...
Killam asked 27/1, 2017 at 22:5
0
I have implemented a GraphQL server in Python using Django and Graphene. I have mutations that use modelforms, which broadly look like this:
def mutate(self, info, **kwargs):
form = MyModelForm(k...
Mesolithic asked 11/5, 2020 at 14:58
3
In a GraphQL update mutation I want to be able to pass in the values for a child object but I want each of those values to be optional.
So I have created an Input Class like this:
class CityCounc...
Pattison asked 24/8, 2017 at 22:35
2
Solved
I happened to send 2 separated requests to a Graphql API (Python3 + Graphene) in order to:
Create an object
Update another object so that it relates to the created one.
I sensed this might not ...
Pallette asked 21/4, 2020 at 9:25
3
Solved
What is the best way to use GraphQL with Django when using an external database to fetch data from multiple tables (i.e., creating a Django Model to represent the data would not correspond to a sin...
Foreword asked 8/9, 2016 at 1:53
2
Solved
In Graphene Python, how should one go about setting cookies in the schema.py when there is no access to the HttpResponse object to set the cookie on?
My current implementation is to set the cookie...
Crandale asked 17/8, 2017 at 9:8
2
Solved
Im currently having hard time on mutation enum Argument.
Below are my code for Mutation:
class CreatePerson(graphene.Mutation):
foo = graphene.String()
def mutate(self, info, **kwargs):
retur...
Pokeberry asked 22/5, 2019 at 14:56
2
Problem
I am using django-graphene with Relay on our GraphQL Server. The implementation imposes a Global ID requirement in the graphene.relay.Node class that overrides and hides Django's ID field....
Epley asked 23/1, 2019 at 13:43
0
Currently, Django logs: [16/Dec/2019 13:29:16] "POST /graphql HTTP/1.1" 200 1735 for any incoming graphql request. I'd like to be able to log more information about the incoming request (which quer...
Uhland asked 16/12, 2019 at 21:49
2
I want to add status field to error response, so instead of this:
{
"errors": [
{
"message": "Authentication credentials were not provided",
"locations": [
{
"line": 2,
"column": 3
}
]
}...
Faircloth asked 18/3, 2018 at 15:31
2
Solved
I'm looking into develop a GraphQL API. I have a django/elasticsearch/mysql backend and I'm figuring out how GraphQL fits into this picture.
I reading about the graphene-django project but it see...
Zaragoza asked 17/12, 2016 at 17:52
1
I have 3 files: authors.py, posts.py and schema.py.
Posts have one Author and the Query is built in the schema file.
I'm trying to resolve Author from inside Post without declaring a resolver fun...
Melina asked 7/8, 2019 at 10:21
1
I'm learning how to use GraphQL and python. I've found the graphene project along with it's SQLAlchemy and Flask extensions. I've been reading tutorials and docs and I'm having trouble figuring out...
Beret asked 11/5, 2018 at 22:2
1
I'm trying to upload an image with a graphql mutation to my server, how can I test this with insomnia.rest? the the Structured request for a Graphql Query doesn't show any field to add a file. Also...
Harshman asked 1/4, 2018 at 3:46
1
Solved
I am following the graphql-python tutorial on https://www.howtographql.com/graphql-python/4-authentication/. However, I get 3 errors saying "Cannot query field \"id\" on type \"CreateUser\"." I bas...
Kingbolt asked 28/5, 2019 at 15:42
1
Solved
I would like to know how to properly create mutation for creating this django model:
class Company(models.Model):
class Meta:
db_table = 'companies'
app_label = 'core'
default_permissions = (...
Servomechanical asked 20/11, 2018 at 10:35
1
Solved
I am using rest framework serializer with graphql. I am trying to create a user when user signs up and create a profile based on the role user selects when creating an account. For this i have adde...
Ancon asked 21/3, 2019 at 16:5
1
Solved
This is the first time I am using graphene, ain't have a good grasp over it.
So basically making a blog, where the user can like posts, comments and add posts to his favourite, and follow each othe...
Frumentaceous asked 24/12, 2018 at 7:33
1
Solved
I'm struggling to get my Delete operation working.
My Create, Read and Update are working fine, but a Delete has nothing to return.
class DeleteEmployeeInput(graphene.InputObjectType):
"""Argumen...
Spellbinder asked 3/12, 2018 at 15:39
7
Solved
I have setup a Graphene server using Django. When I run my queries through GraphiQL (the web client), everything works fine. However, when I run from anywhere else, I get the error: "Must provide q...
Umbilicate asked 25/5, 2017 at 16:15
1
Solved
Looking at graphene_django, I see they have a bunch of resolvers picking up django model fields mapping them to graphene types.
I have a subclass of JSONField I'd also like to be picked up.
:
# ...
Anagrammatize asked 11/10, 2018 at 19:14
© 2022 - 2024 — McMap. All rights reserved.