Skip to content

Commit

Permalink
Add contributing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Dec 7, 2019
1 parent 0a46803 commit 21809f2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 14 deletions.
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing

This project uses [WP Testing Tools][] to run tests with Codeception and
wp-browser.

To run the tests all you need is git and Docker. On Windows you should run
the commands from git-bash.

In the git repository root run

docker/compose.sh

This will build and start up the Docker environment. It will take awhile but
only on the first time.

Once it's running on a second terminal run to open the testing shell

docker/shell.sh

and in there run

composer test

For more information checkout the [WP Testing Tools][] README.

[wp testing tools]: https://github.com/valu-digital/wp-testing-tools
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Otherwise you can clone it from Github to your plugins using the stable branch

### `graphql_lock_load_query`

- Load the queries from a custom location
- The query ID is passed as the second parameter
- Load the queries from a custom location
- The query ID is passed as the second parameter

Example:

Expand All @@ -75,25 +75,25 @@ Note: You should prefer using hidden directories / files to avoid exposing the l

### `graphql_lock_post_type`

- Default: `'graphql_query'`
- The custom post type used to persist queries. If empty, queries will not be
persisted.
- Default: `'graphql_query'`
- The custom post type used to persist queries. If empty, queries will not be
persisted.

### `graphql_lock_show_in_graphql`

- Default: `false`
- Whether the custom post type will itself be exposed via GraphQL. Enabling
allows insight into which queries are persisted.
- Default: `false`
- Whether the custom post type will itself be exposed via GraphQL. Enabling
allows insight into which queries are persisted.

```graphql
query PersistedQueryQuery {
persistedQueries {
nodes {
id
title
content(format: RAW)
}
persistedQueries {
nodes {
id
title
content(format: RAW)
}
}
}
```

Expand Down Expand Up @@ -131,3 +131,7 @@ There's a settings screen for managing the option
This plugin is based on the [Quartz persisted Queries][original] plugin.

[original]: https://github.com/Quartz/wp-graphql-persisted-queries

## Contributing

Read [CONTRIBUTING.md](/CONTRIBUTING.md)

0 comments on commit 21809f2

Please sign in to comment.