Allowing users to select all items except few
I have a list of country names (eg below)
I want the user to be able to either select a few countries or, select all countries except a few.
Now, this can be done using a select all button by selecting all items and then unchecking the ones that are not required. However, this creates a long query to be sent to the backend.
For example, if I want to select all countries except Argentina, the query would look something as follows:
select(Australia, Austria, Belgium...)
I want to transform this query to just
except(Argentina)
How do I display/convey the user that he/she can either select countries that he wants details about or countries that he doesn't want details about?