An API key which will be added to the header of the request in the form of "Authorization": "Token apiKey"
This value is set globally. If it is set for one hylo-data-connector, it is set for all. If you change it for one, you change the value for all hylo-data-connector.
An API key which will be added to the header of the request in the form of "Authorization": "Token apiKeyLocal"
This value is local and only applies to this component. It overwrites the global apiKey. To unset a global apiKey set this value to an empty string.
Caches the requests and returns the results of previously made requests instead of making a new request if the "url", "apiKey", "query" and "parameters" are exact matches.
Only successful requests which return content are cached.
Only available for requests of type "graph".
In case of an error in a GraphQL call, console.log extensive error log.
Parameters added to the request. The parameters are retrieved from the hylo-filter-manager through the getFormValues() function.
A css query which marks elements in the loaded markup.
If set, the loaded data has to be html markup and the load promise resolves with a NodeListOf<HTMLElement> of the elements which fit the css query.
Keep in mind that the html markup is not processed, no Javascript run and no WebComponents are initialised yet. It is the raw html returned from the backend.
Works only with type "post" and "get".
By default, the connector looks for a hylo-loader component on the page. If found, it uses it. With "noLoader" you can disable the use of the hylo-loader component.
Parameters added to the request in the form of a key/value object. "key"s will be overwritten by "filter" data when sending as "post" or "graph".
A GraphQL query as string (compatible with graphqlbuilder.stringRequest(...)). Only used and has to be set with type "graph".
The loaded data of a GraphQL call has to be JSON and the load promise resolves with this JSON object.
The type of the request.
"post" and "graph" are sending its data as JSON object.
The url of the request.
If none is set, the current url is used without search query string or hash tag.
Loads data.
The returned promise resolves with "null" if the component is not ready, busy because its loading data right now, or it got stopped. The returned promise resolves with "false" if an error occurs.
"parameters" "key"s will overwrite any other data when sending as "post" or "graph".
additional parameters added to the request in the form of a key/value object
Stops the loading process. The load promise is still resolved but with a value of "null".
If a loading process is in progress, the load promise resolves with "null".
Should be called with "await" or further actions of this connector should be placed into ".then()".
Fires when a loading process finished. Emits the result.
Fires when a loading process starts.
Generated using TypeDoc
Connects to an endpoint to gather data.
Combines the possibility of loading data from a REST, GraphQL or simple text endpoint. The returned data can be a JSON object, HTMLElements or text depending of the used transfer type. It uses hylo-graphql when the connection type is set to "graph".