-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.js
124 lines (121 loc) · 5.19 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import Checkout from "./types/checkout";
import MailingAddress from "./types/mailing-address";
import PaginatedScalarEdge from "./types/paginated-scalar-edge";
import PaginatedScalarConnection from "./types/paginated-scalar-connection";
import ArbitraryViewer from "./types/arbitrary-viewer";
import ArbitraryNode from "./types/arbitrary-node";
import ArbitraryHost from "./types/arbitrary-host";
import QueryRoot from "./types/query-root";
import Node from "./types/node";
import Mutation from "./types/mutation";
import ApiCustomerAccessToken from "./types/api-customer-access-token";
import ApiCustomerAccessTokenCreateInput from "./types/api-customer-access-token-create-input";
import ApiCustomerAccessTokenCreatePayload from "./types/api-customer-access-token-create-payload";
import ID from "./types/id";
import Shop from "./types/shop";
import Address from "./types/address";
import String from "./types/string";
import Float from "./types/float";
import Boolean from "./types/boolean";
import CurrencyCode from "./types/currency-code";
import Domain from "./types/domain";
import CollectionConnection from "./types/collection-connection";
import PageInfo from "./types/page-info";
import CollectionEdge from "./types/collection-edge";
import Collection from "./types/collection";
import DateTime from "./types/date-time";
import ProductConnection from "./types/product-connection";
import ProductEdge from "./types/product-edge";
import Product from "./types/product";
import Int from "./types/int";
import ImageConnection from "./types/image-connection";
import ImageEdge from "./types/image-edge";
import Image from "./types/image";
import URL from "./types/url";
import CropRegion from "./types/crop-region";
import ProductOption from "./types/product-option";
import ProductVariantConnection from "./types/product-variant-connection";
import ProductVariantEdge from "./types/product-variant-edge";
import ProductVariant from "./types/product-variant";
import WeightUnit from "./types/weight-unit";
import Money from "./types/money";
import SelectedOption from "./types/selected-option";
import CollectionSortKeys from "./types/collection-sort-keys";
import ProductSortKeys from "./types/product-sort-keys";
import __Schema from "./types/schema";
import __Type from "./types/type";
import __TypeKind from "./types/type-kind";
import __Field from "./types/field";
import __InputValue from "./types/input-value";
import __EnumValue from "./types/enum-value";
import __Directive from "./types/directive";
import __DirectiveLocation from "./types/directive-location";
const Types = {
types: {}
};
Types.types["Checkout"] = Checkout;
Types.types["MailingAddress"] = MailingAddress;
Types.types["PaginatedScalarEdge"] = PaginatedScalarEdge;
Types.types["PaginatedScalarConnection"] = PaginatedScalarConnection;
Types.types["ArbitraryViewer"] = ArbitraryViewer;
Types.types["ArbitraryNode"] = ArbitraryNode;
Types.types["ArbitraryHost"] = ArbitraryHost;
Types.types["QueryRoot"] = QueryRoot;
Types.types["Node"] = Node;
Types.types["Mutation"] = Mutation;
Types.types["ApiCustomerAccessToken"] = ApiCustomerAccessToken;
Types.types["ApiCustomerAccessTokenCreateInput"] = ApiCustomerAccessTokenCreateInput;
Types.types["ApiCustomerAccessTokenCreatePayload"] = ApiCustomerAccessTokenCreatePayload;
Types.types["ID"] = ID;
Types.types["Shop"] = Shop;
Types.types["Address"] = Address;
Types.types["String"] = String;
Types.types["Float"] = Float;
Types.types["Boolean"] = Boolean;
Types.types["CurrencyCode"] = CurrencyCode;
Types.types["Domain"] = Domain;
Types.types["CollectionConnection"] = CollectionConnection;
Types.types["PageInfo"] = PageInfo;
Types.types["CollectionEdge"] = CollectionEdge;
Types.types["Collection"] = Collection;
Types.types["DateTime"] = DateTime;
Types.types["ProductConnection"] = ProductConnection;
Types.types["ProductEdge"] = ProductEdge;
Types.types["Product"] = Product;
Types.types["Int"] = Int;
Types.types["ImageConnection"] = ImageConnection;
Types.types["ImageEdge"] = ImageEdge;
Types.types["Image"] = Image;
Types.types["URL"] = URL;
Types.types["CropRegion"] = CropRegion;
Types.types["ProductOption"] = ProductOption;
Types.types["ProductVariantConnection"] = ProductVariantConnection;
Types.types["ProductVariantEdge"] = ProductVariantEdge;
Types.types["ProductVariant"] = ProductVariant;
Types.types["WeightUnit"] = WeightUnit;
Types.types["Money"] = Money;
Types.types["SelectedOption"] = SelectedOption;
Types.types["CollectionSortKeys"] = CollectionSortKeys;
Types.types["ProductSortKeys"] = ProductSortKeys;
Types.types["__Schema"] = __Schema;
Types.types["__Type"] = __Type;
Types.types["__TypeKind"] = __TypeKind;
Types.types["__Field"] = __Field;
Types.types["__InputValue"] = __InputValue;
Types.types["__EnumValue"] = __EnumValue;
Types.types["__Directive"] = __Directive;
Types.types["__DirectiveLocation"] = __DirectiveLocation;
Types.queryType = "QueryRoot";
Types.mutationType = "Mutation";
Types.subscriptionType = null;
function recursivelyFreezeObject(structure) {
Object.getOwnPropertyNames(structure).forEach(key => {
const value = structure[key];
if (value && typeof value === 'object') {
recursivelyFreezeObject(value);
}
});
Object.freeze(structure);
return structure;
}
export default recursivelyFreezeObject(Types);