Function useGraffitiDiscover useGraffitiDiscover < Schema extends JSONSchema > ( channels : MaybeRefOrGetter < string [] > , schema : MaybeRefOrGetter < Schema > , session ?: MaybeRefOrGetter < undefined | null | GraffitiSession > , ) : { isPolling : Ref < boolean > ; poll : () => Promise < void > ; results : Ref < (
GraffitiObjectBase & $Resolve < JSONSchema extends Schema & { properties : { actor : { type : "string" } ; allowed : { items : { type : ...
} ; nullable : true ; type : "array" } ; channels : { items : { type : ...
} ; type : "array" } ; lastModified : { type : "number" } ; name : { type : "string" } ; source : { type : "string" } ; tombstone : { type : "boolean" } ; value : { type : "object" } ; } ; required : readonly [ "value" , "channels" , "actor" , "name" , "source" , "lastModified" , "tombstone" , ] ; type : "object" ; } ? Any : (
Schema & { properties : { actor : { type : ...
} ; allowed : { items : ...
; nullable : ...
; type : ...
} ; channels : { items : ...
; type : ...
} ; lastModified : { type : ...
} ; name : { type : ...
} ; source : { type : ...
} ; tombstone : { type : ...
} ; value : { type : ...
} ; } ; required : readonly [ "value" , "channels" , "actor" , "name" , "source" , "lastModified" , "tombstone" , ] ; type : "object" ; } )
extends string | true ? Any : (
Schema & { properties : { actor : ...
; allowed : ...
; channels : ...
; lastModified : ...
; name : ...
; source : ...
; tombstone : ...
; value : ...
; } ; required : readonly [ (...)
, (...)
, (...)
, (...)
, (...)
, (...)
, (...)
] ; type : "object" ; } )
extends false ? Never : (
Schema & { properties : ...
; required : ...
; type : ...
} )
extends NullableSchema ? | ParseNullableSchema < (...)
, (...)
, (...)
> | ParseNullableSchema < (...)
, (...)
, (...)
> | ParseNullableSchema < (...)
, (...)
, (...)
> : ((...)
& (...))
extends ReferencingSchema ? ParseReferenceSchema < (...)
, (...)
, (...)
> : (...)
extends (...)
? (...)
: (...)
, ResolveDefaultOptions , > & { tombstone : false } )
[] , > ; } Type Parameters Schema extends JSONSchema Parameters channels : MaybeRefOrGetter < string [] > schema : MaybeRefOrGetter < Schema > Optional
session : MaybeRefOrGetter < undefined | null | GraffitiSession > Returns { isPolling : Ref < boolean > ; poll : () => Promise < void > ; results : Ref < ( GraffitiObjectBase & $Resolve < JSONSchema extends Schema & { properties : { actor : { type : "string" } ; allowed : { items : { type : ... } ; nullable : true ; type : "array" } ; channels : { items : { type : ... } ; type : "array" } ; lastModified : { type : "number" } ; name : { type : "string" } ; source : { type : "string" } ; tombstone : { type : "boolean" } ; value : { type : "object" } ; } ; required : readonly [ "value" , "channels" , "actor" , "name" , "source" , "lastModified" , "tombstone" , ] ; type : "object" ; } ? Any : ( Schema & { properties : { actor : { type : ... } ; allowed : { items : ...; nullable : ...; type : ... } ; channels : { items : ...; type : ... } ; lastModified : { type : ... } ; name : { type : ... } ; source : { type : ... } ; tombstone : { type : ... } ; value : { type : ... } ; } ; required : readonly [ "value" , "channels" , "actor" , "name" , "source" , "lastModified" , "tombstone" , ] ; type : "object" ; } ) extends string | true ? Any : ( Schema & { properties : { actor : ...; allowed : ...; channels : ...; lastModified : ...; name : ...; source : ...; tombstone : ...; value : ...; } ; required : readonly [ (...), (...), (...), (...), (...), (...), (...)] ; type : "object" ; } ) extends false ? Never : (Schema & { properties : ...; required : ...; type : ... } ) extends NullableSchema ? | ParseNullableSchema < (...), (...), (...)> | ParseNullableSchema < (...), (...), (...)> | ParseNullableSchema < (...), (...), (...)> : ((...) & (...)) extends ReferencingSchema ? ParseReferenceSchema < (...), (...), (...)> : (...) extends (...) ? (...) : (...), ResolveDefaultOptions , > & { tombstone : false } )[] , > ; } Defined in dist/node/composables.d.ts:18
The Graffiti.discover method as a reactive composable for use in the Vue composition API.
Its corresponding renderless component is GraffitiDiscover.
The arguments of this composable as the same as Graffiti.discover, only they can also be Refs or getters. As they change the output will automatically update. Reactivity only triggers when the root array or object changes, not when the elements or properties change. If you need deep reactivity, wrap your argument in a getter.