Graphql sending empty string

Viewed 156

I am using graphql to get some data.

let { loading, error, data } = useQuery(GET_JOBS_SEARCH, {
    variables: {
        category: category,
        type: jobType
    }
});

Now when I update the category the API gets called with variables like

variables: {category: "leadership", type: ""}

Now I don't want the type:'' in my call.

0 Answers
Related