# gatsby-source-dialoguewise

> Gatsby source plugin for building websites using Dialoguewise CMS as a data source.

Latest version **3.0.1** (published 2022-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-source-dialoguewise
pnpm add gatsby-source-dialoguewise
yarn add gatsby-source-dialoguewise
bun add gatsby-source-dialoguewise
```

## 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 | 3.0.1 |
| Published | 2022-09-02 |
| First published | 2020-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dialoguewise |
| Keywords | gatsby, gatsby-plugin, gatsby-source-plugin, gatsby cms source, dialoguewise, headless cms, cms |

## Links

- npm: https://www.npmjs.com/package/gatsby-source-dialoguewise
- Repository: https://github.com/dialoguewise/gatsby-source-dialoguewise
- Homepage: https://github.com/dialoguewise/gatsby-source-dialoguewise#readme
- Issues: https://github.com/dialoguewise/gatsby-source-dialoguewise/issues
- npm.io page: https://npm.io/package/gatsby-source-dialoguewise

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 3.0.1 (latest) — 2022-09-02
- 3.0.0 — 2022-09-02
- 0.2.0 — 2020-11-24
- 0.1.0 — 2020-06-09

## README

# ![Dialoguewise](https://dialoguewise.com/images/logo-dark.svg)

# Gatsby source plugin for Dialoguewise CMS

This is a Gatsby source plugin for building websites using [Dialoguewise](https://dialoguewise.com) as a data source.

## Install

`npm install --save gatsby-source-dialoguewise`

## How to use

```javascript
// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-source-dialoguewise`,
      options: {
        accessToken: "Provide your access token.",
        dialogues: [
          {
            slug: "Provide the slug",
            isPilot: false,
            //Any variables you need to pass. This is optional.
            variableList: {
              "@variable-name": "variable value",
            },
          },
        ],
      },
    },
  ],
};
```

## How to query

You can query dialogue nodes like the following:

```graphql
{
  allDialogueWise {
    edges {
      node {
        slug
        content
        error
      }
    }
  }
}
```

To filter by the `slug` you specified in the config:

```graphql
{
  allDialogueWise(filter: { slug: { eq: "Your slug name" } }) {
    edges {
      node {
        slug
        content
        error
      }
    }
  }
}
```

## Example usage

The following example demonstrates how you can fetch contents and display them in your Gatsby app.
For more details, please check out the sample application in [gatsby-test-app](https://github.com/dialoguewise/gatsby-source-dialoguewise/blob/master/gatsby-test-app) folder

```javascript
import React from "react";
import { graphql } from "gatsby";

export default function GatsbyDemoApp({ data }) {
  return (
    <div>
      <h1>DialogueWise Demo</h1>

      {data.allDialogueWise.edges.map((node, index) => {
        //The node.content will now contain your content.
      })}
    </div>
  );
}

export const query = graphql`
  query {
    allDialogueWise(filter: { slug: { eq: "Provide your slug" } }) {
      edges {
        node {
          content
          slug
          error
        }
      }
    }
  }
`;
```

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