buro26-strapi-graphql 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Strapi GraphQL Extension
|
|
2
2
|
|
|
3
|
-
Extension and utilities for Strapi GraphQL API.
|
|
3
|
+
Extension and utilities for Strapi GraphQL API. This plugin adds additional features to the Strapi GraphQL plugin such
|
|
4
|
+
as co-location of GraphQL schema and resolvers, field overriding, and field authorization.
|
|
5
|
+
|
|
6
|
+
This let's you define your GraphQL schema and resolvers in the content-type directory, making it easier to manage and
|
|
7
|
+
maintain your GraphQL API.
|
|
4
8
|
|
|
5
9
|
## Getting started
|
|
6
10
|
|
|
@@ -10,10 +14,30 @@ npm i buro26-strapi-graphql
|
|
|
10
14
|
|
|
11
15
|
## Usage
|
|
12
16
|
|
|
17
|
+
### Configure Strapi GraphQL plugin
|
|
18
|
+
|
|
19
|
+
To be able to use this plugin, you will first need to configure
|
|
20
|
+
the [Strapi GraphQL plugin](https://docs.strapi.io/dev-docs/plugins/graphql).
|
|
21
|
+
|
|
22
|
+
### Enable plugin
|
|
23
|
+
|
|
24
|
+
Add plugin in `./config/plugins.js/ts` in your Strapi project.
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
export default () => ({
|
|
28
|
+
// ...
|
|
29
|
+
'burotwosix-graphql-plugin': {
|
|
30
|
+
enabled: true
|
|
31
|
+
}
|
|
32
|
+
// ...
|
|
33
|
+
})
|
|
34
|
+
```
|
|
13
35
|
|
|
36
|
+
### Create a new GraphQL Extension
|
|
14
37
|
|
|
15
|
-
|
|
38
|
+
### Overriding a field
|
|
16
39
|
|
|
40
|
+
### Add authorization to a field
|
|
17
41
|
|
|
18
42
|
## Test and Deploy
|
|
19
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buro26-strapi-graphql",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Extension and utilities for Strapi GraphQL",
|
|
5
5
|
"homepage": "https://gitlab.com/buro26/public/buro26-strapi-graphql#readme",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git+https://gitlab.com/buro26/public/buro26-strapi-graphql"
|
|
15
|
+
"url": "git+https://gitlab.com/buro26/public/buro26-strapi-graphql.git"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"graphql",
|