Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/toriphes/wp-graphql-ninja-forms

Adds Ninja Forms Functionality to WPGraphQL schema
https://github.com/toriphes/wp-graphql-ninja-forms

ninjaforms wordpress wpgraphql wpgraphql-plugin

Last synced: about 2 months ago
JSON representation

Adds Ninja Forms Functionality to WPGraphQL schema

Awesome Lists containing this project

README

        

# WPGraphQL Ninja Forms

A WordPress plugin that Adds Ninja Forms functionality to WPGraphQL schema.

**WARNING:** this plugin is under development and it's not production ready!

## Installation

2. Install and activate [WPGraphQL](https://www.wpgraphql.com/) wordpress plugin
2. Install and activate [Ninja Forms](https://wordpress.org/plugins/ninja-forms/) wordpress plugin
1. Clone or download the zip of this repository into your WordPress plugin directory and activate **WPGraphQL Ninja Forms**

## Features

* Query **forms** with their related fields
* Submit one or multiple form entries using mutations

## Get a form and its fields

```graphql
{
form(id: "1", idType: DATABASE_ID) {
title,
fields {
nodes {
fieldId
label
type
}
}
}
}
```

## Submit a form entry

```graphql
{
submitForm(input: {formId: 1, data: [
{id: 1, value: "Julius"},
{id: 2, value: "[email protected]"},
{id: 3, value: "Hello there"}
]}) {
errors {
fieldId
message
slug
}
message
success
}
}
```