now… that works great if i dont call the query with any variable. But as soon i set for example $hobbies with ["running"] it starts asking me to set $name … of course if i set also $name with "Rob Stark" it works…
EDIT: ~Any clue why is that happening ? i have to create conditionals for that querie ? ~
I know it is because the querie is waiting variables, but is there a way to avoid that ? like
When i call the refetch of that querie if i set people with no arguments it works like a charm, but if i set any of those variables i posted then it doesn’t perform the querie because is missing one argument.
Lets make an example:
{
people(hobbies: ["Biking", "Running"]){
name
}
}
so that query would be like:
SELECT name FROM people AS people WHERE people.hobbies IN ('Biking', 'Running');
But… gpl is waiting for $name so it wont call that querie.
VM1901:1 Uncaught Error: The inline argument "name" is expected as a variable but was not provided.
I want all the people that have in $hobbies “biking” and “running” but it wont let me perform that querie if i dont have a $name. I know i can make a (ownProps.name) || "Some Random Name" on my variables set but i dont want one person only.