@times-components/provider

1.40.15 • Public • Published

Provider

The provider package manages the connections to GraphQL (GQL). At a fundamental level, the package simply exports providers that take GQL queries (from the provider queries package), and use React Apollo to fetch data from the GQL server. These providers can be configured to take a debounceTimeMs prop which adds debounce functionality to the provider calls to ensure better performance and user experience.

This package is where we intend to add all future functionalities and features that fix any issues, or fill any gaps, we find in the React Apollo API.

Contributing

Please read CONTRIBUTING.md before contributing to this package

Running the code

Please see our main README.md to get the project running locally

Development

The code can be formatted and linted in accordance with the agreed standards.

yarn fmt
yarn lint

Testing

This package uses yarn (latest) to run unit tests on each platform with jest.

yarn test:web

Visit the official storybook to see our available provider templates.

Future

We currently use an older version of the React Apollo API. We are planning on updating our usage of this package to use the newer Query component. See this issue.

Package Sidebar

Install

npm i @times-components/provider

Weekly Downloads

4,419

Version

1.40.15

License

BSD-3-Clause

Unpacked Size

221 kB

Total Files

21

Last publish

Collaborators

  • marcincuber
  • newsuk
  • news-tools