diff --git a/packages/parse-react-base/src/useParseQuery.ts b/packages/parse-react-base/src/useParseQuery.ts index 8c2ab93..159cfc1 100644 --- a/packages/parse-react-base/src/useParseQuery.ts +++ b/packages/parse-react-base/src/useParseQuery.ts @@ -328,6 +328,7 @@ export interface UseParseQueryOptions> enableLocalDatastore?: boolean; enableLiveQuery?: boolean; initialLoad?: InitialLoad; + useMasterKey?: boolean } export interface UseParseQueryResult> extends ResultState { @@ -353,6 +354,7 @@ const useParseQuery = >( enableLocalDatastore = true, enableLiveQuery = true, initialLoad, + useMasterKey = false } = options || {}; const { @@ -457,7 +459,7 @@ const useParseQuery = >( let findResult; try { - findResult = await parseServerQuery.find(); + findResult = await parseServerQuery.find({useMasterKey:useMasterKey}); } catch (e) { if ( e instanceof Parse.Error &&