Open
Description
Description
Code sample for ariadne-codegen is outdated.
Motivation
Relevant code sample for ariadne-codegen.
Collaboration
Replace the code with something like this:
import asyncio
from graphql_client import Client
async def fetch_gql():
client = Client("http://example.com/graphql/")
result = await client.create_token(username="Admin", password="Example123")
if result.errors:
error = result.errors[0]
raise ValidationError({error.field: error.message})
auth_token = result.token
asyncio.run(fetch_gql())