# gatsby-source-wordpress-graphql

> Source data from Wordpress in an efficient and scalable way.

Latest version **4.11.0** (published 2022-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-source-wordpress-graphql
pnpm add gatsby-source-wordpress-graphql
yarn add gatsby-source-wordpress-graphql
bun add gatsby-source-wordpress-graphql
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.11.0 |
| Published | 2022-04-07 |
| First published | 2021-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.13.0 |
| Dependencies | 20 |
| Unpacked size | 628.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tobias Strebitzer |
| Maintainers | tstrebitzer |
| Keywords | gatsby, gatsby-plugin, gatsby-source-wordpress-graphql, wordpress, graphql |

## Links

- npm: https://www.npmjs.com/package/gatsby-source-wordpress-graphql
- Repository: https://github.com/magloft/gatsby-source-wordpress-graphql
- Homepage: https://github.com/magloft/gatsby-source-wordpress-graphql/tree/master#readme
- Issues: https://github.com/magloft/gatsby-source-wordpress-graphql/issues
- npm.io page: https://npm.io/package/gatsby-source-wordpress-graphql

## Dependencies (20)

- [md5](https://npm.io/package/md5.md) ^2.3.0
- [graphql](https://npm.io/package/graphql.md) ^15.5.0
- [unihtml](https://npm.io/package/unihtml.md) ~1.0.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.1
- [file-type](https://npm.io/package/file-type.md) ^16.5.1
- [async-sema](https://npm.io/package/async-sema.md) ^3.1.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [apollo-link](https://npm.io/package/apollo-link.md) 1.2.14
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.1.4
- [object-hash](https://npm.io/package/object-hash.md) ^2.2.0
- [html-to-react](https://npm.io/package/html-to-react.md) ^1.4.5
- [@apollo/client](https://npm.io/package/@apollo/client.md) ^3.3.21
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.14.0
- [apollo-link-http](https://npm.io/package/apollo-link-http.md) ^1.5.17
- [html-react-parser](https://npm.io/package/html-react-parser.md) ^1.2.7
- [@graphql-tools/wrap](https://npm.io/package/@graphql-tools/wrap.md) 7.0.5
- [gatsby-plugin-image](https://npm.io/package/gatsby-plugin-image.md) ^2.11.1
- [@graphql-tools/links](https://npm.io/package/@graphql-tools/links.md) 7.1.0
- [@graphql-tools/utils](https://npm.io/package/@graphql-tools/utils.md) 7.7.3
- [@graphql-codegen/typed-document-node](https://npm.io/package/@graphql-codegen/typed-document-node.md) ^1.18.10

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 4.11.0 (latest) — 2022-04-07
- 3.0.0-next.9 — 2021-11-22
- 3.0.0-next.8 — 2021-11-17
- 3.0.0-next.7 — 2021-07-27
- 3.0.0-next.6 — 2021-07-27
- 3.0.0-next.5 — 2021-07-23
- 3.0.0-next.4 — 2021-07-19
- 3.0.0-next.3 — 2021-07-18
- 3.0.0-next.2 — 2021-07-18
- 3.0.0-next.1 — 2021-07-18
- 3.0.0-next.0 — 2021-07-18

## README

# gatsby-source-wordpress-graphql

Source plugin for pulling posts and media items from Wordpress via Graphql.

An example site for using this plugin hosted here:
https://magloft.github.io/gatsby-source-wordpress-graphql/

## Installation

```shell
npm install gatsby-source-wordpress-graphql
# OR
yarn add gatsby-source-wordpress-graphql
```

## How to use

Configure Plugin Options:
```js
{
  resolve: 'gatsby-source-wordpress-graphql',
  options: {
    // Your Wordpress GQL Endpoint
    host: 'https://www.domain.com/graphql',
    // HTTP Authorization Header
    authorization: 'Basic ...',
    // Cache Adapter, either `gatsby` or `persist`
    cacheAdapter: 'gatsby',
    // Records to fetch per request
    perPage: 100,
    // Media Item Import batch size
    batchSize: 10,
    // Content transformation options via unihtml
    transformContent: ({ clean }) => { clean() }
    // Skip checking for new resources after initial sync
    cacheOnly: false,
    // List of resources to import
    importResources: ['post', 'page', 'user', 'category', 'media']
  }
}
```

## Development

1. Build plugin using `yarn build`
2. Run `yarn link` in `build/` folder
3. Run `yarn link gatsby-source-wordpress-graphql` in `example/` folder
4. Create `gatsby-config.js` in `example` folder (based on `build` file) and fill in `authorization` details

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