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

graphql usage #145

Open
dimentii opened this issue Nov 6, 2023 · 0 comments
Open

graphql usage #145

dimentii opened this issue Nov 6, 2023 · 0 comments

Comments

@dimentii
Copy link

dimentii commented Nov 6, 2023

Hi,
I could not find how to properly build GraphQLRequest object. Trying to build it like
body = GraphQLRequest( query="""query ReturnProductsIds($limit: Int!, $offset: Int!) { products( where: "masterData(published=true)" sort: "id asc" offset: $offset limit: $limit ) { results { id } } }""", variables=GraphQLVariablesMap([('limit', 500), ('offset', 0)]) )
and it doesn't work. After object serialization variables become empty dict which causes error response from commercetools API
Appreciate if you provide an example.

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

No branches or pull requests

1 participant