@powerlines/plugin-graphql 0.1.679 → 0.1.681

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.
Files changed (2) hide show
  1. package/README.md +33 -0
  2. package/package.json +7 -7
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.679",
3
+ "version": "0.1.681",
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.73",
97
- "@stryke/fs": "^0.33.118",
98
- "@stryke/path": "^0.29.43",
96
+ "@powerlines/plugin-power-plant": "^0.1.75",
97
+ "@stryke/fs": "^0.33.119",
98
+ "@stryke/path": "^0.29.44",
99
99
  "defu": "^6.1.7",
100
100
  "graphql": "^17.0.2",
101
- "powerlines": "^0.47.216"
101
+ "powerlines": "^0.47.218"
102
102
  },
103
103
  "devDependencies": {
104
- "@powerlines/plugin-plugin": "^0.12.629",
104
+ "@powerlines/plugin-plugin": "^0.12.631",
105
105
  "@types/node": "^25.9.9"
106
106
  },
107
107
  "publishConfig": { "access": "public" },
108
- "gitHead": "75efa1cc4eb8bc90093202669065576aa70fbfef"
108
+ "gitHead": "c71daefe09bbd0d26190c3096e0a30120d3a244b"
109
109
  }