For questions about Ariadne - the Python library for implementing GraphQL servers. When using this tag also include the more generic [python] tag.
Questions tagged [ariadne-graphql]
41 questions
0
votes
0 answers
Ariadna fastAPI how to parse GraphQL request
Here is my API:
app = FastAPI()
app.add_middleware(CORSMiddleware,
allow_origins=['*'],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"])
type_defs =…

Happy Machine
- 987
- 8
- 30
0
votes
0 answers
Ariadne how to map schema to python object
I define the following in Ariadne to inject into middleware:
type_defs = load_schema_from_path("schema.ql")
schema = make_executable_schema(type_defs, query,
snake_case_fallback_resolvers)
And if i…

Happy Machine
- 987
- 8
- 30
0
votes
1 answer
Ariadne graphql displaying Django choices in query
I have a django model with Integer Choice fields
class issue_status(models.IntegerChoices):
'''Status'''
Open = 1
Pending = 2
Completed = 3
class Issue(models.Model):
person = models.ForeignKey('Person', on_delete=models.CASCADE,
…

ccsv
- 8,188
- 12
- 53
- 97
0
votes
1 answer
Convert snake_case to camelCase in Python GraphQL resolver using Ariadne
I have created a Python Flask server with Apollo GraphQL using Ariadne. My GraphQL schema should have attributes names in camelCase. However, it seems like, it is must for my GraphQL resolver to return attributes names in snake_case or else the…

Namrata Kumari
- 158
- 1
- 13
0
votes
1 answer
Using BatchHttpLink from Apollo in Ariadne
I have my client app written in React + Apollo and backend in Python + Ariadne. Is there any way to handle batched arrays of queries in Ariadne?
I set custom Link in my client:
const apolloClient = new ApolloClient({
cache: InMemoryCache(),
…

Nickon
- 9,652
- 12
- 64
- 119
0
votes
1 answer
Set up authentication/authorization with flask-jwt-extended + ariadne (graphql) + react
I'm trying to create an auth system for my react(nextjs) app with flask_JWT_extended + ariadne(graphql). I have succesfully set up the login mutation that retrieves the access and refresh token but I dont know how to properly integrate them into my…

Chuks G
- 39
- 2
- 10
0
votes
2 answers
Graphql mutation to upload file with other fields
I'm using Ariadne to create a python GraphQL server and a I have the following mutation to upload a file:
type Mutation {
uploadUserAvatar(file: Upload!): Boolean!
}
And the following curl command to upload a image:
curl http://localhost:8080/…

Kleyson Rios
- 2,597
- 5
- 40
- 65
0
votes
1 answer
Python GraphQL Ariadne WSGI Example Without External Server
In the Ariadne intro doc the complete code does not include a http server part. The page instruct you to fire an external server, point the server to your code.
The doc has a wsgi page, which again does not include a server part.
The python itself…

minghua
- 5,981
- 6
- 45
- 71
0
votes
1 answer
Resolver function for union type in Ariadne
I am trying to write a query resolver function for union type in Ariadne. How can I accomplish this?
As I have read in the documentation there is a field called __typename which helps us to resolve the union type. But I am not getting any __typename…

Manisha Bayya
- 137
- 1
- 9
0
votes
1 answer
Integrate prisma graphql queries with ariadne
I have written some graphql schema and deployed it using prisma. Prisma generated some .graphql file with type Query, type Mutation, type Subscription. There is a prisma server running from docker which is contacting MySQL database. Now I would like…

Manisha Bayya
- 137
- 1
- 9
-1
votes
1 answer
Missing information in the Ariadne GraphQL docs
I'm trying to add authentication to a Flask-GraphQL API that I'm creating, and I'm using Ariadne to handle some of the GraphQL stuff.
The Ariadne docs (specifically page https://ariadnegraphql.org/docs/mutations) defines the resolve_login and…

beginner_dev
- 1
- 1