@lssm/lib.graphql-core 1.7.3 → 1.9.0

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 +48 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @lssm/lib.graphql-core
2
+
3
+ Core GraphQL utilities and Pothos builder setup.
4
+
5
+ ## Purpose
6
+
7
+ To provide a pre-configured Pothos `SchemaBuilder` with common plugins (Complexity, Tracing, Relay, Dataloader) and standard scalar types. This ensures all GraphQL services in the monorepo start with a consistent baseline.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @lssm/lib.graphql-core
13
+ # or
14
+ bun add @lssm/lib.graphql-core
15
+ ```
16
+
17
+ ## Key Concepts
18
+
19
+ - **Shared Builder**: A factory or base builder configuration.
20
+ - **Scalars**: Common scalars like `DateTime`, `JSON`, etc.
21
+ - **Plugins**: Pre-wired plugins for performance and features.
22
+
23
+ ## Exports
24
+
25
+ - `builder`: The configured Pothos builder factory.
26
+ - `scalars`: Re-exported scalars.
27
+
28
+ ## Usage
29
+
30
+ ```ts
31
+ import { builder } from '@lssm/lib.graphql-core';
32
+
33
+ builder.queryType({
34
+ fields: (t) => ({
35
+ hello: t.string({ resolve: () => 'world' }),
36
+ }),
37
+ });
38
+
39
+ export const schema = builder.toSchema();
40
+ ```
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.graphql-core",
3
- "version": "1.7.3",
3
+ "version": "1.9.0",
4
4
  "description": "Shared GraphQL core: Pothos builder factory, scalars, tracing & complexity",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,14 +26,14 @@
26
26
  "graphql": ">=16.0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@lssm/tool.tsdown": "*",
30
- "tsdown": "^0.15.9",
29
+ "@lssm/tool.tsdown": "workspace:*",
30
+ "tsdown": "^0.16.6",
31
31
  "typescript": "^5.9.3"
32
32
  },
33
33
  "type": "module",
34
34
  "module": "./dist/index.js",
35
35
  "exports": {
36
- ".": "./src/index.ts",
36
+ ".": "./dist/index.js",
37
37
  "./*": "./*"
38
38
  },
39
39
  "publishConfig": {