@keystonejs/app-version
Advanced tools
Comparing version 1.0.0 to 1.0.1
# @keystonejs/app-version | ||
## 1.0.1 | ||
### Patch Changes | ||
- [`c08c28d2`](https://github.com/keystonejs/keystone/commit/c08c28d22f2c6a2bfa73ab0ea347c9e0da8a9063) [#2593](https://github.com/keystonejs/keystone/pull/2593) Thanks [@jossmac](https://github.com/jossmac)! - Applied a more consistent voice throughout documentation. | ||
## 1.0.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@keystonejs/app-version", | ||
"description": "KeystoneJS App Version Plugin", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "The KeystoneJS Development Team", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
<!--[meta] | ||
section: api | ||
subSection: utilities | ||
title: App Version Plugin | ||
title: App version plugin | ||
[meta]--> | ||
# App Version Plugin | ||
# App version plugin | ||
[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@keystonejs/app-version) | ||
This package provides support for including a version string both as an HTTP response header and as a graphQL query. | ||
@@ -17,8 +19,18 @@ | ||
### Indirectly | ||
This package is designed to be used indirectly via the conveniance API on the `Keystone` class: | ||
```javascript | ||
const keystone = new Keystone({ ..., appVersion: { version: '1.0.0', addVersionToHttpHeaders: true, access: true } }); | ||
const keystone = new Keystone({ | ||
appVersion: { | ||
version: '1.0.0', | ||
addVersionToHttpHeaders: true, | ||
access: true, | ||
}, | ||
}); | ||
``` | ||
### Directly | ||
It can also be used directly if you would like to manually manage your middleware stack of graphQL providers. | ||
@@ -29,8 +41,13 @@ | ||
... | ||
const version = '1.0.0'; | ||
const version = '1.0.0'; | ||
app.use(appVersionMiddleware(version)); | ||
keystone._providers.push(new AppVersionProvider({ version, access: true, schemaNames: ['public'] })); | ||
keystone._providers.push( | ||
new AppVersionProvider({ | ||
version, | ||
access: true, | ||
schemaNames: ['public'], | ||
}) | ||
); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3593
52