joist-graphql-codegen 1.37.10 → 1.38.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.
- package/build/graphqlUtils.d.ts +5 -5
- package/build/history.d.ts +1 -1
- package/package.json +4 -4
package/build/graphqlUtils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { PrimitiveField, PrimitiveTypescriptType } from "joist-codegen";
|
|
|
2
2
|
import { Import } from "ts-poet";
|
|
3
3
|
import { Fs } from "./utils";
|
|
4
4
|
/** A type for the fields we want to add to `*.graphql` files. */
|
|
5
|
-
export
|
|
5
|
+
export type GqlField = {
|
|
6
6
|
file: string;
|
|
7
7
|
objectType: "input" | "output";
|
|
8
8
|
objectName: string;
|
|
@@ -11,17 +11,17 @@ export declare type GqlField = {
|
|
|
11
11
|
argsString?: string;
|
|
12
12
|
extends?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type GqlUnion = {
|
|
15
15
|
file: string;
|
|
16
16
|
objectName: string;
|
|
17
17
|
objectType: "union";
|
|
18
18
|
types: string[];
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type GqlEntry = GqlField | GqlUnion;
|
|
21
21
|
/** Given a `file` and `fields` to go in it (for potentially different objects), upserts into the existing types. */
|
|
22
22
|
export declare function upsertIntoFile(fs: Fs, file: string, fields: GqlEntry[]): Promise<void>;
|
|
23
23
|
export declare function formatGraphQL(content: string): Promise<string>;
|
|
24
|
-
export
|
|
25
|
-
export
|
|
24
|
+
export type GraphQLType = "Boolean" | "String" | "Int" | "Date" | "DateTime" | string;
|
|
25
|
+
export type SupportedTypescriptTypes = Exclude<PrimitiveTypescriptType, "Object" | Import>;
|
|
26
26
|
export declare function mapTypescriptTypeToGraphQLType(fieldName: string, type: PrimitiveTypescriptType | Import): GraphQLType | undefined;
|
|
27
27
|
export declare function isJsonbColumn(p: PrimitiveField): boolean;
|
package/build/history.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fs } from "./utils";
|
|
2
2
|
/** A map from GraphQL object type name -> its field names that have already been scaffolded. */
|
|
3
|
-
export
|
|
3
|
+
export type History = Record<string, string[]>;
|
|
4
4
|
export declare function loadHistory(fs: Fs): Promise<History>;
|
|
5
5
|
export declare function writeHistory(fs: Fs, history: History): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joist-graphql-codegen",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"change-case": "^4.1.2",
|
|
24
24
|
"graphql": "^16.6.0",
|
|
25
25
|
"is-plain-object": "^5.0.0",
|
|
26
|
-
"joist-codegen": "1.
|
|
27
|
-
"joist-utils": "1.
|
|
26
|
+
"joist-codegen": "1.38.0",
|
|
27
|
+
"joist-utils": "1.38.0",
|
|
28
28
|
"pluralize": "^8.0.0",
|
|
29
29
|
"prettier": "^2.7.1",
|
|
30
30
|
"ts-poet": "^6.1.0"
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"prettier": "^2.7.1",
|
|
39
39
|
"prettier-plugin-organize-imports": "^3.1.1",
|
|
40
40
|
"tsconfig-paths": "^4.0.0",
|
|
41
|
-
"typescript": "^4.
|
|
41
|
+
"typescript": "^4.9.3"
|
|
42
42
|
}
|
|
43
43
|
}
|