Module
Solid.Router.Query
- Package
- purescript-purs-solid
- Repository
- arazorda/purs-solid
Cached loaders keyed by name and argument. Define them at the top level
with unique names; runQuery must be the first step of an Aff read by
createAsync, so the cache sees who is reading it:
items /\ _ <- createAsync (runQuery stories <$> args)
#query Source
query :: forall a b. Serializable a => Serializable b => String -> (a -> Aff b) -> Query a b#queryServer Source
queryServer :: forall a b. Serializable a => Serializable b => ServerFunction a b -> Query a bNamed by the server function; the client calls it with a GET.
#queryKeyFor Source
queryKeyFor :: forall a b. Query a b -> a -> QueryKey#revalidate Source
revalidate :: forall a b. Query a b -> Effect UnitMarks every cached value of a query stale and reloads the ones on screen.
#revalidateWith Source
revalidateWith :: forall a b. Query a b -> a -> Effect UnitMarks one argument's cached value stale and reloads it if it's on screen.
#revalidateAll Source
revalidateAll :: Effect UnitMarks every cached query value stale, and reloads the ones on screen.
Re-exports from Solid.Internal.Serializable
#Serializable Source
class Serializable a Types that survive Solid's serialization unchanged: primitives, Unit,
Nullable, Json, arrays, objects and records of them. A newtype over
one can derive it (derive newtype instance Serializable UserId). ADTs
lose their constructors, so they need an explicit codec.
Instances
Serializable StringSerializable IntSerializable NumberSerializable BooleanSerializable UnitSerializable Json(Serializable a) => Serializable (Nullable a)(Serializable a) => Serializable (Array a)(Serializable a) => Serializable (Object a)(Serializable a) => Serializable (Reply a)(RowToList r rl, SerializableFields rl) => Serializable (Record r)(Fail (Above (Beside (Text "Can\'t send ") (Beside (Quote (Maybe a)) (Text " between server and client as-is."))) (Text "Use `Nullable` (PureScript ADTs lose their constructors when serialized)."))) => Serializable (Maybe a)(Fail (Above (Beside (Text "Can\'t send ") (Beside (Quote (Either a b)) (Text " between server and client as-is."))) (Text "Use a record of `Nullable` fields, or an explicit JSON codec."))) => Serializable (Either a b)(Fail (Text "Functions can\'t be sent between server and client.")) => Serializable (a -> b)(Fail (Text "Effects can\'t be sent between server and client.")) => Serializable (Effect a)
- Modules
- Solid.
Action - Solid.
Async - Solid.
Component - Solid.
Component. JS - Solid.
Context - Solid.
Control - Solid.
DOM - Solid.
DOM. Aria - Solid.
DOM. AttrValue - Solid.
DOM. HTML - Solid.
DOM. SVG - Solid.
Errors - Solid.
Internal. Action - Solid.
Internal. Equality - Solid.
Internal. Identity - Solid.
Internal. Names - Solid.
Internal. Optimistic - Solid.
Internal. Props - Solid.
Internal. Reply - Solid.
Internal. Serializable - Solid.
Internal. ServerFunction - Solid.
Internal. Setup - Solid.
Internal. Store - Solid.
Internal. Tracked - Solid.
Internal. View - Solid.
JSX - Solid.
Lifecycle - Solid.
Meta - Solid.
Owner - Solid.
Reactivity - Solid.
Root - Solid.
Router - Solid.
Router. Action - Solid.
Router. Path - Solid.
Router. Query - Solid.
Router. Search - Solid.
Setup - Solid.
Signal - Solid.
Start. Middleware - Solid.
Start. RequestEvent - Solid.
Start. Response - Solid.
Start. ServerFunction - Solid.
Start. UseServer - Solid.
Store - Solid.
Testing - Solid.
Utility - Solid.
Web - Solid.
Web. SSR