2.1 KiB
2.1 KiB
ApolloQuery component
Props
query: GraphQL query (transformed bygraphql-tag) or a function that receives thegqltag as argument and should return the transformed queryvariables: Object of GraphQL variablesfetchPolicy: See apollo fetchPolicypollInterval: See apollo pollIntervalnotifyOnNetworkStatusChange: See apollo notifyOnNetworkStatusChangecontext: See apollo contextskip: Boolean disabling query fetchingclientId: id of the Apollo Client used by the query (defined in ApolloProviderclientsoption)deep: Boolean to use deep Vue watcherstag: String HTML tag name (default:div); if falsy (for examplenullorundefined), the component will be renderless (the content won't be wrapped in a tag), in this case, only the first child will be rendereddebounce: Number of milliseconds for debouncing refetches (for example when the variables are changed)throttle: Number of milliseconds for throttling refetches (for example when the variables are changed)prefetch: Iffalse, will skip prefetching during SSR
Scoped slot
result: Apollo Query resultresult.data: Data returned by the queryresult.loading: Boolean indicating that a request is in flightresult.error: Eventual error for the current resultresult.networkStatus: See apollo networkStatus
query: Smart Query associated with the componentisLoading: Smart Query loading stategqlError: first GraphQL error if anytimes: number of times the result was updated
Events
result(resultObject)error(errorObject)