graphql

GraphQL using a for loop in within the search query

GraphQL using a for loop in within the search query Question: Because Yelp limits the output of businesses to 50, I’m trying to loop through the Census block centroid longitudes and latitudes of San Diego to get all the different businesses (which I want for a project). However, the query does not seem to accept …

Total answers: 1

Choosing the correct Schema for Graphene in a Flask request

Choosing the correct Schema for Graphene in a Flask request Question: I have a Flask GraphQL endpoint that looks like: app.add_url_rule(‘/graphql’, view_func=GraphQLView.as_view( ‘graphql’, schema=schema, graphiql=True, )) I currently have 3 different schemas. As far as I know, one of the differences between GraphQL and REST is that in GraphQL you just define a single base …

Total answers: 1

How to flatten dict in a DataFrame & concatenate all resultant rows

How to flatten dict in a DataFrame & concatenate all resultant rows Question: I am using Github’s GraphQL API to fetch some issue details. I used Python Requests to fetch the data locally. This is how the output.json looks like { "data": { "viewer": { "login": "some_user" }, "repository": { "issues": { "edges": [ { …

Total answers: 2

GraphQL API with Scrapy

GraphQL API with Scrapy Question: I’m trying to get data from https://www.ouedkniss.com/boutiques/immobilier . I found that ouedkniss.com is using GraphQL API. I tried to use this API but failed to pull data and also to paginate. An error is showing. AttributeError: ‘list’ object has no attribute ‘get’ I don’t know if I miss something else …

Total answers: 3

Graphene without Django ORM models

Graphene without Django ORM models Question: what is best practise to integrate Graphene-Django with my Redshift tables without using DjangoObjectType conversion of django model as 1st step, which I don’t have in my case. How I can bind these tables with Graphene in schema.py. class CategoryType(DjangoObjectType): class Meta: model = Category fields = ("id", "name") …

Total answers: 1

GraphQL API Hosted on AWS Lambda Function URL won't load when served over Cloudfront

GraphQL API Hosted on AWS Lambda Function URL won't load when served over Cloudfront Question: I’ve created a GraphQL API available here which is hosted via AWS Lambda using a Function URL. Everything works. I want to host this on a subdomain on my personal website using Cloudfront, like graphql.website.com. I currently host a REST …

Total answers: 1

GraphQL query returning duplicate results

GraphQL query returning duplicate results Question: I have a GraphQL schema that returns orders and the products that are part of that order. I have added a filter to return only orders that contains products searched for by the user. This filter is done on a icontains. However I have found that if a user …

Total answers: 1

Is there any way to insert data in parent and child model in one graphql mutation

Is there any way to insert data in parent and child model in one graphql mutation Question: I have a model named Project and a CustomProject model that inherits from it. Currently, I have two mutations one to add a project and one to add a custom project class Project(models.Model): url = models.URLField(blank=True) description = …

Total answers: 1

how to scrape product data from website pages that uses graphql

how to scrape product data from website pages that uses graphql Question: 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’, …

Total answers: 2

Fastapi + Strawberry GraphQL

Fastapi + Strawberry GraphQL Question: I’m currently building a microservice with fastapi. I want to expose my underlying data via graphql on an additional route. Direct integration from starlette has been deprecated so I tried to use one of the recommended packages strawberry. At the moment, it seems impossible to use in combination with grapqhl. …

Total answers: 2