Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code sample for ariadne-codegen is outdated. #1392

Open
alexdev-wb opened this issue Apr 4, 2023 · 1 comment · May be fixed by #1407
Open

Code sample for ariadne-codegen is outdated. #1392

alexdev-wb opened this issue Apr 4, 2023 · 1 comment · May be fixed by #1407

Comments

@alexdev-wb
Copy link

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())
@Urigo
Copy link
Contributor

Urigo commented Apr 9, 2023

thanks! could you submit a PR with a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants