graphile-meta-schema 0.2.10 โ†’ 0.2.12

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 +37 -13
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -8,17 +8,49 @@
8
8
  <a href="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml">
9
9
  <img height="20" src="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml/badge.svg" />
10
10
  </a>
11
- <a href="https://github.com/launchql/launchql/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
12
- <a href="https://www.npmjs.com/package/graphile-meta-schema"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/launchql?filename=graphile%2Fgraphile-meta-schema%2Fpackage.json"/></a>
11
+ <a href="https://github.com/launchql/launchql/blob/main/LICENSE">
12
+ <img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/>
13
+ </a>
14
+ <a href="https://www.npmjs.com/package/graphile-meta-schema">
15
+ <img height="20" src="https://img.shields.io/github/package-json/v/launchql/launchql?filename=graphile%2Fgraphile-meta-schema%2Fpackage.json"/>
16
+ </a>
13
17
  </p>
14
18
 
15
- ## Install
19
+ **`graphile-meta-schema`** exposes a `_meta` GraphQL schema so you can introspect tables, fields, and constraints directly from PostGraphile.
20
+
21
+ ## ๐Ÿš€ Installation
16
22
 
17
23
  ```sh
18
24
  pnpm add graphile-meta-schema
19
25
  ```
20
26
 
21
- ## Example Query
27
+ ## โœจ Features
28
+
29
+ - GraphQL meta endpoint for table/field/constraint details
30
+ - Works alongside your existing PostGraphile schemas
31
+ - Ships with fixtures to explore constraint metadata
32
+
33
+ ## ๐Ÿ“ฆ Usage
34
+
35
+ Register the plugin with PostGraphile (CLI or library):
36
+
37
+ ```ts
38
+ import express from 'express';
39
+ import { postgraphile } from 'postgraphile';
40
+ import PgMetaschemaPlugin from 'graphile-meta-schema';
41
+
42
+ const app = express();
43
+
44
+ app.use(
45
+ postgraphile(process.env.DATABASE_URL, ['app_public'], {
46
+ appendPlugins: [PgMetaschemaPlugin]
47
+ })
48
+ );
49
+ ```
50
+
51
+ The plugin adds a `_meta` query root alongside your existing schemas. Use it to inspect fields, constraints, relations, and generated inflection.
52
+
53
+ ### Example Query
22
54
 
23
55
  ```gql
24
56
  query MetaQuery {
@@ -84,21 +116,13 @@ query MetaQuery {
84
116
  }
85
117
  ```
86
118
 
87
- ## Testing
119
+ ## ๐Ÿงช Testing
88
120
 
89
121
  ```sh
90
122
  # requires a local Postgres with PostGIS available (defaults to postgres/password@localhost:5432)
91
123
  pnpm --filter graphile-meta-schema test
92
124
  ```
93
125
 
94
- If you want to explore the fixtures manually:
95
-
96
- ```sh
97
- createdb metaschema_example
98
- psql metaschema_example < sql/test.sql
99
- psql metaschema_example < sql/types.sql
100
- ```
101
-
102
126
  ---
103
127
 
104
128
  ## Education and Tutorials
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-meta-schema",
3
- "version": "0.2.10",
3
+ "version": "0.2.12",
4
4
  "description": "graphile meta schema",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/launchql/launchql",
@@ -40,10 +40,10 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@graphile-contrib/pg-many-to-many": "^1.0.0",
43
- "graphile-test": "^2.8.9",
43
+ "graphile-test": "^2.8.11",
44
44
  "graphql-tag": "2.12.6",
45
45
  "makage": "^0.1.8",
46
- "pgsql-test": "^2.14.12"
46
+ "pgsql-test": "^2.14.14"
47
47
  },
48
48
  "dependencies": {
49
49
  "graphile-build": "^4.14.1",
@@ -51,5 +51,5 @@
51
51
  "graphile-utils": "^4.14.1",
52
52
  "graphql": "15.10.1"
53
53
  },
54
- "gitHead": "3812f24a480b2035b3413ec7fecfe492f294e590"
54
+ "gitHead": "00c90828cab8d3e306ebb2bc6053aab4aa9ae807"
55
55
  }