# regraph-request

> Simple React GraphQL requests

Latest version **1.0.6** (published 2018-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install regraph-request
pnpm add regraph-request
yarn add regraph-request
bun add regraph-request
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-10-15 |
| First published | 2018-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 24.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cameron Ray |
| Maintainers | camray |
| Keywords | graphql, react |

## Links

- npm: https://www.npmjs.com/package/regraph-request
- Repository: https://github.com/altangent/regraph-request
- Homepage: https://github.com/altangent/regraph-request#readme
- Issues: https://github.com/altangent/regraph-request/issues
- npm.io page: https://npm.io/package/regraph-request

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-10-15
- 0.0.6 — 2018-08-08
- 0.0.5 — 2018-08-07
- 0.0.4 — 2018-08-07
- 0.0.3 — 2018-08-06
- 0.0.2 — 2018-07-24
- 0.0.1 — 2018-07-16

## README

# regraph-request

> Simple React GraphQL requests

[![NPM](https://img.shields.io/npm/v/regraph-request.svg)](https://www.npmjs.com/package/regraph-request)

## Install

```bash
npm install --save regraph-request
```

## Usage

```jsx
import React from 'react';
import PropTypes from 'prop-types';
import { Query } from 'regraph-request';

const QUERY = `
  query Test(
    $inputName: String
  ) {
    hello(name: $inputName)
  }
`;

export const HelloComponent = ({ data }) => {
  if (!data.hello) return <div />;
  return <div>{data.hello}</div>;
};

HelloComponent.propTypes = {
  username: PropTypes.string,
};

export const Hello = Query(HelloComponent, QUERY, props => ({
  inputName: props.username,
}));

export const App = () => {
  return (
    <RegraphRequest value="https://example.com/graphql">
      <Hello />
    </RegraphRequest>
  );
};
```

## License

MIT © [Altangent](https://github.com/altangent)

---
_Source: https://npm.io/package/regraph-request · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
