Category : graphql

I am developing the backend in python using the Admin API and the Storefront API. But I’m having a problem with the Storefront API. I do everything the documentation says: Create private APP Get the X-Shopify-Storefront-Access-Token and insert it into requests header Get the shop_id and set the requests url to "https://{shop_id}.myshopify.com/api/2021-10/graphql.json" Write a graphql ..

Read more

I try to write a subscription for my django webapp by using graphql-ws. I followed instruction that are written in README file inside the github repository (https://github.com/graphql-python/graphql-ws) but when I execute ./manage.py runserver, this error raises: File "/myproject/urls.py", line 16, in <module> from graphql_ws.django_channels import GraphQLSubscriptionConsumer File "/myproject/env2/lib/python3.8/site-packages/graphql_ws/django_channels.py", line 11, in <module> from .base_sync import ..

Read more

I previously used the code below to scrape the search result for a word search, for example book, on https://www.walmart.com/. They have currently changed their request and response parameters and this code does not get any response again. params = { ‘query’: ‘book’, ‘cat_id’: 0, ‘ps’: 24, ‘offset’: 0, ‘prg’: ‘desktop’, ‘stores’: re.search(r’store/(d+)’, url).group(1) } ..

Read more

I work with graphql, mongodb and fastapi. I want to get id of type String from query, and convert this id to bson type ObjectId in order to use ObjectId for my request to mongo. class Query(graphene.ObjectType): posts = graphene.List(schemas.PostModel, id=graphene.String()) get_post = graphene.Field(schemas.PostModel, id=graphene.String()) categories = graphene.List(schemas.CategoryModel, id=graphene.ID()) get_category = graphene.Field(schemas.CategoryModel, id=graphene.ID()) comments = ..

Read more

This is my first project using GraphQL in Python and i get the error when i send a mutation + variable using the API https://github.com/Shopify/shopify_python_api. I run the mutation in Python with this code spf.GraphQL().execute(bulkInventoryUpdate, variables = abc) where, bulkInventoryUpdate = """ mutation inventoryBulkAdjustQuantityAtLocation($inventoryItemAdjustments: [InventoryAdjustItemInput!]!, $locationId: ID!) { inventoryBulkAdjustQuantityAtLocation(inventoryItemAdjustments: $inventoryItemAdjustments, locationId: $locationId) { userErrors { ..

Read more