@powerlines/plugin-graphql 0.1.679 → 0.1.680
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 +33 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -74,6 +74,39 @@ A Powerlines plugin to generate project code with [GraphQL Codegen](https://grap
|
|
|
74
74
|
|
|
75
75
|
<!-- END doctoc -->
|
|
76
76
|
|
|
77
|
+
## Features
|
|
78
|
+
|
|
79
|
+
- Generates project code from GraphQL schemas with GraphQL Codegen
|
|
80
|
+
- Loads SDL from file or URL into a `GraphQLSchema` document and expands `filename` tokens
|
|
81
|
+
- Delegates generation to the Power Plant plugin via `config.powerplant`
|
|
82
|
+
- Typed options via `./types/plugin` (`GraphQLPluginOptions`, user/resolved config, context)
|
|
83
|
+
|
|
84
|
+
## Usage
|
|
85
|
+
|
|
86
|
+
Install the plugin:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pnpm add @powerlines/plugin-graphql
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Register it in `powerlines.config.ts`:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { defineConfig } from "powerlines";
|
|
96
|
+
import { plugin as graphql } from "@powerlines/plugin-graphql";
|
|
97
|
+
|
|
98
|
+
export default defineConfig({
|
|
99
|
+
plugins: [
|
|
100
|
+
graphql({
|
|
101
|
+
schema: "./schema.graphql",
|
|
102
|
+
filename: "{builtinPath}/graphql/schema.ts"
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Run the Powerlines build for your project to activate the plugin.
|
|
109
|
+
|
|
77
110
|
## Installing
|
|
78
111
|
|
|
79
112
|
Using [pnpm](http://pnpm.io):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-graphql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.680",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from GraphQL schemas.",
|
|
6
6
|
"keywords": ["graphql", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -93,17 +93,17 @@
|
|
|
93
93
|
"@power-plant/core": "^0.0.98",
|
|
94
94
|
"@power-plant/graphql-codegen": "^0.0.94",
|
|
95
95
|
"@power-plant/graphql-schema": "^0.0.1",
|
|
96
|
-
"@powerlines/plugin-power-plant": "^0.1.
|
|
96
|
+
"@powerlines/plugin-power-plant": "^0.1.74",
|
|
97
97
|
"@stryke/fs": "^0.33.118",
|
|
98
98
|
"@stryke/path": "^0.29.43",
|
|
99
99
|
"defu": "^6.1.7",
|
|
100
100
|
"graphql": "^17.0.2",
|
|
101
|
-
"powerlines": "^0.47.
|
|
101
|
+
"powerlines": "^0.47.217"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
104
|
+
"@powerlines/plugin-plugin": "^0.12.630",
|
|
105
105
|
"@types/node": "^25.9.9"
|
|
106
106
|
},
|
|
107
107
|
"publishConfig": { "access": "public" },
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
|
|
109
109
|
}
|