Skip to content

Commit dfa0519

Browse files
authored
Merge pull request #732 from constructive-io/devin/1771473255-pin-graphile-rc-versions
Pin all Graphile v5 RC deps to exact latest versions
2 parents 6dac024 + b4aced3 commit dfa0519

14 files changed

Lines changed: 2974 additions & 9075 deletions

File tree

GRAPHILE.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Graphile v5 RC Dependency Management
2+
3+
## Overview
4+
5+
This monorepo contains several packages that depend on the [Graphile](https://graphile.org/) v5 release candidate (RC) ecosystem. The Graphile v5 RC packages are **tightly coupled** -- all packages in the ecosystem must be at matching RC versions to work correctly.
6+
7+
## The Problem (Why We Pin)
8+
9+
Graphile v5 RC packages declare peer dependencies on each other. When a new RC is released, the minimum required versions of those peer deps often bump together. For example, `graphile-build-pg@5.0.0-rc.5` requires `@dataplan/pg@^1.0.0-rc.5` and `tamedevil@^0.1.0-rc.4`, whereas the earlier `rc.3` only required `rc.3` versions of those peers.
10+
11+
If our packages use loose caret ranges (e.g., `^5.0.0-rc.3`), the package manager may resolve to the **latest** RC (e.g., `rc.5` or `rc.7`), which introduces new peer dependency requirements that nothing in our tree satisfies. This causes cascading "missing peer dependency" warnings like:
12+
13+
```
14+
graphile-build-pg 5.0.0-rc.5
15+
- missing peer @dataplan/pg@^1.0.0-rc.5
16+
- missing peer tamedevil@^0.1.0-rc.4
17+
postgraphile 5.0.0-rc.7
18+
- missing peer @dataplan/pg@^1.0.0-rc.5
19+
- missing peer @dataplan/json@^1.0.0-rc.5
20+
- missing peer grafserv@^1.0.0-rc.6
21+
- missing peer tamedevil@^0.1.0-rc.4
22+
```
23+
24+
## Our Approach: Pinned Exact Versions
25+
26+
All Graphile RC dependencies are pinned to **exact versions** (no `^` or `~` prefix). This ensures:
27+
28+
1. Every package in the monorepo uses the same RC version set
29+
2. No version drift when new RCs are published
30+
3. All peer dependency requirements are explicitly satisfied
31+
4. Deterministic installs across environments
32+
33+
## Current Pinned Versions
34+
35+
| Package | Pinned Version |
36+
|---------|---------------|
37+
| `grafast` | `1.0.0-rc.7` |
38+
| `grafserv` | `1.0.0-rc.6` |
39+
| `graphile-build` | `5.0.0-rc.4` |
40+
| `graphile-build-pg` | `5.0.0-rc.5` |
41+
| `graphile-config` | `1.0.0-rc.5` |
42+
| `graphile-utils` | `5.0.0-rc.6` |
43+
| `pg-sql2` | `5.0.0-rc.4` |
44+
| `postgraphile` | `5.0.0-rc.7` |
45+
| `@dataplan/json` | `1.0.0-rc.5` |
46+
| `@dataplan/pg` | `1.0.0-rc.5` |
47+
| `tamedevil` | `0.1.0-rc.4` |
48+
| `@graphile-contrib/pg-many-to-many` | `2.0.0-rc.1` |
49+
| `postgraphile-plugin-connection-filter` | `3.0.0-rc.1` |
50+
51+
## Packages That Use Graphile
52+
53+
### `graphile/` packages
54+
55+
- **graphile-settings** -- Core settings/configuration for PostGraphile v5 (most deps, including the transitive peer deps `tamedevil`, `@dataplan/pg`, `@dataplan/json`, `grafserv`)
56+
- **graphile-schema** -- Builds GraphQL SDL from PostgreSQL using PostGraphile v5
57+
- **graphile-query** -- Executes GraphQL queries against PostGraphile v5 schemas
58+
- **graphile-search-plugin** -- Full-text search plugin for PostGraphile v5
59+
- **graphile-cache** -- LRU cache with PostGraphile v5 integration
60+
- **graphile-test** -- PostGraphile v5 testing utilities
61+
- **graphile-authz** -- Dynamic authorization plugin for PostGraphile v5
62+
- **postgraphile-plugin-pgvector** -- pgvector similarity search plugin for PostGraphile v5
63+
64+
### `graphql/` packages
65+
66+
- **@constructive-io/graphql-server** -- GraphQL server with PostGraphile v5
67+
- **@constructive-io/graphql-test** -- GraphQL testing with all plugins loaded
68+
- **@constructive-io/graphql-query** -- GraphQL query builder
69+
- **@constructive-io/graphql-explorer** -- GraphQL Explorer UI
70+
71+
**Important:** Having different versions of `grafast` (or other singleton graphile packages) installed in the same workspace causes runtime errors like `Preset attempted to register version 'X' of 'grafast', but version 'Y' is already registered`. This is why **all** packages must use the same pinned versions.
72+
73+
## Upgrading Graphile RC Versions
74+
75+
When upgrading to a new Graphile RC set:
76+
77+
1. Check the latest RC versions on npm for all packages listed in the table above
78+
2. Verify peer dependency compatibility by running `npm view <package>@<version> peerDependencies` for each package
79+
3. Update **all** packages in this table simultaneously -- do not upgrade one without the others
80+
4. Update every `graphile/*/package.json` and `graphql/*/package.json` that references these packages
81+
5. Run `pnpm install` to update the lockfile
82+
6. Run `pnpm build` to verify no type errors
83+
7. Run tests to verify nothing broke
84+
8. Update the version table in this document

graphile/graphile-authz/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"makage": "^0.1.10"
3434
},
3535
"dependencies": {
36-
"graphile-build": "^5.0.0-rc.3",
37-
"graphile-build-pg": "^5.0.0-rc.3",
38-
"graphile-config": "1.0.0-rc.3"
36+
"graphile-build": "5.0.0-rc.4",
37+
"graphile-build-pg": "5.0.0-rc.5",
38+
"graphile-config": "1.0.0-rc.5"
3939
},
4040
"keywords": [
4141
"postgraphile",

graphile/graphile-cache/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"dependencies": {
3232
"@pgpmjs/logger": "workspace:^",
3333
"express": "^5.2.1",
34-
"grafserv": "^1.0.0-rc.4",
34+
"grafserv": "1.0.0-rc.6",
3535
"lru-cache": "^11.2.4",
3636
"pg-cache": "workspace:^",
37-
"postgraphile": "^5.0.0-rc.4"
37+
"postgraphile": "5.0.0-rc.7"
3838
},
3939
"devDependencies": {
4040
"@types/express": "^5.0.6",

graphile/graphile-query/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
"test:watch": "jest --watch"
3030
},
3131
"dependencies": {
32-
"grafast": "^1.0.0-rc.4",
33-
"graphile-build": "^5.0.0-rc.3",
34-
"graphile-build-pg": "^5.0.0-rc.3",
35-
"graphile-config": "1.0.0-rc.3",
32+
"grafast": "1.0.0-rc.7",
33+
"graphile-build": "5.0.0-rc.4",
34+
"graphile-build-pg": "5.0.0-rc.5",
35+
"graphile-config": "1.0.0-rc.5",
3636
"graphile-settings": "workspace:^",
3737
"graphql": "^16.9.0",
3838
"pg": "^8.17.1",
39-
"postgraphile": "^5.0.0-rc.4"
39+
"postgraphile": "5.0.0-rc.7"
4040
},
4141
"devDependencies": {
4242
"@types/pg": "^8.16.0",

graphile/graphile-schema/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
},
3131
"dependencies": {
3232
"deepmerge": "^4.3.1",
33-
"graphile-build": "^5.0.0-rc.3",
34-
"graphile-config": "1.0.0-rc.3",
33+
"graphile-build": "5.0.0-rc.4",
34+
"graphile-config": "1.0.0-rc.5",
3535
"graphile-settings": "workspace:^",
3636
"graphql": "^16.9.0",
3737
"pg-cache": "workspace:^",

graphile/graphile-search-plugin/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@
4848
"postgraphile-plugin-connection-filter": "^3.0.0-rc.1"
4949
},
5050
"dependencies": {
51-
"@dataplan/pg": "1.0.0-rc.3",
52-
"graphile-build": "^5.0.0-rc.3",
53-
"graphile-build-pg": "^5.0.0-rc.3",
54-
"graphile-config": "1.0.0-rc.3",
55-
"pg-sql2": "^5.0.0-rc.3"
51+
"@dataplan/pg": "1.0.0-rc.5",
52+
"graphile-build": "5.0.0-rc.4",
53+
"graphile-build-pg": "5.0.0-rc.5",
54+
"graphile-config": "1.0.0-rc.5",
55+
"pg-sql2": "5.0.0-rc.4"
5656
},
5757
"peerDependencies": {
5858
"graphql": "^16.9.0",
59-
"postgraphile": "^5.0.0-rc.4",
59+
"postgraphile": "5.0.0-rc.7",
6060
"postgraphile-plugin-connection-filter": "^3.0.0-rc.1"
6161
},
6262
"peerDependenciesMeta": {

graphile/graphile-settings/package.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,27 @@
3131
"dependencies": {
3232
"@constructive-io/graphql-env": "workspace:^",
3333
"@constructive-io/graphql-types": "workspace:^",
34+
"@dataplan/json": "1.0.0-rc.5",
35+
"@dataplan/pg": "1.0.0-rc.5",
3436
"@graphile-contrib/pg-many-to-many": "2.0.0-rc.1",
3537
"@pgpmjs/types": "workspace:^",
3638
"cors": "^2.8.5",
3739
"express": "^5.2.1",
38-
"grafast": "^1.0.0-rc.4",
39-
"graphile-build": "^5.0.0-rc.3",
40-
"graphile-build-pg": "^5.0.0-rc.3",
41-
"graphile-config": "1.0.0-rc.3",
40+
"grafast": "1.0.0-rc.7",
41+
"grafserv": "1.0.0-rc.6",
42+
"graphile-build": "5.0.0-rc.4",
43+
"graphile-build-pg": "5.0.0-rc.5",
44+
"graphile-config": "1.0.0-rc.5",
4245
"graphile-search-plugin": "workspace:^",
4346
"graphql": "^16.9.0",
4447
"inflekt": "^0.3.0",
4548
"lru-cache": "^11.2.4",
4649
"pg": "^8.17.1",
47-
"pg-sql2": "^5.0.0-rc.3",
48-
"postgraphile": "^5.0.0-rc.4",
49-
"postgraphile-plugin-connection-filter": "^3.0.0-rc.1",
50-
"request-ip": "^3.3.0"
50+
"pg-sql2": "5.0.0-rc.4",
51+
"postgraphile": "5.0.0-rc.7",
52+
"postgraphile-plugin-connection-filter": "3.0.0-rc.1",
53+
"request-ip": "^3.3.0",
54+
"tamedevil": "0.1.0-rc.4"
5155
},
5256
"devDependencies": {
5357
"@types/cors": "^2.8.17",

graphile/graphile-test/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
"@constructive-io/graphql-env": "workspace:^",
3838
"@constructive-io/graphql-types": "workspace:^",
3939
"@pgpmjs/types": "workspace:^",
40-
"grafast": "^1.0.0-rc.4",
41-
"graphile-build": "^5.0.0-rc.3",
42-
"graphile-build-pg": "^5.0.0-rc.3",
43-
"graphile-config": "1.0.0-rc.3",
40+
"grafast": "1.0.0-rc.7",
41+
"graphile-build": "5.0.0-rc.4",
42+
"graphile-build-pg": "5.0.0-rc.5",
43+
"graphile-config": "1.0.0-rc.5",
4444
"graphql": "^16.9.0",
4545
"mock-req": "^0.2.0",
4646
"pg": "^8.17.1",
4747
"pgsql-test": "workspace:^",
48-
"postgraphile": "^5.0.0-rc.4"
48+
"postgraphile": "5.0.0-rc.7"
4949
},
5050
"keywords": [
5151
"testing",

graphile/postgraphile-plugin-pgvector/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
"pgsql-test": "workspace:^"
3939
},
4040
"dependencies": {
41-
"grafast": "^1.0.0-rc.4",
42-
"graphile-build": "^5.0.0-rc.3",
43-
"graphile-build-pg": "^5.0.0-rc.3",
44-
"graphile-config": "1.0.0-rc.3",
45-
"pg-sql2": "^5.0.0-rc.3"
41+
"grafast": "1.0.0-rc.7",
42+
"graphile-build": "5.0.0-rc.4",
43+
"graphile-build-pg": "5.0.0-rc.5",
44+
"graphile-config": "1.0.0-rc.5",
45+
"pg-sql2": "5.0.0-rc.4"
4646
},
4747
"peerDependencies": {
4848
"graphql": "^16.9.0",
49-
"postgraphile": "^5.0.0-rc.4"
49+
"postgraphile": "5.0.0-rc.7"
5050
},
5151
"keywords": [
5252
"postgraphile",

graphql/explorer/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
"@constructive-io/url-domains": "workspace:^",
4040
"@pgpmjs/server-utils": "workspace:^",
4141
"express": "^5.2.1",
42-
"grafserv": "^1.0.0-rc.4",
42+
"grafserv": "1.0.0-rc.6",
4343
"graphile-cache": "workspace:^",
44-
"graphile-config": "1.0.0-rc.3",
44+
"graphile-config": "1.0.0-rc.5",
4545
"graphile-settings": "workspace:^",
4646
"graphql": "^16.9.0",
4747
"pg-cache": "workspace:^",
4848
"pg-env": "workspace:^",
49-
"postgraphile": "^5.0.0-rc.4"
49+
"postgraphile": "5.0.0-rc.7"
5050
},
5151
"devDependencies": {
5252
"@types/express": "^5.0.6",

0 commit comments

Comments
 (0)