graphql-python / graphene-sqlalchemy

Graphene SQLAlchemy integration
http://docs.graphene-python.org/projects/sqlalchemy/en/latest/
MIT License
975 stars 225 forks source link

Instead of graphene.Int() if i use string then it gives null in output #307

Closed Anupriya-Kashyap closed 3 years ago

Anupriya-Kashyap commented 3 years ago

i want to filter the query on basis of some data instance of one attribute. How to do that?

class Query(graphene.ObjectType): candidateInfo = graphene.List(candidate, search=graphene.String())

def resolve_candidateInfo(self, args, context, info):
    query = candidate.get_query(context)
    return query.get(args.get('search'))

schema= graphene.Schema(query=Query) print(schema)

query= ''' query{ candidateInfo(search: "python") {

        candidateName
        candidateEmail

... } } ''' With this i am getting null in my output to this query..

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue.