The purpose of this is to have an access point to all the queries to facilitate optimisation process (cc: @paultranvan).
This brings them all together in two files :
lib/queries.js : that contains utility functions for queries
queries/index.ts : that contains the query builder function
Now QueryBuilder returns the definition encapsulated in a function to unify the way it works. However, I've had to update their use in .query({ and .fetchAndGetFromState({ because it doesn't handle functions like useQuery does.
The purpose of this is to have an access point to all the queries to facilitate optimisation process (cc: @paultranvan).
This brings them all together in two files :
lib/queries.js
: that contains utility functions for queriesqueries/index.ts
: that contains the query builder functionNow QueryBuilder returns the definition encapsulated in a function to unify the way it works. However, I've had to update their use in
.query({
and.fetchAndGetFromState({
because it doesn't handle functions likeuseQuery
does.