Skip to content

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

@Anupriya-Kashyap

Description

@Anupriya-Kashyap

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions