Skip to content

Commit b4aced3

Browse files
committed
pin graphile rc versions in graphql/* packages to fix dual-install of grafast
- Pin grafast, grafserv, graphile-build, graphile-build-pg, graphile-config, pg-sql2, postgraphile in graphql/test, graphql/query, graphql/server, graphql/explorer - Fixes runtime error: Preset attempted to register version 'rc.7' of 'grafast' but 'rc.4' is already registered - Update GRAPHILE.md to document graphql/* packages
1 parent b9eb29a commit b4aced3

6 files changed

Lines changed: 99 additions & 1540 deletions

File tree

GRAPHILE.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ All Graphile RC dependencies are pinned to **exact versions** (no `^` or `~` pre
5050

5151
## Packages That Use Graphile
5252

53-
The following packages in `graphile/` depend on the Graphile RC ecosystem:
53+
### `graphile/` packages
5454

5555
- **graphile-settings** -- Core settings/configuration for PostGraphile v5 (most deps, including the transitive peer deps `tamedevil`, `@dataplan/pg`, `@dataplan/json`, `grafserv`)
5656
- **graphile-schema** -- Builds GraphQL SDL from PostgreSQL using PostGraphile v5
@@ -61,14 +61,24 @@ The following packages in `graphile/` depend on the Graphile RC ecosystem:
6161
- **graphile-authz** -- Dynamic authorization plugin for PostGraphile v5
6262
- **postgraphile-plugin-pgvector** -- pgvector similarity search plugin for PostGraphile v5
6363

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+
6473
## Upgrading Graphile RC Versions
6574

6675
When upgrading to a new Graphile RC set:
6776

6877
1. Check the latest RC versions on npm for all packages listed in the table above
6978
2. Verify peer dependency compatibility by running `npm view <package>@<version> peerDependencies` for each package
7079
3. Update **all** packages in this table simultaneously -- do not upgrade one without the others
71-
4. Update every `graphile/*/package.json` that references these packages
80+
4. Update every `graphile/*/package.json` and `graphql/*/package.json` that references these packages
7281
5. Run `pnpm install` to update the lockfile
73-
6. Run tests to verify nothing broke
74-
7. Update the version table in this document
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

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",

graphql/query/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
"dependencies": {
3232
"ajv": "^7.0.4",
3333
"gql-ast": "workspace:^",
34-
"grafast": "^1.0.0-rc.4",
35-
"graphile-build-pg": "^5.0.0-rc.3",
36-
"graphile-config": "1.0.0-rc.3",
34+
"grafast": "1.0.0-rc.7",
35+
"graphile-build-pg": "5.0.0-rc.5",
36+
"graphile-config": "1.0.0-rc.5",
3737
"graphile-settings": "workspace:^",
3838
"graphql": "^16.9.0",
3939
"inflection": "^3.0.0",
4040
"lru-cache": "^10.4.3",
41-
"postgraphile": "^5.0.0-rc.4"
41+
"postgraphile": "5.0.0-rc.7"
4242
},
4343
"keywords": [
4444
"query",

graphql/server/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
"deepmerge": "^4.3.1",
5454
"express": "^5.2.1",
5555
"gql-ast": "workspace:^",
56-
"grafast": "^1.0.0-rc.4",
57-
"grafserv": "^1.0.0-rc.4",
58-
"graphile-build": "^5.0.0-rc.3",
59-
"graphile-build-pg": "^5.0.0-rc.3",
56+
"grafast": "1.0.0-rc.7",
57+
"grafserv": "1.0.0-rc.6",
58+
"graphile-build": "5.0.0-rc.4",
59+
"graphile-build-pg": "5.0.0-rc.5",
6060
"graphile-cache": "workspace:^",
61-
"graphile-config": "1.0.0-rc.3",
61+
"graphile-config": "1.0.0-rc.5",
6262
"graphile-settings": "workspace:^",
6363
"graphql": "^16.9.0",
6464
"graphql-upload": "^13.0.0",
@@ -67,9 +67,9 @@
6767
"pg-cache": "workspace:^",
6868
"pg-env": "workspace:^",
6969
"pg-query-context": "workspace:^",
70-
"pg-sql2": "^5.0.0-rc.3",
71-
"postgraphile": "^5.0.0-rc.4",
72-
"postgraphile-plugin-connection-filter": "^3.0.0-rc.1",
70+
"pg-sql2": "5.0.0-rc.4",
71+
"postgraphile": "5.0.0-rc.7",
72+
"postgraphile-plugin-connection-filter": "3.0.0-rc.1",
7373
"request-ip": "^3.3.0"
7474
},
7575
"devDependencies": {

graphql/test/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@
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
"graphile-settings": "workspace:^",
4545
"graphile-test": "workspace:^",
4646
"graphql": "^16.9.0",
4747
"mock-req": "^0.2.0",
4848
"pg": "^8.17.1",
4949
"pgsql-test": "workspace:^",
50-
"postgraphile": "^5.0.0-rc.4"
50+
"postgraphile": "5.0.0-rc.7"
5151
},
5252
"keywords": [
5353
"testing",

0 commit comments

Comments
 (0)