I'm learning how to use GraphQL and python. I've found the graphene project along with it's SQLAlchemy and Flask extensions. I've been reading tutorials and docs and I'm having trouble figuring out what class Meta is used for when defining a schema.…
I’m trying to created a list of objects using graphql mutation, but have been unsuccessful. I've identified the error, please see code snippets and comment on where the error is propagating.
Note: I'm using Graphene on Flask with Python 2.7
Here’s…
According to the documentation in https://www.howtographql.com/graphql-python/6-error-handling/ I use raise GraphQLError to show errors in my Flask GraphQL app mutate functions, like this one:
import graphene
from graphql import GraphQLError
from…
I have a tag model and I would like to search for a specific tag with a specific name. Here is what I have so far.
from datetime import datetime
from graphene_sqlalchemy import SQLAlchemyObjectType,SQLAlchemyConnectionField
from database.base import…
The python graphene documentation does not mention anything about graphQL error. Under what scenarios is it useful, does it have any advantage over a simple raise Exception('Authenication Failure : User is not registered') ?
I did my homework and…
I'm trying to expose spark aggregation results using a graphql api. The query returns null everytime though,
from flask import Flask, request
from graphene import ObjectType, Schema, String, Int, Field, Float, List
from flask_graphql import…
I'm building a GraphQL API that connects to two different databases. I'm trying to create a GraphQL interface using Flask-GraphQL but it appears I can only bind a single SQLAlchemy session to the app at once via the context variable:
from flask…
I have a very simple flask graphql app and everything work as I aspect, I can call it from my browser and it returns the given data.
But if I send a string which contains '&' I always get the message "Syntax Error GraphQL (1:22) Unterminated string…
I am creating a project to query a mongo schema in GraphQL.
I have a model which act as a mongo collection and schema file for mapping the model with graphql Query.
When i try to query the fields in mongo models only id is getting populated and not…
I want to generate a GraphQL .json document that has graphene schema from Flask. Django has something like manage.py that does this (https://github.com/graphql-python/graphene-django/blob/master/docs/introspection.rst). Anyone know how to generate a…
What would the best approach to fetch deep nested object with graphql only when asked for.
I'm talking here performance wise
Lets say you have the following mongo/mongoose schema :
User
|
|_ Name
|
|_ Friends (RefId into User)
|
…
for a project I am trying to implement a graphql endpoint via flask in order to query a neo4j-DB using py2neo and graphene.
Within a docker container I am using python 3.9 and the follwing packages are…
I have a flask app and I am using graphene to build some graphql endpoints. The following snippet is to build the metadata_by_config query.
engine = create_engine('postgres_url', convert_unicode=True)
db_session =…
I have schema.py that goes like this:
import graphene
from app import db
from graphene import relay
from app.models import User as UserModel, Event as EventModel
from graphene_sqlalchemy import SQLAlchemyConnectionField, SQLAlchemyObjectType
class…
I have a code like this,
# SWAMI KARUPPASWAMI THUNNAI
import jwt
import graphene
from flask import request
from auth.helper import medease_token
from database.get_connection import get_connection
from flask_graphql import GraphQLView
class…