QueryBoost provides mock data for any queries executed using your Test API key on the https://api.queryboost.com/mocks endpoint. This is a useful method for developing queries and business logic without needing to connect to the underlying source.
Basic Mock Data
At a minimum QueryBoost will return the correct data type for the field.
Integerswill return a random value
Enumswill return a random valid enum value
Queries that return an Array will return an Array of 2 values
ID'swill return an random UUID
Enhanced Mock Data
Where possible, QueryBoost returns Enhanced Mock data. This is data that more closely resembles the actual source data.
Enhanced Mock Data will return:
Positive value for numbers that must be > 0
Negative value for numbers that must be < 0
Future / past dates where expected
ID's which conform to the source's format
Phrases / paragraphs for strings where longer strings are expected
Queries that return an array will an array of random length between 5 and 20
QueryBoost also uses the FakerJS Library to return correctly formed data for:
Caveats for Mocked Data
QueryBoost always returns a value for each field. It will not return null values even if the field is nullable.
Logical values are not guaranteed. For example in the following query:
Period Start and
Period End will always correctly return timestamps. But, there is no guarantee that Period Start will be before Period End.
QueryBoost always returns valid types for mock data, even when Enhanced Mocks are not available.