Skip to content

[Feature] Return dictionary and raise GraphQLException on error from GraphQL query #774

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cedk
Copy link

@cedk cedk commented May 7, 2025

WHY are these changes introduced?

Using the GraphQL API, the response are raw text containing the JSON.
The errors are most of the time answered with a 200 status with an errors array.

WHAT is this pull request doing?

This ease the usage of GraphQL API by ensuring proper load of the JSON response and manage errors by raising an exception.

Checklist

  • I have updated the CHANGELOG (if applicable)
  • I have followed the Shopify Python guide

@cedk
Copy link
Author

cedk commented May 7, 2025

I have signed the CLA!

@cedk cedk force-pushed the graphql-json-error branch from d264bb7 to c7a959d Compare May 26, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant