Skip to content

Code sample for ariadne-codegen is outdated.  #1392

Open
@alexdev-wb

Description

@alexdev-wb

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())

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions