@contractspec/lib.graphql-core 3.7.6 → 3.7.8
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 +31 -54
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,77 +1,54 @@
|
|
|
1
1
|
# @contractspec/lib.graphql-core
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
3
|
+
Website: https://contractspec.io
|
|
4
4
|
|
|
5
|
+
**Shared GraphQL core: Pothos builder factory, scalars, tracing & complexity.**
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## What It Provides
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
- **Layer**: lib.
|
|
10
|
+
- **Consumers**: graphql-federation, graphql-prisma, contracts-runtime-server-graphql, bundles.
|
|
11
|
+
- Related ContractSpec packages include `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
12
|
+
- Related ContractSpec packages include `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
11
13
|
|
|
12
14
|
## Installation
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
npm install @contractspec/lib.graphql-core
|
|
16
|
-
# or
|
|
17
|
-
bun add @contractspec/lib.graphql-core
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Key Concepts
|
|
16
|
+
`npm install @contractspec/lib.graphql-core`
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
- **Scalars**: Common scalars like `DateTime`, `JSON`, etc.
|
|
24
|
-
- **Plugins**: Pre-wired plugins for performance and features.
|
|
18
|
+
or
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- `builder`: The configured Pothos builder factory.
|
|
29
|
-
- `scalars`: Re-exported scalars.
|
|
20
|
+
`bun add @contractspec/lib.graphql-core`
|
|
30
21
|
|
|
31
22
|
## Usage
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
import { builder } from '@contractspec/lib.graphql-core';
|
|
35
|
-
|
|
36
|
-
builder.queryType({
|
|
37
|
-
fields: (t) => ({
|
|
38
|
-
hello: t.string({ resolve: () => 'world' }),
|
|
39
|
-
}),
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export const schema = builder.toSchema();
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
24
|
+
Import the root entrypoint from `@contractspec/lib.graphql-core`, or choose a documented subpath when you only need one part of the package surface.
|
|
68
25
|
|
|
26
|
+
## Architecture
|
|
69
27
|
|
|
28
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
70
29
|
|
|
30
|
+
## Public Entry Points
|
|
71
31
|
|
|
32
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
72
33
|
|
|
34
|
+
## Local Commands
|
|
73
35
|
|
|
36
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
37
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
38
|
+
- `bun run typecheck` — tsc --noEmit
|
|
39
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
40
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
41
|
+
- `bun run clean` — rm -rf dist
|
|
42
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
43
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
44
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
74
45
|
|
|
46
|
+
## Recent Updates
|
|
75
47
|
|
|
48
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
76
49
|
|
|
50
|
+
## Notes
|
|
77
51
|
|
|
52
|
+
- Builder factory is consumed by all GraphQL packages — interface changes have high blast radius.
|
|
53
|
+
- Scalar definitions must stay aligned with the schema lib.
|
|
54
|
+
- Tracing and complexity plugins must not introduce runtime overhead in production without opt-in.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.graphql-core",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.8",
|
|
4
4
|
"description": "Shared GraphQL core: Pothos builder factory, scalars, tracing & complexity",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"graphql": ">=16.13.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@contractspec/tool.typescript": "3.7.
|
|
42
|
+
"@contractspec/tool.typescript": "3.7.8",
|
|
43
43
|
"typescript": "^5.9.3",
|
|
44
|
-
"@contractspec/tool.bun": "3.7.
|
|
44
|
+
"@contractspec/tool.bun": "3.7.8"
|
|
45
45
|
},
|
|
46
46
|
"type": "module",
|
|
47
47
|
"exports": {
|