Skip to main content
Quick Summary: Use the where parameter in SkillsDB GraphQL queries to filter results by field values, with support for operators like _eq, _like, _in, and more.
The queries that support pagination will also provide the facility of filtering out the results. This is helpful in narrowing down the result set based on your preferences. In such queries, we provide an input parameter called where, which will mostly be inside the input parameter or in some cases will be the top level parameter. Let’s see an example:
Here you see the where parameter in action inside the input parameter. This query returns every career (job role) whose name contains “Engineer”. Notice the operator called _like. It means that the JobRole value should match the given pattern, where % stands for any sequence of characters. To require an exact value instead, use _eq. On the lowest level - that is, the leaf node of an object which is a primitive type - we provide the following operations for comparison:
  • _eq: String. Equal to the provided value
  • _gt: String. Greater than the provided value
  • _gte : String. Greater than or equal to the provided value
  • _in : [String!]. Resulting value must be one of the provided values
  • _is_null : Boolean . Resulting value must be null
  • _like : String . Resulting value must be like the provided value, not requiring that it is an exact match. The value for this operator must be provided as '%value%', '%value' or 'value%' .
  • _lt : String. Less than the provided value.
  • _lte : String. Less than or equal to the provided value.
  • _neq : String . Not equal to the provided value.
  • _nin : [String!]. Result should not be within the provided input array.
  • _nlike : String . Negation of the like operator mentioned above.

Multiple values to compare using where parameter

Inside the where parameter and the value it is currently focusing on, you will see that the where clause can be applied on multiple fields in the result set. Taking the example from the above example:
Notice that we now have the JobRoleId in the picture as well. When you set several fields in where, a result must satisfy all of them. This query returns the career with ID 10 only if its name also contains “Engineer”.

Need Help?

If you run into any issues or have questions, reach out to your organization’s SkillsDB administrator or contact SkillsDB Support.