polen 0.11.0-next.11 → 0.11.0-next.12
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/api/iso/schema/$$.d.ts +1 -0
- package/build/api/iso/schema/$$.d.ts.map +1 -1
- package/build/api/iso/schema/$$.js +1 -0
- package/build/api/iso/schema/$$.js.map +1 -1
- package/build/api/iso/schema/routing.d.ts +34 -0
- package/build/api/iso/schema/routing.d.ts.map +1 -1
- package/build/api/iso/schema/routing.js +58 -0
- package/build/api/iso/schema/routing.js.map +1 -1
- package/build/api/iso/schema/validation.d.ts +32 -0
- package/build/api/iso/schema/validation.d.ts.map +1 -0
- package/build/api/iso/schema/validation.js +101 -0
- package/build/api/iso/schema/validation.js.map +1 -0
- package/build/template/components/ArgumentList.d.ts +3 -4
- package/build/template/components/ArgumentList.d.ts.map +1 -1
- package/build/template/components/ArgumentList.js.map +1 -1
- package/build/template/components/Changelog.js +2 -2
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/DeprecationReason.d.ts +2 -2
- package/build/template/components/DeprecationReason.d.ts.map +1 -1
- package/build/template/components/DeprecationReason.js.map +1 -1
- package/build/template/components/Description.d.ts +2 -2
- package/build/template/components/Description.d.ts.map +1 -1
- package/build/template/components/Description.js.map +1 -1
- package/build/template/components/Field.d.ts +3 -4
- package/build/template/components/Field.d.ts.map +1 -1
- package/build/template/components/Field.js.map +1 -1
- package/build/template/components/FieldListSection.d.ts +3 -4
- package/build/template/components/FieldListSection.d.ts.map +1 -1
- package/build/template/components/FieldListSection.js.map +1 -1
- package/build/template/components/MissingSchema.d.ts +2 -1
- package/build/template/components/MissingSchema.d.ts.map +1 -1
- package/build/template/components/MissingSchema.js.map +1 -1
- package/build/template/components/ReferenceLink.d.ts +9 -11
- package/build/template/components/ReferenceLink.d.ts.map +1 -1
- package/build/template/components/ReferenceLink.js.map +1 -1
- package/build/template/components/ToastContainer.d.ts +3 -0
- package/build/template/components/ToastContainer.d.ts.map +1 -0
- package/build/template/components/ToastContainer.js +44 -0
- package/build/template/components/ToastContainer.js.map +1 -0
- package/build/template/components/ToastItem.d.ts +7 -0
- package/build/template/components/ToastItem.d.ts.map +1 -0
- package/build/template/components/ToastItem.js +48 -0
- package/build/template/components/ToastItem.js.map +1 -0
- package/build/template/components/TypeAnnotation.d.ts +4 -5
- package/build/template/components/TypeAnnotation.d.ts.map +1 -1
- package/build/template/components/TypeAnnotation.js.map +1 -1
- package/build/template/components/VersionPicker.d.ts +8 -0
- package/build/template/components/VersionPicker.d.ts.map +1 -0
- package/build/template/components/VersionPicker.js +66 -0
- package/build/template/components/VersionPicker.js.map +1 -0
- package/build/template/hooks/useReferencePath.d.ts +9 -0
- package/build/template/hooks/useReferencePath.d.ts.map +1 -0
- package/build/template/hooks/useReferencePath.js +18 -0
- package/build/template/hooks/useReferencePath.js.map +1 -0
- package/build/template/routes/reference.d.ts +24 -8
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +47 -53
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/root.d.ts +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +16 -5
- package/build/template/routes/root.js.map +1 -1
- package/build/template/stores/$$.d.ts +13 -0
- package/build/template/stores/$$.d.ts.map +1 -0
- package/build/template/stores/$$.js +5 -0
- package/build/template/stores/$$.js.map +1 -0
- package/build/template/stores/$.d.ts +2 -0
- package/build/template/stores/$.d.ts.map +1 -0
- package/build/template/stores/$.js +2 -0
- package/build/template/stores/$.js.map +1 -0
- package/build/template/stores/schema.d.ts +40 -0
- package/build/template/stores/schema.d.ts.map +1 -0
- package/build/template/stores/schema.js +36 -0
- package/build/template/stores/schema.js.map +1 -0
- package/build/template/stores/toast.d.ts +103 -0
- package/build/template/stores/toast.d.ts.map +1 -0
- package/build/template/stores/toast.js +105 -0
- package/build/template/stores/toast.js.map +1 -0
- package/build/template/utils/try-with-toast.d.ts +9 -0
- package/build/template/utils/try-with-toast.d.ts.map +1 -0
- package/build/template/utils/try-with-toast.js +37 -0
- package/build/template/utils/try-with-toast.js.map +1 -0
- package/package.json +2 -1
- package/src/api/iso/schema/$$.ts +1 -0
- package/src/api/iso/schema/routing.ts +89 -0
- package/src/api/iso/schema/validation.ts +136 -0
- package/src/template/components/ArgumentList.tsx +2 -6
- package/src/template/components/Changelog.tsx +2 -2
- package/src/template/components/DeprecationReason.tsx +2 -2
- package/src/template/components/Description.tsx +2 -2
- package/src/template/components/Field.tsx +2 -6
- package/src/template/components/FieldListSection.tsx +2 -6
- package/src/template/components/MissingSchema.tsx +3 -1
- package/src/template/components/ReferenceLink.tsx +9 -11
- package/src/template/components/ToastContainer.tsx +67 -0
- package/src/template/components/ToastItem.tsx +119 -0
- package/src/template/components/TypeAnnotation.tsx +2 -6
- package/src/template/components/VersionPicker.tsx +94 -0
- package/src/template/hooks/useReferencePath.ts +20 -0
- package/src/template/routes/reference.tsx +49 -63
- package/src/template/routes/root.tsx +29 -6
- package/src/template/stores/$$.ts +15 -0
- package/src/template/stores/$.ts +1 -0
- package/src/template/stores/schema.ts +52 -0
- package/src/template/stores/toast.ts +153 -0
- package/src/template/utils/try-with-toast.ts +41 -0
- package/build/template/components/VersionSelector.d.ts +0 -8
- package/build/template/components/VersionSelector.d.ts.map +0 -1
- package/build/template/components/VersionSelector.js +0 -22
- package/build/template/components/VersionSelector.js.map +0 -1
- package/src/template/components/VersionSelector.tsx +0 -42
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/template/stores/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAG5C;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAA;IACtB,oCAAoC;IACpC,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,+CAA+C;IAC/C,aAAa,EAAE,aAAa,GAAG,IAAI,CAAA;CACpC;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,KAAK;IAGhB;;OAEG;;IAKH;;;OAGG;cACO,KAAK;IArCf,wCAAwC;oBACxB,MAAM;IACtB,oCAAoC;uBACjB,MAAM,EAAE;IAC3B,+CAA+C;mBAChC,aAAa,GAAG,IAAI;CAuCnC,CAAA"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { proxy, ref } from 'valtio';
|
2
|
+
/**
|
3
|
+
* Initial state for the schema store
|
4
|
+
*/
|
5
|
+
export const initialState = {
|
6
|
+
currentVersion: 'latest',
|
7
|
+
availableVersions: [],
|
8
|
+
currentSchema: null,
|
9
|
+
};
|
10
|
+
/**
|
11
|
+
* Schema store
|
12
|
+
*
|
13
|
+
* Manages GraphQL schema state including version selection and schema instances.
|
14
|
+
* Used for version switching and schema-aware navigation.
|
15
|
+
*/
|
16
|
+
export const store = proxy({
|
17
|
+
...initialState,
|
18
|
+
/**
|
19
|
+
* Reset store to initial state
|
20
|
+
*/
|
21
|
+
reset() {
|
22
|
+
Object.assign(store, initialState);
|
23
|
+
},
|
24
|
+
/**
|
25
|
+
* Set store state
|
26
|
+
* @param data - New state data
|
27
|
+
*/
|
28
|
+
set(data) {
|
29
|
+
// Set each property individually to avoid issues with complex objects
|
30
|
+
store.currentVersion = data.currentVersion;
|
31
|
+
store.availableVersions = data.availableVersions;
|
32
|
+
// Use ref() to prevent Valtio from deeply proxying the GraphQL schema
|
33
|
+
store.currentSchema = data.currentSchema ? ref(data.currentSchema) : null;
|
34
|
+
},
|
35
|
+
});
|
36
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/template/stores/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAcnC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,cAAc,EAAE,QAAQ;IACxB,iBAAiB,EAAE,EAAE;IACrB,aAAa,EAAE,IAAI;CACpB,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC;IACzB,GAAG,YAAY;IAEf;;OAEG;IACH,KAAK;QACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;IACpC,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,IAAW;QACb,sEAAsE;QACtE,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;QAC1C,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAA;QAChD,sEAAsE;QACtE,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAC3E,CAAC;CACF,CAAC,CAAA"}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
/**
|
2
|
+
* Toast notification types
|
3
|
+
*/
|
4
|
+
export declare const Type: {
|
5
|
+
readonly info: "info";
|
6
|
+
readonly success: "success";
|
7
|
+
readonly warning: "warning";
|
8
|
+
readonly error: "error";
|
9
|
+
};
|
10
|
+
export type Type = typeof Type[keyof typeof Type];
|
11
|
+
/**
|
12
|
+
* Toast notification interface
|
13
|
+
*/
|
14
|
+
export interface Toast {
|
15
|
+
/** Unique identifier for the toast */
|
16
|
+
id: string;
|
17
|
+
/** Primary message text */
|
18
|
+
message: string;
|
19
|
+
/** Optional secondary description text */
|
20
|
+
description?: string;
|
21
|
+
/** Visual type/variant of the toast */
|
22
|
+
type?: Type;
|
23
|
+
/** Duration in milliseconds before auto-dismiss. Set to 0 to disable auto-dismiss */
|
24
|
+
duration?: number;
|
25
|
+
/** Optional action buttons configuration */
|
26
|
+
actions: {
|
27
|
+
/** Action button label */
|
28
|
+
label: string;
|
29
|
+
/** Action button click handler */
|
30
|
+
onClick: () => void;
|
31
|
+
}[];
|
32
|
+
}
|
33
|
+
/**
|
34
|
+
* Toast store state interface
|
35
|
+
*/
|
36
|
+
export interface State {
|
37
|
+
/** Array of active toast notifications */
|
38
|
+
toasts: Toast[];
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* Initial state for the toast store
|
42
|
+
*/
|
43
|
+
export declare const initialState: State;
|
44
|
+
/**
|
45
|
+
* Toast notification store
|
46
|
+
*
|
47
|
+
* Manages toast notifications with auto-dismiss functionality and type-specific convenience methods.
|
48
|
+
*/
|
49
|
+
export declare const store: {
|
50
|
+
/**
|
51
|
+
* Add a new toast notification
|
52
|
+
* @param toast - Toast configuration (id will be auto-generated)
|
53
|
+
* @returns Generated toast ID
|
54
|
+
*/
|
55
|
+
add(toast: Omit<Toast, "id">): string;
|
56
|
+
/**
|
57
|
+
* Remove a toast by ID
|
58
|
+
* @param id - Toast ID to remove
|
59
|
+
*/
|
60
|
+
remove(id: string): void;
|
61
|
+
/**
|
62
|
+
* Reset store to initial state
|
63
|
+
*/
|
64
|
+
reset(): void;
|
65
|
+
/**
|
66
|
+
* Set store state
|
67
|
+
* @param data - New state data
|
68
|
+
*/
|
69
|
+
set(data: State): void;
|
70
|
+
/**
|
71
|
+
* Show an info toast
|
72
|
+
* @param message - Toast message
|
73
|
+
* @param options - Additional toast options
|
74
|
+
* @returns Generated toast ID
|
75
|
+
*/
|
76
|
+
info(message: string, options?: InputOptions): string;
|
77
|
+
/**
|
78
|
+
* Show a success toast
|
79
|
+
* @param message - Toast message
|
80
|
+
* @param options - Additional toast options
|
81
|
+
* @returns Generated toast ID
|
82
|
+
*/
|
83
|
+
success(message: string, options?: InputOptions): string;
|
84
|
+
/**
|
85
|
+
* Show a warning toast
|
86
|
+
* @param message - Toast message
|
87
|
+
* @param options - Additional toast options
|
88
|
+
* @returns Generated toast ID
|
89
|
+
*/
|
90
|
+
warning(message: string, options?: InputOptions): string;
|
91
|
+
/**
|
92
|
+
* Show an error toast
|
93
|
+
* @param message - Toast message
|
94
|
+
* @param options - Additional toast options
|
95
|
+
* @returns Generated toast ID
|
96
|
+
*/
|
97
|
+
error(message: string, options?: InputOptions): string;
|
98
|
+
/** Array of active toast notifications */
|
99
|
+
toasts: Toast[];
|
100
|
+
};
|
101
|
+
type InputOptions = Partial<Omit<Toast, 'id' | 'message' | 'type'>>;
|
102
|
+
export {};
|
103
|
+
//# sourceMappingURL=toast.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/template/stores/toast.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,IAAI;;;;;CAKP,CAAA;AAEV,MAAM,MAAM,IAAI,GAAG,OAAO,IAAI,CAAC,MAAM,OAAO,IAAI,CAAC,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uCAAuC;IACvC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,OAAO,EAAE;QACP,0BAA0B;QAC1B,KAAK,EAAE,MAAM,CAAA;QACb,kCAAkC;QAClC,OAAO,EAAE,MAAM,IAAI,CAAA;KACpB,EAAE,CAAA;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,0CAA0C;IAC1C,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAA;AAUD;;;;GAIG;AACH,eAAO,MAAM,KAAK;IAGhB;;;;OAIG;eACQ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,MAAM;IAYrC;;;OAGG;eACQ,MAAM,GAAG,IAAI;IAOxB;;OAEG;;IAKH;;;OAGG;cACO,KAAK;IAIf;;;;;OAKG;kBACW,MAAM,YAAY,YAAY;IAI5C;;;;;OAKG;qBACc,MAAM,YAAY,YAAY;IAI/C;;;;;OAKG;qBACc,MAAM,YAAY,YAAY;IAI/C;;;;;OAKG;mBACY,MAAM,YAAY,YAAY;IA1G7C,0CAA0C;YAClC,KAAK,EAAE;CA4Gf,CAAA;AAEF,KAAK,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { proxy } from 'valtio';
|
2
|
+
/**
|
3
|
+
* Toast notification types
|
4
|
+
*/
|
5
|
+
export const Type = {
|
6
|
+
info: 'info',
|
7
|
+
success: 'success',
|
8
|
+
warning: 'warning',
|
9
|
+
error: 'error',
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
* Initial state for the toast store
|
13
|
+
*/
|
14
|
+
export const initialState = {
|
15
|
+
toasts: [],
|
16
|
+
};
|
17
|
+
/**
|
18
|
+
* Default values for toast properties
|
19
|
+
*/
|
20
|
+
const toastDefaults = {
|
21
|
+
duration: 5000,
|
22
|
+
actions: [],
|
23
|
+
};
|
24
|
+
/**
|
25
|
+
* Toast notification store
|
26
|
+
*
|
27
|
+
* Manages toast notifications with auto-dismiss functionality and type-specific convenience methods.
|
28
|
+
*/
|
29
|
+
export const store = proxy({
|
30
|
+
...initialState,
|
31
|
+
/**
|
32
|
+
* Add a new toast notification
|
33
|
+
* @param toast - Toast configuration (id will be auto-generated)
|
34
|
+
* @returns Generated toast ID
|
35
|
+
*/
|
36
|
+
add(toast) {
|
37
|
+
const id = `${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
38
|
+
store.toasts.push({ ...toast, id });
|
39
|
+
// Auto-remove after duration (default 5 seconds). Set duration to 0 to disable auto-dismiss
|
40
|
+
if (toast.duration !== 0) {
|
41
|
+
setTimeout(() => store.remove(id), toast.duration || toastDefaults.duration);
|
42
|
+
}
|
43
|
+
return id;
|
44
|
+
},
|
45
|
+
/**
|
46
|
+
* Remove a toast by ID
|
47
|
+
* @param id - Toast ID to remove
|
48
|
+
*/
|
49
|
+
remove(id) {
|
50
|
+
const index = store.toasts.findIndex(t => t.id === id);
|
51
|
+
if (index > -1) {
|
52
|
+
store.toasts.splice(index, 1);
|
53
|
+
}
|
54
|
+
},
|
55
|
+
/**
|
56
|
+
* Reset store to initial state
|
57
|
+
*/
|
58
|
+
reset() {
|
59
|
+
Object.assign(store, initialState);
|
60
|
+
},
|
61
|
+
/**
|
62
|
+
* Set store state
|
63
|
+
* @param data - New state data
|
64
|
+
*/
|
65
|
+
set(data) {
|
66
|
+
Object.assign(store, data);
|
67
|
+
},
|
68
|
+
/**
|
69
|
+
* Show an info toast
|
70
|
+
* @param message - Toast message
|
71
|
+
* @param options - Additional toast options
|
72
|
+
* @returns Generated toast ID
|
73
|
+
*/
|
74
|
+
info(message, options) {
|
75
|
+
return store.add({ ...toastDefaults, ...options, message, type: Type.info });
|
76
|
+
},
|
77
|
+
/**
|
78
|
+
* Show a success toast
|
79
|
+
* @param message - Toast message
|
80
|
+
* @param options - Additional toast options
|
81
|
+
* @returns Generated toast ID
|
82
|
+
*/
|
83
|
+
success(message, options) {
|
84
|
+
return store.add({ ...toastDefaults, ...options, message, type: Type.success });
|
85
|
+
},
|
86
|
+
/**
|
87
|
+
* Show a warning toast
|
88
|
+
* @param message - Toast message
|
89
|
+
* @param options - Additional toast options
|
90
|
+
* @returns Generated toast ID
|
91
|
+
*/
|
92
|
+
warning(message, options) {
|
93
|
+
return store.add({ ...toastDefaults, ...options, message, type: Type.warning });
|
94
|
+
},
|
95
|
+
/**
|
96
|
+
* Show an error toast
|
97
|
+
* @param message - Toast message
|
98
|
+
* @param options - Additional toast options
|
99
|
+
* @returns Generated toast ID
|
100
|
+
*/
|
101
|
+
error(message, options) {
|
102
|
+
return store.add({ ...toastDefaults, ...options, message, type: Type.error });
|
103
|
+
},
|
104
|
+
});
|
105
|
+
//# sourceMappingURL=toast.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/template/stores/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACN,CAAA;AAmCV;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,MAAM,EAAE,EAAE;CACX,CAAA;AAED;;GAEG;AACH,MAAM,aAAa,GAAG;IACpB,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE;CACa,CAAA;AAE1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC;IACzB,GAAG,YAAY;IAEf;;;;OAIG;IACH,GAAG,CAAC,KAAwB;QAC1B,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAA;QACzE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAAA;QAEnC,4FAA4F;QAC5F,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACzB,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,QAAQ,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAA;QAC9E,CAAC;QAED,OAAO,EAAE,CAAA;IACX,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU;QACf,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;QACtD,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;YACf,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;IACpC,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,IAAW;QACb,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAC5B,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,OAAe,EAAE,OAAsB;QAC1C,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9E,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,OAAe,EAAE,OAAsB;QAC7C,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IACjF,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,OAAe,EAAE,OAAsB;QAC7C,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IACjF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAe,EAAE,OAAsB;QAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;IAC/E,CAAC;CACF,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Execute an async function with automatic error handling and toast notifications
|
3
|
+
*
|
4
|
+
* @param fn - Async function to execute
|
5
|
+
* @param errorMessage - Optional custom error message for the toast (defaults to error message)
|
6
|
+
* @returns Promise that resolves to null on success or Error on failure
|
7
|
+
*/
|
8
|
+
export declare const tryWithToast: <T>(fn: () => Promise<T>, errorMessage?: string) => Promise<Error | null>;
|
9
|
+
//# sourceMappingURL=try-with-toast.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"try-with-toast.d.ts","sourceRoot":"","sources":["../../../src/template/utils/try-with-toast.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAU,CAAC,EAClC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,eAAe,MAAM,KACpB,OAAO,CAAC,KAAK,GAAG,IAAI,CA4BtB,CAAA"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { Stores } from '../stores/$.js';
|
2
|
+
/**
|
3
|
+
* Execute an async function with automatic error handling and toast notifications
|
4
|
+
*
|
5
|
+
* @param fn - Async function to execute
|
6
|
+
* @param errorMessage - Optional custom error message for the toast (defaults to error message)
|
7
|
+
* @returns Promise that resolves to null on success or Error on failure
|
8
|
+
*/
|
9
|
+
export const tryWithToast = async (fn, errorMessage) => {
|
10
|
+
try {
|
11
|
+
await fn();
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
catch (error) {
|
15
|
+
// Log to console in all environments
|
16
|
+
console.error('Error in tryWithToast:', error);
|
17
|
+
// Determine the error message
|
18
|
+
const baseMessage = error instanceof Error ? error.message : String(error);
|
19
|
+
const toastMessage = errorMessage || baseMessage;
|
20
|
+
// In development, show detailed error info
|
21
|
+
if (import.meta.env.DEV) {
|
22
|
+
Stores.Toast.store.error(toastMessage, {
|
23
|
+
description: error instanceof Error
|
24
|
+
? `${error.name}: ${error.message}${error.stack ? '\n\nStack trace available in console.' : ''}`
|
25
|
+
: `Error details: ${String(error)}`,
|
26
|
+
duration: 10000, // Longer duration in dev for debugging
|
27
|
+
});
|
28
|
+
}
|
29
|
+
else {
|
30
|
+
// In production, show simplified message
|
31
|
+
Stores.Toast.store.error(toastMessage);
|
32
|
+
}
|
33
|
+
// Return the error for downstream fallback logic
|
34
|
+
return error instanceof Error ? error : new Error(baseMessage);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
//# sourceMappingURL=try-with-toast.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"try-with-toast.js","sourceRoot":"","sources":["../../../src/template/utils/try-with-toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,EAAoB,EACpB,YAAqB,EACE,EAAE;IACzB,IAAI,CAAC;QACH,MAAM,EAAE,EAAE,CAAA;QACV,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,qCAAqC;QACrC,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAA;QAE9C,8BAA8B;QAC9B,MAAM,WAAW,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC1E,MAAM,YAAY,GAAG,YAAY,IAAI,WAAW,CAAA;QAEhD,2CAA2C;QAC3C,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;YACxB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE;gBACrC,WAAW,EAAE,KAAK,YAAY,KAAK;oBACjC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC,EAAE,EAAE;oBAChG,CAAC,CAAC,kBAAkB,MAAM,CAAC,KAAK,CAAC,EAAE;gBACrC,QAAQ,EAAE,KAAK,EAAE,uCAAuC;aACzD,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,yCAAyC;YACzC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;QACxC,CAAC;QAED,iDAAiD;QACjD,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,CAAA;IAChE,CAAC;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "polen",
|
3
|
-
"version": "0.11.0-next.
|
3
|
+
"version": "0.11.0-next.12",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A framework for delightful GraphQL developer portals",
|
6
6
|
"author": {
|
@@ -138,6 +138,7 @@
|
|
138
138
|
"tsx": "^4.20.3",
|
139
139
|
"typescript": "^5.8.3",
|
140
140
|
"unified": "^11.0.5",
|
141
|
+
"valtio": "^2.1.5",
|
141
142
|
"vfile": "^6.0.3",
|
142
143
|
"vite": "npm:rolldown-vite@^7.0.9",
|
143
144
|
"vite-plugin-inspect": "^11.3.0",
|
package/src/api/iso/schema/$$.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export * from './constants.js'
|
2
2
|
export * as Routing from './routing.js'
|
3
|
+
export * as Validation from './validation.js'
|
3
4
|
|
4
5
|
// Re-export types from server layer that are needed in template
|
5
6
|
export type { ChangelogData, ChangeSets, NonEmptyChangeSets } from '../../schema/schema.js'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Grafaid } from '#lib/grafaid/index'
|
1
2
|
import { VERSION_LATEST } from './constants.js'
|
2
3
|
|
3
4
|
export interface ReferencePathParts {
|
@@ -6,6 +7,11 @@ export interface ReferencePathParts {
|
|
6
7
|
field?: string
|
7
8
|
}
|
8
9
|
|
10
|
+
interface RouteCheck {
|
11
|
+
pathname: string
|
12
|
+
params: Record<string, string | undefined>
|
13
|
+
}
|
14
|
+
|
9
15
|
export const createReferencePath = (parts: ReferencePathParts): string => {
|
10
16
|
const basePath = createReferenceBasePath(parts.version)
|
11
17
|
return joinSegmentsAndPaths(basePath, parts.type, parts.field)
|
@@ -51,3 +57,86 @@ export const joinSegmentsAndPaths = (
|
|
51
57
|
|
52
58
|
return path
|
53
59
|
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Check if the current route is a reference route
|
63
|
+
* @param route - Route information containing pathname and params
|
64
|
+
* @returns True if on a reference route
|
65
|
+
*/
|
66
|
+
export const isReferenceRoute = (route: RouteCheck): boolean => {
|
67
|
+
return route.params[`type`] !== undefined
|
68
|
+
|| route.params[`field`] !== undefined
|
69
|
+
|| route.params[`argument`] !== undefined
|
70
|
+
|| route.pathname.includes(`/${segmentLiterals.reference}`)
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Assert that the current route is a reference route
|
75
|
+
* @param route - Route information containing pathname and params
|
76
|
+
* @throws {Error} If not on a reference route
|
77
|
+
*/
|
78
|
+
export const assertReferenceRoute = (route: RouteCheck): void => {
|
79
|
+
if (!isReferenceRoute(route)) {
|
80
|
+
throw new Error('Not on a reference route. This function can only be used on reference routes.')
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* View type for reference routes
|
86
|
+
*/
|
87
|
+
export type ReferenceViewType =
|
88
|
+
| 'index' // No type selected
|
89
|
+
| 'type' // Type selected, no field
|
90
|
+
| 'field' // Type and field selected
|
91
|
+
| 'type-missing' // Type not found in schema
|
92
|
+
| 'field-missing' // Field not found on type
|
93
|
+
|
94
|
+
export interface ReferenceViewParams {
|
95
|
+
schema: import('graphql').GraphQLSchema
|
96
|
+
type?: string
|
97
|
+
field?: string
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Determine the view type for a reference route based on params and schema
|
102
|
+
*/
|
103
|
+
export const getReferenceViewType = (params: ReferenceViewParams): ReferenceViewType => {
|
104
|
+
const { schema, type: typeName, field: fieldName } = params
|
105
|
+
|
106
|
+
// No type selected - show index
|
107
|
+
if (!typeName) {
|
108
|
+
return 'index'
|
109
|
+
}
|
110
|
+
|
111
|
+
// Check if type exists
|
112
|
+
const type = schema.getType(typeName)
|
113
|
+
if (!type) {
|
114
|
+
return 'type-missing'
|
115
|
+
}
|
116
|
+
|
117
|
+
// No field selected - show type
|
118
|
+
if (!fieldName) {
|
119
|
+
return 'type'
|
120
|
+
}
|
121
|
+
|
122
|
+
// Check if type has fields
|
123
|
+
if (!Grafaid.Schema.TypesLike.isFielded(type)) {
|
124
|
+
return 'field-missing'
|
125
|
+
}
|
126
|
+
|
127
|
+
// Check if field exists
|
128
|
+
const fields = type.getFields()
|
129
|
+
if (!fields[fieldName]) {
|
130
|
+
return 'field-missing'
|
131
|
+
}
|
132
|
+
|
133
|
+
// Field exists - show field
|
134
|
+
return 'field'
|
135
|
+
}
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Type guard to check if view type indicates missing content
|
139
|
+
*/
|
140
|
+
export const isMissingView = (viewType: ReferenceViewType): viewType is 'type-missing' | 'field-missing' => {
|
141
|
+
return viewType === 'type-missing' || viewType === 'field-missing'
|
142
|
+
}
|
@@ -0,0 +1,136 @@
|
|
1
|
+
import { Grafaid } from '#lib/grafaid/index'
|
2
|
+
import type { GraphQLFieldMap, GraphQLSchema } from 'graphql'
|
3
|
+
|
4
|
+
export interface PathValidation {
|
5
|
+
version?: string
|
6
|
+
type?: string
|
7
|
+
field?: string
|
8
|
+
argument?: string
|
9
|
+
}
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Check if a reference path exists in the given schema
|
13
|
+
*/
|
14
|
+
export const doesPathExist = (schema: GraphQLSchema, path: PathValidation): boolean => {
|
15
|
+
if (!path.type) return true
|
16
|
+
|
17
|
+
const type = schema.getType(path.type)
|
18
|
+
if (!type) return false
|
19
|
+
|
20
|
+
if (!path.field) return true
|
21
|
+
|
22
|
+
if (!Grafaid.Schema.TypesLike.isFielded(type)) return false
|
23
|
+
|
24
|
+
const fields = type.getFields() as GraphQLFieldMap<unknown, unknown>
|
25
|
+
const field = fields[path.field]
|
26
|
+
if (!field) return false
|
27
|
+
|
28
|
+
if (!path.argument) return true
|
29
|
+
|
30
|
+
// Check if argument exists
|
31
|
+
const arg = field.args.find(a => a.name === path.argument)
|
32
|
+
return !!arg
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Find the best fallback path when the current path doesn't exist
|
37
|
+
*/
|
38
|
+
export const findFallbackPath = (
|
39
|
+
schema: GraphQLSchema,
|
40
|
+
currentPath: PathValidation,
|
41
|
+
): PathValidation => {
|
42
|
+
// If no type specified, return empty path
|
43
|
+
if (!currentPath.type) {
|
44
|
+
return { type: `Query` }
|
45
|
+
}
|
46
|
+
|
47
|
+
// Check if current path exists
|
48
|
+
if (doesPathExist(schema, currentPath)) {
|
49
|
+
return currentPath
|
50
|
+
}
|
51
|
+
|
52
|
+
// If viewing an argument that doesn't exist, fall back to parent field
|
53
|
+
if (currentPath.argument && currentPath.field) {
|
54
|
+
const fieldPath = { type: currentPath.type, field: currentPath.field }
|
55
|
+
if (doesPathExist(schema, fieldPath)) {
|
56
|
+
return fieldPath
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// If viewing a field that doesn't exist, fall back to parent type
|
61
|
+
if (currentPath.field) {
|
62
|
+
const typePath = { type: currentPath.type }
|
63
|
+
if (doesPathExist(schema, typePath)) {
|
64
|
+
return typePath
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// If viewing a type that doesn't exist, fall back to Query type
|
69
|
+
return { type: `Query` }
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Get all available types in a schema
|
74
|
+
*/
|
75
|
+
export const getAvailableTypes = (schema: GraphQLSchema): string[] => {
|
76
|
+
const typeMap = schema.getTypeMap()
|
77
|
+
return Object.keys(typeMap).filter(name => !name.startsWith(`__`))
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Get all available fields for a type
|
82
|
+
*/
|
83
|
+
export const getAvailableFields = (schema: GraphQLSchema, typeName: string): string[] => {
|
84
|
+
const type = schema.getType(typeName)
|
85
|
+
if (!type || !Grafaid.Schema.TypesLike.isFielded(type)) {
|
86
|
+
return []
|
87
|
+
}
|
88
|
+
|
89
|
+
const fields = type.getFields() as GraphQLFieldMap<unknown, unknown>
|
90
|
+
return Object.keys(fields)
|
91
|
+
}
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Check if a path would require a redirect when switching to a new schema version
|
95
|
+
*/
|
96
|
+
export const wouldRequireRedirect = (
|
97
|
+
currentSchema: GraphQLSchema,
|
98
|
+
targetSchema: GraphQLSchema,
|
99
|
+
currentPath: PathValidation,
|
100
|
+
): boolean => {
|
101
|
+
const existsInCurrent = doesPathExist(currentSchema, currentPath)
|
102
|
+
const existsInTarget = doesPathExist(targetSchema, currentPath)
|
103
|
+
|
104
|
+
return existsInCurrent && !existsInTarget
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Get a human-readable description of what will happen when switching versions
|
109
|
+
*/
|
110
|
+
export const getRedirectDescription = (
|
111
|
+
targetSchema: GraphQLSchema,
|
112
|
+
currentPath: PathValidation,
|
113
|
+
fallbackPath: PathValidation,
|
114
|
+
targetVersion?: string,
|
115
|
+
): string | null => {
|
116
|
+
if (!currentPath.type) return null
|
117
|
+
|
118
|
+
const currentExists = doesPathExist(targetSchema, currentPath)
|
119
|
+
if (currentExists) return null
|
120
|
+
|
121
|
+
const versionInfo = targetVersion ? ` in version ${targetVersion}` : ` in this version`
|
122
|
+
|
123
|
+
if (currentPath.argument && fallbackPath.field) {
|
124
|
+
return `Argument "${currentPath.argument}" doesn't exist${versionInfo}. Redirecting to field "${fallbackPath.field}".`
|
125
|
+
}
|
126
|
+
|
127
|
+
if (currentPath.field && fallbackPath.type && !fallbackPath.field) {
|
128
|
+
return `Field "${currentPath.field}" doesn't exist${versionInfo}. Redirecting to type "${fallbackPath.type}".`
|
129
|
+
}
|
130
|
+
|
131
|
+
if (currentPath.type !== fallbackPath.type) {
|
132
|
+
return `Type "${currentPath.type}" doesn't exist${versionInfo}. Redirecting to type "${fallbackPath.type}".`
|
133
|
+
}
|
134
|
+
|
135
|
+
return `This path doesn't exist${versionInfo}. Redirecting to a valid location.`
|
136
|
+
}
|
@@ -1,13 +1,9 @@
|
|
1
|
+
import type { React } from '#dep/react/index'
|
1
2
|
import { Box, Flex, Heading, Text } from '@radix-ui/themes'
|
2
3
|
import type { GraphQLArgument } from 'graphql'
|
3
|
-
import type { FC } from 'react'
|
4
4
|
import { TypeAnnotation } from './TypeAnnotation.js'
|
5
5
|
|
6
|
-
export
|
7
|
-
args: readonly GraphQLArgument[]
|
8
|
-
}
|
9
|
-
|
10
|
-
export const ArgumentsList: FC<Props> = ({ args }) => {
|
6
|
+
export const ArgumentsList: React.FC<{ args: readonly GraphQLArgument[] }> = ({ args }) => {
|
11
7
|
if (args.length === 0) return null
|
12
8
|
|
13
9
|
return (
|
@@ -61,11 +61,11 @@ const Changeset: React.FC<{ changeset: GraphqlChangeset.ChangeSet }> = ({ change
|
|
61
61
|
</h1>
|
62
62
|
{groupedChanges.map(group => (
|
63
63
|
<CriticalitySection key={group.level} level={group.level} changes={group.changes}>
|
64
|
-
{group.changes.map(change => {
|
64
|
+
{group.changes.map((change, index) => {
|
65
65
|
const type = GraphqlChange.Group.getType(change)
|
66
66
|
return (
|
67
67
|
<ComponentDispatch
|
68
|
-
key={`${change.type}-${change.path || change.message}`}
|
68
|
+
key={`${change.type}-${change.path || change.message}-${index}`}
|
69
69
|
components={Group}
|
70
70
|
name={type}
|
71
71
|
props={{ change }}
|
@@ -1,9 +1,9 @@
|
|
1
|
+
import type { React } from '#dep/react/index'
|
1
2
|
import type { GrafaidOld } from '#lib/grafaid-old/index'
|
2
3
|
import { Text } from '@radix-ui/themes'
|
3
|
-
import type { FC } from 'react'
|
4
4
|
import { Markdown } from './Markdown.js'
|
5
5
|
|
6
|
-
export const DeprecationReason: FC<{ data: GrafaidOld.GraphQLField }> = ({ data }) => {
|
6
|
+
export const DeprecationReason: React.FC<{ data: GrafaidOld.GraphQLField }> = ({ data }) => {
|
7
7
|
if (!data.deprecationReason) return null
|
8
8
|
|
9
9
|
return (
|
@@ -1,11 +1,11 @@
|
|
1
|
+
import type { React } from '#dep/react/index'
|
1
2
|
import { Text } from '@radix-ui/themes'
|
2
|
-
import type { FC } from 'react'
|
3
3
|
import { Markdown } from './Markdown.js'
|
4
4
|
// import type { Grafaid } from '#lib/grafaid'
|
5
5
|
import type { GrafaidOld } from '#lib/grafaid-old/index'
|
6
6
|
import type { GraphQLNamedType } from 'graphql'
|
7
7
|
|
8
|
-
export const Description: FC<{ data: GraphQLNamedType | GrafaidOld.GraphQLField }> = ({ data }) => {
|
8
|
+
export const Description: React.FC<{ data: GraphQLNamedType | GrafaidOld.GraphQLField }> = ({ data }) => {
|
9
9
|
if (!data.description) return null
|
10
10
|
|
11
11
|
return (
|
@@ -1,17 +1,13 @@
|
|
1
|
+
import type { React } from '#dep/react/index'
|
1
2
|
import { GrafaidOld } from '#lib/grafaid-old/index'
|
2
3
|
import type { BoxProps } from '@radix-ui/themes'
|
3
4
|
import { Box, Text } from '@radix-ui/themes'
|
4
|
-
import type { FC } from 'react'
|
5
5
|
import { ArgumentListAnnotation } from './ArgumentListAnnotation.js'
|
6
6
|
import { DeprecationReason } from './DeprecationReason.js'
|
7
7
|
import { Description } from './Description.js'
|
8
8
|
import { TypeAnnotation } from './TypeAnnotation.js'
|
9
9
|
|
10
|
-
export
|
11
|
-
data: GrafaidOld.GraphQLField
|
12
|
-
}
|
13
|
-
|
14
|
-
export const Field: FC<Props> = ({ data, ...boxProps }) => {
|
10
|
+
export const Field: React.FC<BoxProps & { data: GrafaidOld.GraphQLField }> = ({ data, ...boxProps }) => {
|
15
11
|
const argumentList = GrafaidOld.isOutputField(data)
|
16
12
|
? <ArgumentListAnnotation field={data} />
|
17
13
|
: null
|