Module
TanStack.Query
- Package
- purescript-tanstack-query
- Repository
- rowtype-yoga/purescript-tanstack-query
#UseQueryArgs Source
type UseQueryArgs :: forall k. (Type -> k) -> Type -> Row k
type UseQueryArgs f output = (enabled :: f Boolean, queryFn :: f (Aff output), queryKey :: f QueryKey)
#useQuery Source
useQuery :: forall opts opts_ @output. Flatten output output => Union opts opts_ (UseQueryArgs Id output) => Record opts -> Hook UseQuery { data :: RemoteData Error output, fetchStatus :: FetchStatus }
#UseMutation Source
data UseMutation t0
#useMutationImpl Source
useMutationImpl :: forall input output ctx. EffectFn1 { mutationFn :: Opt (EffectFn1 input (Promise output)), mutationKey :: Opt String, onSettled :: Opt (EffectFn4 output (Nullable Error) input ctx (Promise Unit)), onSuccess :: Opt (EffectFn2 output input Unit) } (UseMutationImplResult input output)
#UseMutationResult Source
type UseMutationResult input output = { data :: RemoteData Error output, mutateAsync :: input -> Aff Unit, reset :: Effect Unit, submittedAt :: Maybe Instant, variables :: Maybe input }
#useMutation Source
useMutation :: forall opts opts_ input @output ctx. Flatten output output => Union opts opts_ (UseMutationArgs Id input output ctx) => Record opts -> Hook UseMutation (UseMutationResult input output)
#queryClientProviderImpl Source
queryClientProviderImpl :: forall a. ReactComponent (Record a)
#queryClientProvider Source
queryClientProvider :: { client :: QueryClient } -> (Array JSX) -> JSX
#QueryClient Source
data QueryClient
#UseQueryClient Source
data UseQueryClient t0
#invalidateQueries Source
invalidateQueries :: { queryKey :: QueryKey } -> QueryClient -> Effect Unit
#queryKey Source
queryKey :: forall a. WriteForeign a => a -> QueryKey
#startQueryKey Source
startQueryKey :: forall a b. WriteForeign a => WriteForeign b => a -> b -> QueryKey
#appendQueryKey Source
appendQueryKey :: forall a. WriteForeign a => QueryKey -> a -> QueryKey
#getQueryDataImpl Source
getQueryDataImpl :: QueryKey -> QueryClient -> Effect (Nullable Foreign)
#getQueryData Source
getQueryData :: forall a. ReadForeign a => QueryKey -> QueryClient -> Effect (Maybe a)
#setQueryDataImpl Source
setQueryDataImpl :: forall a. EffectFn3 QueryKey a QueryClient Unit
#setQueryData Source
setQueryData :: forall a. WriteForeign a => QueryKey -> a -> QueryClient -> Effect Unit
- Modules
- TanStack.
Query