@ttoss/graphql-api 0.3.4 → 0.3.6
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/dist/cli.d.mts +2 -0
- package/dist/esm/{chunk-SAO2ACBY.js → chunk-O4CP4YC5.js} +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.mts +30 -0
- package/dist/shield.d.mts +2 -0
- package/package.json +4 -4
package/dist/cli.d.mts
ADDED
|
@@ -3,6 +3,6 @@ var __require = /* @__PURE__ */(x => typeof require !== "undefined" ? require :
|
|
|
3
3
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
4
|
}) : x)(function (x) {
|
|
5
5
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
6
|
-
throw
|
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
7
|
});
|
|
8
8
|
export { __require };
|
package/dist/esm/cli.js
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ObjectTypeComposer, SchemaComposer } from 'graphql-compose';
|
|
2
|
+
export * from 'graphql-compose';
|
|
3
|
+
export { default as composeWithConnection } from 'graphql-compose-connection';
|
|
4
|
+
import { GraphQLSchema } from 'graphql';
|
|
5
|
+
import { IMiddleware, IMiddlewareGenerator } from 'graphql-middleware';
|
|
6
|
+
|
|
7
|
+
declare const composeWithRelay: <TContext>(tc: ObjectTypeComposer<any, TContext>) => ObjectTypeComposer<any, TContext>;
|
|
8
|
+
|
|
9
|
+
type ResolvedGlobalId = {
|
|
10
|
+
type: string;
|
|
11
|
+
recordId: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Takes a type name and an ID specific to that type name, and returns a
|
|
15
|
+
* "global ID" that is unique among all types.
|
|
16
|
+
*/
|
|
17
|
+
declare const toGlobalId: (type: string, recordId: string | number) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Takes the "global ID" created by toGlobalID, and returns the type name and ID
|
|
20
|
+
* used to create it.
|
|
21
|
+
*/
|
|
22
|
+
declare const fromGlobalId: (globalId: string) => ResolvedGlobalId;
|
|
23
|
+
|
|
24
|
+
type BuildSchemaInput<TContext = any> = {
|
|
25
|
+
schemaComposer: SchemaComposer<TContext>;
|
|
26
|
+
middlewares?: (IMiddleware | IMiddlewareGenerator<any, TContext, any>)[];
|
|
27
|
+
};
|
|
28
|
+
declare const buildSchema: ({ schemaComposer, middlewares, }: BuildSchemaInput) => GraphQLSchema;
|
|
29
|
+
|
|
30
|
+
export { BuildSchemaInput, buildSchema, composeWithRelay, fromGlobalId, toGlobalId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/graphql-api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "A library for building GraphQL APIs.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/yargs": "^17.0.24",
|
|
49
49
|
"graphql": "^16.6.0",
|
|
50
|
-
"jest": "^29.
|
|
51
|
-
"tsup": "^7.
|
|
52
|
-
"@ttoss/config": "^1.30.
|
|
50
|
+
"jest": "^29.6.2",
|
|
51
|
+
"tsup": "^7.1.0",
|
|
52
|
+
"@ttoss/config": "^1.30.6"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"api",
|