0

I'm using graphql-codegen to generate typescript type from graphql schema. I'm trying to perform wildcard operation.

query User($query: USERQueryInput){
    user(query: $query){
        _id
        name
        age
        address
    }
}

I want to perform wildcard search on name. I am very new in qraphql don't get any idea how to resolve it. Please help

Anupam Choudhary
  • 39
  • 1
  • 1
  • 9
  • 1
    Hello. Try to update your user query : user(query: {name_contains: $query}) – Raziak Jan 23 '23 at 07:47
  • Hi @Raziak, Thanks for your response but by default graphql schema not generate the name_contains. There is only (name_nin, name_gt, name_exists, name_ne, name_lt, name_in, name_gte and name_lte) these 8 operation which can perform. Is there any other way because above solution showing the error "name_contains show unknown field" – Anupam Choudhary Jan 23 '23 at 11:55

0 Answers0