@contember/engine-content-api 2.0.0-alpha.15 → 2.0.0-alpha.16

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 (37) hide show
  1. package/dist/development/index.cjs +2 -1
  2. package/dist/development/index.cjs.map +1 -1
  3. package/dist/development/index.js +2 -1
  4. package/dist/development/index.js.map +1 -1
  5. package/dist/development/src/introspection/IntrospectionSchemaDefinitionFactory.cjs +6 -163
  6. package/dist/development/src/introspection/IntrospectionSchemaDefinitionFactory.cjs.map +1 -1
  7. package/dist/development/src/introspection/IntrospectionSchemaDefinitionFactory.js +5 -162
  8. package/dist/development/src/introspection/IntrospectionSchemaDefinitionFactory.js.map +1 -1
  9. package/dist/development/src/introspection/introspection.schema.cjs +163 -0
  10. package/dist/development/src/introspection/introspection.schema.cjs.map +1 -0
  11. package/dist/development/src/introspection/introspection.schema.js +163 -0
  12. package/dist/development/src/introspection/introspection.schema.js.map +1 -0
  13. package/dist/production/index.cjs +2 -1
  14. package/dist/production/index.cjs.map +1 -1
  15. package/dist/production/index.js +2 -1
  16. package/dist/production/index.js.map +1 -1
  17. package/dist/production/src/introspection/IntrospectionSchemaDefinitionFactory.cjs +6 -163
  18. package/dist/production/src/introspection/IntrospectionSchemaDefinitionFactory.cjs.map +1 -1
  19. package/dist/production/src/introspection/IntrospectionSchemaDefinitionFactory.js +5 -162
  20. package/dist/production/src/introspection/IntrospectionSchemaDefinitionFactory.js.map +1 -1
  21. package/dist/production/src/introspection/introspection.schema.cjs +163 -0
  22. package/dist/production/src/introspection/introspection.schema.cjs.map +1 -0
  23. package/dist/production/src/introspection/introspection.schema.js +163 -0
  24. package/dist/production/src/introspection/introspection.schema.js.map +1 -0
  25. package/dist/tests/tsconfig.tsbuildinfo +1 -1
  26. package/dist/types/introspection/IntrospectionSchemaDefinitionFactory.d.ts +1 -3
  27. package/dist/types/introspection/IntrospectionSchemaDefinitionFactory.d.ts.map +1 -1
  28. package/dist/types/introspection/index.d.ts +2 -1
  29. package/dist/types/introspection/index.d.ts.map +1 -1
  30. package/dist/types/introspection/introspection.schema.d.ts +5 -0
  31. package/dist/types/introspection/introspection.schema.d.ts.map +1 -0
  32. package/dist/types/tsconfig.tsbuildinfo +1 -1
  33. package/graphql.codegen.yml +2 -2
  34. package/package.json +13 -17
  35. package/src/introspection/IntrospectionSchemaDefinitionFactory.ts +2 -194
  36. package/src/introspection/index.ts +2 -1
  37. package/src/introspection/introspection.schema.ts +194 -0
@@ -0,0 +1,163 @@
1
+ import { JSONType } from "@contember/graphql-utils";
2
+ import { GraphQLObjectType, GraphQLString, GraphQLNonNull, GraphQLInt, GraphQLList, GraphQLUnionType, GraphQLInterfaceType, GraphQLBoolean, GraphQLEnumType, GraphQLSchema } from "graphql";
3
+ const _RuleMessage = new GraphQLObjectType({
4
+ name: "_RuleMessage",
5
+ fields: {
6
+ text: { type: GraphQLString }
7
+ }
8
+ });
9
+ const _ValidatorArgument = new GraphQLObjectType({
10
+ name: "_ValidatorArgument",
11
+ fields: {
12
+ validator: { type: new GraphQLNonNull(GraphQLInt) }
13
+ }
14
+ });
15
+ const _PathArgument = new GraphQLObjectType({
16
+ name: "_PathArgument",
17
+ fields: {
18
+ path: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) }
19
+ }
20
+ });
21
+ const _LiteralArgument = new GraphQLObjectType({
22
+ name: "_LiteralArgument",
23
+ fields: {
24
+ value: { type: JSONType }
25
+ }
26
+ });
27
+ const _Argument = new GraphQLUnionType({
28
+ name: "_Argument",
29
+ types: [_ValidatorArgument, _PathArgument, _LiteralArgument]
30
+ });
31
+ const _Validator = new GraphQLObjectType({
32
+ name: "_Validator",
33
+ fields: {
34
+ operation: { type: new GraphQLNonNull(GraphQLString) },
35
+ arguments: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Argument))) }
36
+ }
37
+ });
38
+ const _Rule = new GraphQLObjectType({
39
+ name: "_Rule",
40
+ fields: {
41
+ message: { type: _RuleMessage },
42
+ validator: { type: new GraphQLNonNull(GraphQLInt) }
43
+ }
44
+ });
45
+ const _FieldInterface = new GraphQLInterfaceType({
46
+ name: "_Field",
47
+ fields: {
48
+ name: { type: new GraphQLNonNull(GraphQLString) },
49
+ type: { type: new GraphQLNonNull(GraphQLString) },
50
+ nullable: { type: GraphQLBoolean },
51
+ rules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },
52
+ validators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) }
53
+ }
54
+ });
55
+ const _OrderByDirection = new GraphQLEnumType({
56
+ name: "_OrderByDirection",
57
+ values: {
58
+ asc: {},
59
+ desc: {}
60
+ }
61
+ });
62
+ const _OrderBy = new GraphQLObjectType({
63
+ name: "_OrderBy",
64
+ fields: {
65
+ path: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },
66
+ direction: { type: new GraphQLNonNull(_OrderByDirection) }
67
+ }
68
+ });
69
+ const _OnDeleteBehaviour = new GraphQLEnumType({
70
+ name: "_OnDeleteBehaviour",
71
+ values: {
72
+ restrict: {},
73
+ cascade: {},
74
+ setNull: {}
75
+ }
76
+ });
77
+ const _RelationSide = new GraphQLEnumType({
78
+ name: "_RelationSide",
79
+ values: {
80
+ owning: {},
81
+ inverse: {}
82
+ }
83
+ });
84
+ const _Relation = new GraphQLObjectType({
85
+ name: "_Relation",
86
+ interfaces: [_FieldInterface],
87
+ fields: {
88
+ name: { type: new GraphQLNonNull(GraphQLString) },
89
+ type: { type: new GraphQLNonNull(GraphQLString) },
90
+ side: { type: new GraphQLNonNull(_RelationSide) },
91
+ targetEntity: { type: new GraphQLNonNull(GraphQLString) },
92
+ ownedBy: { type: GraphQLString },
93
+ inversedBy: { type: GraphQLString },
94
+ nullable: { type: GraphQLBoolean },
95
+ onDelete: { type: _OnDeleteBehaviour },
96
+ orphanRemoval: { type: GraphQLBoolean },
97
+ orderBy: { type: new GraphQLList(new GraphQLNonNull(_OrderBy)) },
98
+ rules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },
99
+ validators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) }
100
+ }
101
+ });
102
+ const _Column = new GraphQLObjectType({
103
+ name: "_Column",
104
+ interfaces: [_FieldInterface],
105
+ fields: {
106
+ name: { type: new GraphQLNonNull(GraphQLString) },
107
+ type: { type: new GraphQLNonNull(GraphQLString) },
108
+ enumName: { type: GraphQLString },
109
+ defaultValue: { type: JSONType },
110
+ nullable: { type: new GraphQLNonNull(GraphQLBoolean) },
111
+ rules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },
112
+ validators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) }
113
+ }
114
+ });
115
+ const _UniqueConstraint = new GraphQLObjectType({
116
+ name: "_UniqueConstraint",
117
+ fields: {
118
+ fields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) }
119
+ }
120
+ });
121
+ const _Entity = new GraphQLObjectType({
122
+ name: "_Entity",
123
+ fields: {
124
+ name: { type: new GraphQLNonNull(GraphQLString) },
125
+ customPrimaryAllowed: { type: new GraphQLNonNull(GraphQLBoolean) },
126
+ fields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_FieldInterface))) },
127
+ unique: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_UniqueConstraint))) }
128
+ }
129
+ });
130
+ const _Enum = new GraphQLObjectType({
131
+ name: "_Enum",
132
+ fields: {
133
+ name: { type: new GraphQLNonNull(GraphQLString) },
134
+ values: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) }
135
+ }
136
+ });
137
+ const _Schema = new GraphQLObjectType({
138
+ name: "_Schema",
139
+ fields: {
140
+ enums: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Enum))) },
141
+ entities: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Entity))) }
142
+ }
143
+ });
144
+ const createSchemaConfig = (resolver) => {
145
+ return {
146
+ query: new GraphQLObjectType({
147
+ name: "Query",
148
+ fields: {
149
+ schema: {
150
+ type: _Schema,
151
+ resolve: resolver
152
+ }
153
+ }
154
+ }),
155
+ types: [_Column, _Relation]
156
+ };
157
+ };
158
+ const introspection_schema = new GraphQLSchema(createSchemaConfig());
159
+ export {
160
+ createSchemaConfig,
161
+ introspection_schema as default
162
+ };
163
+ //# sourceMappingURL=introspection.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"introspection.schema.js","sources":["../../../../../packages/engine-content-api/src/introspection/introspection.schema.ts"],"sourcesContent":["import { JSONType } from '@contember/graphql-utils'\n\nimport {\n\tGraphQLBoolean,\n\tGraphQLEnumType,\n\tGraphQLFieldResolver,\n\tGraphQLInt,\n\tGraphQLInterfaceType,\n\tGraphQLList,\n\tGraphQLNonNull,\n\tGraphQLObjectType,\n\tGraphQLSchema,\n\tGraphQLSchemaConfig,\n\tGraphQLString,\n\tGraphQLUnionType,\n} from 'graphql'\n\nconst _RuleMessage = new GraphQLObjectType({\n\tname: '_RuleMessage',\n\tfields: {\n\t\ttext: { type: GraphQLString },\n\t},\n})\n\nconst _ValidatorArgument = new GraphQLObjectType({\n\tname: '_ValidatorArgument',\n\tfields: {\n\t\tvalidator: { type: new GraphQLNonNull(GraphQLInt) },\n\t},\n})\n\nconst _PathArgument = new GraphQLObjectType({\n\tname: '_PathArgument',\n\tfields: {\n\t\tpath: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _LiteralArgument = new GraphQLObjectType({\n\tname: '_LiteralArgument',\n\tfields: {\n\t\tvalue: { type: JSONType },\n\t},\n})\n\nconst _Argument = new GraphQLUnionType({\n\tname: '_Argument',\n\ttypes: [_ValidatorArgument, _PathArgument, _LiteralArgument],\n})\n\nconst _Validator = new GraphQLObjectType({\n\tname: '_Validator',\n\tfields: {\n\t\toperation: { type: new GraphQLNonNull(GraphQLString) },\n\t\targuments: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Argument))) },\n\t},\n})\n\nconst _Rule = new GraphQLObjectType({\n\tname: '_Rule',\n\tfields: {\n\t\tmessage: { type: _RuleMessage },\n\t\tvalidator: { type: new GraphQLNonNull(GraphQLInt) },\n\t},\n})\n\nconst _FieldInterface = new GraphQLInterfaceType({\n\tname: '_Field',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tnullable: { type: GraphQLBoolean },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _OrderByDirection = new GraphQLEnumType({\n\tname: '_OrderByDirection',\n\tvalues: {\n\t\tasc: {},\n\t\tdesc: {},\n\t},\n})\n\nconst _OrderBy = new GraphQLObjectType({\n\tname: '_OrderBy',\n\tfields: {\n\t\tpath: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t\tdirection: { type: new GraphQLNonNull(_OrderByDirection) },\n\t},\n})\n\nconst _OnDeleteBehaviour = new GraphQLEnumType({\n\tname: '_OnDeleteBehaviour',\n\tvalues: {\n\t\trestrict: {},\n\t\tcascade: {},\n\t\tsetNull: {},\n\t},\n})\n\nconst _RelationSide = new GraphQLEnumType({\n\tname: '_RelationSide',\n\tvalues: {\n\t\towning: {},\n\t\tinverse: {},\n\t},\n})\n\nconst _Relation = new GraphQLObjectType({\n\tname: '_Relation',\n\tinterfaces: [_FieldInterface],\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tside: { type: new GraphQLNonNull(_RelationSide) },\n\t\ttargetEntity: { type: new GraphQLNonNull(GraphQLString) },\n\t\townedBy: { type: GraphQLString },\n\t\tinversedBy: { type: GraphQLString },\n\t\tnullable: { type: GraphQLBoolean },\n\t\tonDelete: { type: _OnDeleteBehaviour },\n\t\torphanRemoval: { type: GraphQLBoolean },\n\t\torderBy: { type: new GraphQLList(new GraphQLNonNull(_OrderBy)) },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _Column = new GraphQLObjectType({\n\tname: '_Column',\n\tinterfaces: [_FieldInterface],\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tenumName: { type: GraphQLString },\n\t\tdefaultValue: { type: JSONType },\n\t\tnullable: { type: new GraphQLNonNull(GraphQLBoolean) },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _UniqueConstraint = new GraphQLObjectType({\n\tname: '_UniqueConstraint',\n\tfields: {\n\t\tfields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _Entity = new GraphQLObjectType({\n\tname: '_Entity',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\tcustomPrimaryAllowed: { type: new GraphQLNonNull(GraphQLBoolean) },\n\t\tfields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_FieldInterface))) },\n\t\tunique: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_UniqueConstraint))) },\n\t},\n})\n\nconst _Enum = new GraphQLObjectType({\n\tname: '_Enum',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\tvalues: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _Schema = new GraphQLObjectType({\n\tname: '_Schema',\n\tfields: {\n\t\tenums: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Enum))) },\n\t\tentities: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Entity))) },\n\t},\n})\n\n\nexport const createSchemaConfig = (resolver?: GraphQLFieldResolver<any, any>): GraphQLSchemaConfig => {\n\treturn {\n\t\tquery: new GraphQLObjectType({\n\t\t\tname: 'Query',\n\t\t\tfields: {\n\t\t\t\tschema: {\n\t\t\t\t\ttype: _Schema,\n\t\t\t\t\tresolve: resolver,\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t\ttypes: [_Column, _Relation],\n\t}\n}\n\n\nexport default new GraphQLSchema(createSchemaConfig())\n"],"names":[],"mappings":";;AAiBA,MAAM,eAAe,IAAI,kBAAkB;AAAA,EAC1C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,MAAM,EAAE,MAAM,cAAc;AAAA,EAC7B;AACD,CAAC;AAED,MAAM,qBAAqB,IAAI,kBAAkB;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,WAAW,EAAE,MAAM,IAAI,eAAe,UAAU,EAAE;AAAA,EACnD;AACD,CAAC;AAED,MAAM,gBAAgB,IAAI,kBAAkB;AAAA,EAC3C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,MAAM,EAAE,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,aAAa,CAAC,CAAC,EAAE;AAAA,EACtF;AACD,CAAC;AAED,MAAM,mBAAmB,IAAI,kBAAkB;AAAA,EAC9C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,OAAO,EAAE,MAAM,SAAS;AAAA,EACzB;AACD,CAAC;AAED,MAAM,YAAY,IAAI,iBAAiB;AAAA,EACtC,MAAM;AAAA,EACN,OAAO,CAAC,oBAAoB,eAAe,gBAAgB;AAC5D,CAAC;AAED,MAAM,aAAa,IAAI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,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;AAAA,IAC9E,UAAU,EAAE,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,OAAO,CAAC,CAAC,EAAE;AAAA,EACpF;AACD,CAAC;AAGY,MAAA,qBAAqB,CAAC,aAAmE;AAC9F,SAAA;AAAA,IACN,OAAO,IAAI,kBAAkB;AAAA,MAC5B,MAAM;AAAA,MACN,QAAQ;AAAA,QACP,QAAQ;AAAA,UACP,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IAAA,CACA;AAAA,IACD,OAAO,CAAC,SAAS,SAAS;AAAA,EAAA;AAE5B;AAGA,MAAA,uBAAe,IAAI,cAAc,oBAAoB;"}
@@ -12,6 +12,7 @@ const ReadResolver = require("./src/resolvers/ReadResolver.cjs");
12
12
  const ValidationResolver = require("./src/resolvers/ValidationResolver.cjs");
13
13
  const contentSchema_types = require("./src/introspection/content-schema.types.cjs");
14
14
  const IntrospectionSchemaDefinitionFactory = require("./src/introspection/IntrospectionSchemaDefinitionFactory.cjs");
15
+ const introspection_schema = require("./src/introspection/introspection.schema.cjs");
15
16
  const IntrospectionSchemaFactory = require("./src/introspection/IntrospectionSchemaFactory.cjs");
16
17
  const FieldArgsVisitor = require("./src/schema/entities/FieldArgsVisitor.cjs");
17
18
  const FieldTypeVisitor = require("./src/schema/entities/FieldTypeVisitor.cjs");
@@ -74,8 +75,8 @@ exports.MutationResolver = MutationResolver.MutationResolver;
74
75
  exports.ReadResolver = ReadResolver.ReadResolver;
75
76
  exports.ValidationResolver = ValidationResolver.ValidationResolver;
76
77
  exports.ContentSchemaTypes = contentSchema_types;
77
- exports.ContentSchema = IntrospectionSchemaDefinitionFactory.default;
78
78
  exports.IntrospectionSchemaDefinitionFactory = IntrospectionSchemaDefinitionFactory.IntrospectionSchemaDefinitionFactory;
79
+ exports.ContentSchema = introspection_schema.default;
79
80
  exports.IntrospectionSchemaFactory = IntrospectionSchemaFactory.IntrospectionSchemaFactory;
80
81
  exports.FieldArgsVisitor = FieldArgsVisitor.FieldArgsVisitor;
81
82
  exports.FieldTypeVisitor = FieldTypeVisitor.FieldTypeVisitor;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,8 @@ import { MutationResolver } from "./src/resolvers/MutationResolver.js";
9
9
  import { ReadResolver } from "./src/resolvers/ReadResolver.js";
10
10
  import { ValidationResolver } from "./src/resolvers/ValidationResolver.js";
11
11
  import * as contentSchema_types from "./src/introspection/content-schema.types.js";
12
- import { default as default2, IntrospectionSchemaDefinitionFactory } from "./src/introspection/IntrospectionSchemaDefinitionFactory.js";
12
+ import { IntrospectionSchemaDefinitionFactory } from "./src/introspection/IntrospectionSchemaDefinitionFactory.js";
13
+ import { default as default2 } from "./src/introspection/introspection.schema.js";
13
14
  import { IntrospectionSchemaFactory } from "./src/introspection/IntrospectionSchemaFactory.js";
14
15
  import { FieldArgsVisitor } from "./src/schema/entities/FieldArgsVisitor.js";
15
16
  import { FieldTypeVisitor } from "./src/schema/entities/FieldTypeVisitor.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,164 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const graphqlUtils = require("@contember/graphql-utils");
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
3
  const graphql = require("graphql");
5
- const _RuleMessage = new graphql.GraphQLObjectType({
6
- name: "_RuleMessage",
7
- fields: {
8
- text: { type: graphql.GraphQLString }
9
- }
10
- });
11
- const _ValidatorArgument = new graphql.GraphQLObjectType({
12
- name: "_ValidatorArgument",
13
- fields: {
14
- validator: { type: new graphql.GraphQLNonNull(graphql.GraphQLInt) }
15
- }
16
- });
17
- const _PathArgument = new graphql.GraphQLObjectType({
18
- name: "_PathArgument",
19
- fields: {
20
- path: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(graphql.GraphQLString))) }
21
- }
22
- });
23
- const _LiteralArgument = new graphql.GraphQLObjectType({
24
- name: "_LiteralArgument",
25
- fields: {
26
- value: { type: graphqlUtils.JSONType }
27
- }
28
- });
29
- const _Argument = new graphql.GraphQLUnionType({
30
- name: "_Argument",
31
- types: [_ValidatorArgument, _PathArgument, _LiteralArgument]
32
- });
33
- const _Validator = new graphql.GraphQLObjectType({
34
- name: "_Validator",
35
- fields: {
36
- operation: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
37
- arguments: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Argument))) }
38
- }
39
- });
40
- const _Rule = new graphql.GraphQLObjectType({
41
- name: "_Rule",
42
- fields: {
43
- message: { type: _RuleMessage },
44
- validator: { type: new graphql.GraphQLNonNull(graphql.GraphQLInt) }
45
- }
46
- });
47
- const _FieldInterface = new graphql.GraphQLInterfaceType({
48
- name: "_Field",
49
- fields: {
50
- name: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
51
- type: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
52
- nullable: { type: graphql.GraphQLBoolean },
53
- rules: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Rule))) },
54
- validators: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Validator))) }
55
- }
56
- });
57
- const _OrderByDirection = new graphql.GraphQLEnumType({
58
- name: "_OrderByDirection",
59
- values: {
60
- asc: {},
61
- desc: {}
62
- }
63
- });
64
- const _OrderBy = new graphql.GraphQLObjectType({
65
- name: "_OrderBy",
66
- fields: {
67
- path: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(graphql.GraphQLString))) },
68
- direction: { type: new graphql.GraphQLNonNull(_OrderByDirection) }
69
- }
70
- });
71
- const _OnDeleteBehaviour = new graphql.GraphQLEnumType({
72
- name: "_OnDeleteBehaviour",
73
- values: {
74
- restrict: {},
75
- cascade: {},
76
- setNull: {}
77
- }
78
- });
79
- const _RelationSide = new graphql.GraphQLEnumType({
80
- name: "_RelationSide",
81
- values: {
82
- owning: {},
83
- inverse: {}
84
- }
85
- });
86
- const _Relation = new graphql.GraphQLObjectType({
87
- name: "_Relation",
88
- interfaces: [_FieldInterface],
89
- fields: {
90
- name: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
91
- type: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
92
- side: { type: new graphql.GraphQLNonNull(_RelationSide) },
93
- targetEntity: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
94
- ownedBy: { type: graphql.GraphQLString },
95
- inversedBy: { type: graphql.GraphQLString },
96
- nullable: { type: graphql.GraphQLBoolean },
97
- onDelete: { type: _OnDeleteBehaviour },
98
- orphanRemoval: { type: graphql.GraphQLBoolean },
99
- orderBy: { type: new graphql.GraphQLList(new graphql.GraphQLNonNull(_OrderBy)) },
100
- rules: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Rule))) },
101
- validators: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Validator))) }
102
- }
103
- });
104
- const _Column = new graphql.GraphQLObjectType({
105
- name: "_Column",
106
- interfaces: [_FieldInterface],
107
- fields: {
108
- name: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
109
- type: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
110
- enumName: { type: graphql.GraphQLString },
111
- defaultValue: { type: graphqlUtils.JSONType },
112
- nullable: { type: new graphql.GraphQLNonNull(graphql.GraphQLBoolean) },
113
- rules: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Rule))) },
114
- validators: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Validator))) }
115
- }
116
- });
117
- const _UniqueConstraint = new graphql.GraphQLObjectType({
118
- name: "_UniqueConstraint",
119
- fields: {
120
- fields: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(graphql.GraphQLString))) }
121
- }
122
- });
123
- const _Entity = new graphql.GraphQLObjectType({
124
- name: "_Entity",
125
- fields: {
126
- name: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
127
- customPrimaryAllowed: { type: new graphql.GraphQLNonNull(graphql.GraphQLBoolean) },
128
- fields: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_FieldInterface))) },
129
- unique: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_UniqueConstraint))) }
130
- }
131
- });
132
- const _Enum = new graphql.GraphQLObjectType({
133
- name: "_Enum",
134
- fields: {
135
- name: { type: new graphql.GraphQLNonNull(graphql.GraphQLString) },
136
- values: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(graphql.GraphQLString))) }
137
- }
138
- });
139
- const _Schema = new graphql.GraphQLObjectType({
140
- name: "_Schema",
141
- fields: {
142
- enums: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Enum))) },
143
- entities: { type: new graphql.GraphQLNonNull(new graphql.GraphQLList(new graphql.GraphQLNonNull(_Entity))) }
144
- }
145
- });
146
- const createSchemaConfig = (resolver) => {
147
- return {
148
- query: new graphql.GraphQLObjectType({
149
- name: "Query",
150
- fields: {
151
- schema: {
152
- type: _Schema,
153
- resolve: resolver
154
- }
155
- }
156
- }),
157
- types: [_Column, _Relation]
158
- };
159
- };
160
- const IntrospectionSchemaDefinitionFactory = new graphql.GraphQLSchema(createSchemaConfig());
161
- let IntrospectionSchemaDefinitionFactory$1 = class IntrospectionSchemaDefinitionFactory2 {
4
+ const introspection_schema = require("./introspection.schema.cjs");
5
+ class IntrospectionSchemaDefinitionFactory {
162
6
  constructor(introspectionSchemaFactory) {
163
7
  this.introspectionSchemaFactory = introspectionSchemaFactory;
164
8
  }
@@ -166,11 +10,10 @@ let IntrospectionSchemaDefinitionFactory$1 = class IntrospectionSchemaDefinition
166
10
  return new graphql.GraphQLSchema(this.createConfig());
167
11
  }
168
12
  createConfig() {
169
- return createSchemaConfig(() => {
13
+ return introspection_schema.createSchemaConfig(() => {
170
14
  return this.introspectionSchemaFactory.create();
171
15
  });
172
16
  }
173
- };
174
- exports.IntrospectionSchemaDefinitionFactory = IntrospectionSchemaDefinitionFactory$1;
175
- exports.default = IntrospectionSchemaDefinitionFactory;
17
+ }
18
+ exports.IntrospectionSchemaDefinitionFactory = IntrospectionSchemaDefinitionFactory;
176
19
  //# sourceMappingURL=IntrospectionSchemaDefinitionFactory.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntrospectionSchemaDefinitionFactory.cjs","sources":["../../../../../packages/engine-content-api/src/introspection/IntrospectionSchemaDefinitionFactory.ts"],"sourcesContent":["import * as ContentSchema from './content-schema.types'\nimport { IntrospectionSchemaFactory } from './IntrospectionSchemaFactory'\nimport { JSONType } from '@contember/graphql-utils'\n\nimport {\n\tGraphQLBoolean,\n\tGraphQLEnumType,\n\tGraphQLFieldResolver,\n\tGraphQLInt,\n\tGraphQLInterfaceType,\n\tGraphQLList,\n\tGraphQLNonNull,\n\tGraphQLObjectType,\n\tGraphQLSchema,\n\tGraphQLSchemaConfig,\n\tGraphQLString,\n\tGraphQLUnionType,\n} from 'graphql'\n\nconst _RuleMessage = new GraphQLObjectType({\n\tname: '_RuleMessage',\n\tfields: {\n\t\ttext: { type: GraphQLString },\n\t},\n})\n\nconst _ValidatorArgument = new GraphQLObjectType({\n\tname: '_ValidatorArgument',\n\tfields: {\n\t\tvalidator: { type: new GraphQLNonNull(GraphQLInt) },\n\t},\n})\n\nconst _PathArgument = new GraphQLObjectType({\n\tname: '_PathArgument',\n\tfields: {\n\t\tpath: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _LiteralArgument = new GraphQLObjectType({\n\tname: '_LiteralArgument',\n\tfields: {\n\t\tvalue: { type: JSONType },\n\t},\n})\n\nconst _Argument = new GraphQLUnionType({\n\tname: '_Argument',\n\ttypes: [_ValidatorArgument, _PathArgument, _LiteralArgument],\n})\n\nconst _Validator = new GraphQLObjectType({\n\tname: '_Validator',\n\tfields: {\n\t\toperation: { type: new GraphQLNonNull(GraphQLString) },\n\t\targuments: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Argument))) },\n\t},\n})\n\nconst _Rule = new GraphQLObjectType({\n\tname: '_Rule',\n\tfields: {\n\t\tmessage: { type: _RuleMessage },\n\t\tvalidator: { type: new GraphQLNonNull(GraphQLInt) },\n\t},\n})\n\nconst _FieldInterface = new GraphQLInterfaceType({\n\tname: '_Field',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tnullable: { type: GraphQLBoolean },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _OrderByDirection = new GraphQLEnumType({\n\tname: '_OrderByDirection',\n\tvalues: {\n\t\tasc: {},\n\t\tdesc: {},\n\t},\n})\n\nconst _OrderBy = new GraphQLObjectType({\n\tname: '_OrderBy',\n\tfields: {\n\t\tpath: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t\tdirection: { type: new GraphQLNonNull(_OrderByDirection) },\n\t},\n})\n\nconst _OnDeleteBehaviour = new GraphQLEnumType({\n\tname: '_OnDeleteBehaviour',\n\tvalues: {\n\t\trestrict: {},\n\t\tcascade: {},\n\t\tsetNull: {},\n\t},\n})\n\nconst _RelationSide = new GraphQLEnumType({\n\tname: '_RelationSide',\n\tvalues: {\n\t\towning: {},\n\t\tinverse: {},\n\t},\n})\n\nconst _Relation = new GraphQLObjectType({\n\tname: '_Relation',\n\tinterfaces: [_FieldInterface],\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tside: { type: new GraphQLNonNull(_RelationSide) },\n\t\ttargetEntity: { type: new GraphQLNonNull(GraphQLString) },\n\t\townedBy: { type: GraphQLString },\n\t\tinversedBy: { type: GraphQLString },\n\t\tnullable: { type: GraphQLBoolean },\n\t\tonDelete: { type: _OnDeleteBehaviour },\n\t\torphanRemoval: { type: GraphQLBoolean },\n\t\torderBy: { type: new GraphQLList(new GraphQLNonNull(_OrderBy)) },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _Column = new GraphQLObjectType({\n\tname: '_Column',\n\tinterfaces: [_FieldInterface],\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tenumName: { type: GraphQLString },\n\t\tdefaultValue: { type: JSONType },\n\t\tnullable: { type: new GraphQLNonNull(GraphQLBoolean) },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _UniqueConstraint = new GraphQLObjectType({\n\tname: '_UniqueConstraint',\n\tfields: {\n\t\tfields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _Entity = new GraphQLObjectType({\n\tname: '_Entity',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\tcustomPrimaryAllowed: { type: new GraphQLNonNull(GraphQLBoolean) },\n\t\tfields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_FieldInterface))) },\n\t\tunique: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_UniqueConstraint))) },\n\t},\n})\n\nconst _Enum = new GraphQLObjectType({\n\tname: '_Enum',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\tvalues: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _Schema = new GraphQLObjectType({\n\tname: '_Schema',\n\tfields: {\n\t\tenums: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Enum))) },\n\t\tentities: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Entity))) },\n\t},\n})\n\n\nconst createSchemaConfig = (resolver?: GraphQLFieldResolver<any, any>): GraphQLSchemaConfig => {\n\treturn {\n\t\tquery: new GraphQLObjectType({\n\t\t\tname: 'Query',\n\t\t\tfields: {\n\t\t\t\tschema: {\n\t\t\t\t\ttype: _Schema,\n\t\t\t\t\tresolve: resolver,\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t\ttypes: [_Column, _Relation],\n\t}\n}\n\n\nexport default new GraphQLSchema(createSchemaConfig())\n\nexport class IntrospectionSchemaDefinitionFactory {\n\tconstructor(private readonly introspectionSchemaFactory: IntrospectionSchemaFactory) {}\n\n\tpublic create(): GraphQLSchema {\n\t\treturn new GraphQLSchema(this.createConfig())\n\t}\n\n\tpublic createConfig(): GraphQLSchemaConfig {\n\t\treturn createSchemaConfig((): ContentSchema._Schema => {\n\t\t\treturn this.introspectionSchemaFactory.create()\n\t\t})\n\t}\n}\n"],"names":["GraphQLObjectType","GraphQLString","GraphQLNonNull","GraphQLInt","GraphQLList","JSONType","GraphQLUnionType","GraphQLInterfaceType","GraphQLBoolean","GraphQLEnumType","GraphQLSchema","IntrospectionSchemaDefinitionFactory"],"mappings":";;;;AAmBA,MAAM,eAAe,IAAIA,QAAAA,kBAAkB;AAAA,EAC1C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,MAAM,EAAE,MAAMC,sBAAc;AAAA,EAC7B;AACD,CAAC;AAED,MAAM,qBAAqB,IAAID,QAAAA,kBAAkB;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,WAAW,EAAE,MAAM,IAAIE,QAAA,eAAeC,QAAU,UAAA,EAAE;AAAA,EACnD;AACD,CAAC;AAED,MAAM,gBAAgB,IAAIH,QAAAA,kBAAkB;AAAA,EAC3C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,MAAM,EAAE,MAAM,IAAIE,uBAAe,IAAIE,QAAY,YAAA,IAAIF,QAAe,eAAAD,qBAAa,CAAC,CAAC,EAAE;AAAA,EACtF;AACD,CAAC;AAED,MAAM,mBAAmB,IAAID,QAAAA,kBAAkB;AAAA,EAC9C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,OAAO,EAAE,MAAMK,sBAAS;AAAA,EACzB;AACD,CAAC;AAED,MAAM,YAAY,I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C,sCAAqC;AAAA,EACjD,YAA6B,4BAAwD;AAAxD,SAAA,6BAAA;AAAA,EAAyD;AAAA,EAE/E,SAAwB;AAC9B,WAAO,IAAID,QAAA,cAAc,KAAK,aAAc,CAAA;AAAA,EAC7C;AAAA,EAEO,eAAoC;AAC1C,WAAO,mBAAmB,MAA6B;AAC/C,aAAA,KAAK,2BAA2B;IAAO,CAC9C;AAAA,EACF;AACD;;;"}
1
+ {"version":3,"file":"IntrospectionSchemaDefinitionFactory.cjs","sources":["../../../../../packages/engine-content-api/src/introspection/IntrospectionSchemaDefinitionFactory.ts"],"sourcesContent":["import { GraphQLSchema, GraphQLSchemaConfig } from 'graphql'\nimport * as ContentSchema from './content-schema.types'\nimport { IntrospectionSchemaFactory } from './IntrospectionSchemaFactory'\nimport { createSchemaConfig } from './introspection.schema'\n\nexport class IntrospectionSchemaDefinitionFactory {\n\tconstructor(private readonly introspectionSchemaFactory: IntrospectionSchemaFactory) {}\n\n\tpublic create(): GraphQLSchema {\n\t\treturn new GraphQLSchema(this.createConfig())\n\t}\n\n\tpublic createConfig(): GraphQLSchemaConfig {\n\t\treturn createSchemaConfig((): ContentSchema._Schema => {\n\t\t\treturn this.introspectionSchemaFactory.create()\n\t\t})\n\t}\n}\n"],"names":["GraphQLSchema","createSchemaConfig"],"mappings":";;;;AAKO,MAAM,qCAAqC;AAAA,EACjD,YAA6B,4BAAwD;AAAxD,SAAA,6BAAA;AAAA,EAAyD;AAAA,EAE/E,SAAwB;AAC9B,WAAO,IAAIA,QAAA,cAAc,KAAK,aAAc,CAAA;AAAA,EAC7C;AAAA,EAEO,eAAoC;AAC1C,WAAOC,wCAAmB,MAA6B;AAC/C,aAAA,KAAK,2BAA2B;IAAO,CAC9C;AAAA,EACF;AACD;;"}
@@ -1,162 +1,6 @@
1
- import { JSONType } from "@contember/graphql-utils";
2
- import { GraphQLObjectType, GraphQLString, GraphQLNonNull, GraphQLInt, GraphQLList, GraphQLUnionType, GraphQLInterfaceType, GraphQLBoolean, GraphQLEnumType, GraphQLSchema } from "graphql";
3
- const _RuleMessage = new GraphQLObjectType({
4
- name: "_RuleMessage",
5
- fields: {
6
- text: { type: GraphQLString }
7
- }
8
- });
9
- const _ValidatorArgument = new GraphQLObjectType({
10
- name: "_ValidatorArgument",
11
- fields: {
12
- validator: { type: new GraphQLNonNull(GraphQLInt) }
13
- }
14
- });
15
- const _PathArgument = new GraphQLObjectType({
16
- name: "_PathArgument",
17
- fields: {
18
- path: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) }
19
- }
20
- });
21
- const _LiteralArgument = new GraphQLObjectType({
22
- name: "_LiteralArgument",
23
- fields: {
24
- value: { type: JSONType }
25
- }
26
- });
27
- const _Argument = new GraphQLUnionType({
28
- name: "_Argument",
29
- types: [_ValidatorArgument, _PathArgument, _LiteralArgument]
30
- });
31
- const _Validator = new GraphQLObjectType({
32
- name: "_Validator",
33
- fields: {
34
- operation: { type: new GraphQLNonNull(GraphQLString) },
35
- arguments: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Argument))) }
36
- }
37
- });
38
- const _Rule = new GraphQLObjectType({
39
- name: "_Rule",
40
- fields: {
41
- message: { type: _RuleMessage },
42
- validator: { type: new GraphQLNonNull(GraphQLInt) }
43
- }
44
- });
45
- const _FieldInterface = new GraphQLInterfaceType({
46
- name: "_Field",
47
- fields: {
48
- name: { type: new GraphQLNonNull(GraphQLString) },
49
- type: { type: new GraphQLNonNull(GraphQLString) },
50
- nullable: { type: GraphQLBoolean },
51
- rules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },
52
- validators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) }
53
- }
54
- });
55
- const _OrderByDirection = new GraphQLEnumType({
56
- name: "_OrderByDirection",
57
- values: {
58
- asc: {},
59
- desc: {}
60
- }
61
- });
62
- const _OrderBy = new GraphQLObjectType({
63
- name: "_OrderBy",
64
- fields: {
65
- path: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },
66
- direction: { type: new GraphQLNonNull(_OrderByDirection) }
67
- }
68
- });
69
- const _OnDeleteBehaviour = new GraphQLEnumType({
70
- name: "_OnDeleteBehaviour",
71
- values: {
72
- restrict: {},
73
- cascade: {},
74
- setNull: {}
75
- }
76
- });
77
- const _RelationSide = new GraphQLEnumType({
78
- name: "_RelationSide",
79
- values: {
80
- owning: {},
81
- inverse: {}
82
- }
83
- });
84
- const _Relation = new GraphQLObjectType({
85
- name: "_Relation",
86
- interfaces: [_FieldInterface],
87
- fields: {
88
- name: { type: new GraphQLNonNull(GraphQLString) },
89
- type: { type: new GraphQLNonNull(GraphQLString) },
90
- side: { type: new GraphQLNonNull(_RelationSide) },
91
- targetEntity: { type: new GraphQLNonNull(GraphQLString) },
92
- ownedBy: { type: GraphQLString },
93
- inversedBy: { type: GraphQLString },
94
- nullable: { type: GraphQLBoolean },
95
- onDelete: { type: _OnDeleteBehaviour },
96
- orphanRemoval: { type: GraphQLBoolean },
97
- orderBy: { type: new GraphQLList(new GraphQLNonNull(_OrderBy)) },
98
- rules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },
99
- validators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) }
100
- }
101
- });
102
- const _Column = new GraphQLObjectType({
103
- name: "_Column",
104
- interfaces: [_FieldInterface],
105
- fields: {
106
- name: { type: new GraphQLNonNull(GraphQLString) },
107
- type: { type: new GraphQLNonNull(GraphQLString) },
108
- enumName: { type: GraphQLString },
109
- defaultValue: { type: JSONType },
110
- nullable: { type: new GraphQLNonNull(GraphQLBoolean) },
111
- rules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },
112
- validators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) }
113
- }
114
- });
115
- const _UniqueConstraint = new GraphQLObjectType({
116
- name: "_UniqueConstraint",
117
- fields: {
118
- fields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) }
119
- }
120
- });
121
- const _Entity = new GraphQLObjectType({
122
- name: "_Entity",
123
- fields: {
124
- name: { type: new GraphQLNonNull(GraphQLString) },
125
- customPrimaryAllowed: { type: new GraphQLNonNull(GraphQLBoolean) },
126
- fields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_FieldInterface))) },
127
- unique: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_UniqueConstraint))) }
128
- }
129
- });
130
- const _Enum = new GraphQLObjectType({
131
- name: "_Enum",
132
- fields: {
133
- name: { type: new GraphQLNonNull(GraphQLString) },
134
- values: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) }
135
- }
136
- });
137
- const _Schema = new GraphQLObjectType({
138
- name: "_Schema",
139
- fields: {
140
- enums: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Enum))) },
141
- entities: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Entity))) }
142
- }
143
- });
144
- const createSchemaConfig = (resolver) => {
145
- return {
146
- query: new GraphQLObjectType({
147
- name: "Query",
148
- fields: {
149
- schema: {
150
- type: _Schema,
151
- resolve: resolver
152
- }
153
- }
154
- }),
155
- types: [_Column, _Relation]
156
- };
157
- };
158
- const IntrospectionSchemaDefinitionFactory = new GraphQLSchema(createSchemaConfig());
159
- let IntrospectionSchemaDefinitionFactory$1 = class IntrospectionSchemaDefinitionFactory2 {
1
+ import { GraphQLSchema } from "graphql";
2
+ import { createSchemaConfig } from "./introspection.schema.js";
3
+ class IntrospectionSchemaDefinitionFactory {
160
4
  constructor(introspectionSchemaFactory) {
161
5
  this.introspectionSchemaFactory = introspectionSchemaFactory;
162
6
  }
@@ -168,9 +12,8 @@ let IntrospectionSchemaDefinitionFactory$1 = class IntrospectionSchemaDefinition
168
12
  return this.introspectionSchemaFactory.create();
169
13
  });
170
14
  }
171
- };
15
+ }
172
16
  export {
173
- IntrospectionSchemaDefinitionFactory$1 as IntrospectionSchemaDefinitionFactory,
174
- IntrospectionSchemaDefinitionFactory as default
17
+ IntrospectionSchemaDefinitionFactory
175
18
  };
176
19
  //# sourceMappingURL=IntrospectionSchemaDefinitionFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntrospectionSchemaDefinitionFactory.js","sources":["../../../../../packages/engine-content-api/src/introspection/IntrospectionSchemaDefinitionFactory.ts"],"sourcesContent":["import * as ContentSchema from './content-schema.types'\nimport { IntrospectionSchemaFactory } from './IntrospectionSchemaFactory'\nimport { JSONType } from '@contember/graphql-utils'\n\nimport {\n\tGraphQLBoolean,\n\tGraphQLEnumType,\n\tGraphQLFieldResolver,\n\tGraphQLInt,\n\tGraphQLInterfaceType,\n\tGraphQLList,\n\tGraphQLNonNull,\n\tGraphQLObjectType,\n\tGraphQLSchema,\n\tGraphQLSchemaConfig,\n\tGraphQLString,\n\tGraphQLUnionType,\n} from 'graphql'\n\nconst _RuleMessage = new GraphQLObjectType({\n\tname: '_RuleMessage',\n\tfields: {\n\t\ttext: { type: GraphQLString },\n\t},\n})\n\nconst _ValidatorArgument = new GraphQLObjectType({\n\tname: '_ValidatorArgument',\n\tfields: {\n\t\tvalidator: { type: new GraphQLNonNull(GraphQLInt) },\n\t},\n})\n\nconst _PathArgument = new GraphQLObjectType({\n\tname: '_PathArgument',\n\tfields: {\n\t\tpath: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _LiteralArgument = new GraphQLObjectType({\n\tname: '_LiteralArgument',\n\tfields: {\n\t\tvalue: { type: JSONType },\n\t},\n})\n\nconst _Argument = new GraphQLUnionType({\n\tname: '_Argument',\n\ttypes: [_ValidatorArgument, _PathArgument, _LiteralArgument],\n})\n\nconst _Validator = new GraphQLObjectType({\n\tname: '_Validator',\n\tfields: {\n\t\toperation: { type: new GraphQLNonNull(GraphQLString) },\n\t\targuments: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Argument))) },\n\t},\n})\n\nconst _Rule = new GraphQLObjectType({\n\tname: '_Rule',\n\tfields: {\n\t\tmessage: { type: _RuleMessage },\n\t\tvalidator: { type: new GraphQLNonNull(GraphQLInt) },\n\t},\n})\n\nconst _FieldInterface = new GraphQLInterfaceType({\n\tname: '_Field',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tnullable: { type: GraphQLBoolean },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _OrderByDirection = new GraphQLEnumType({\n\tname: '_OrderByDirection',\n\tvalues: {\n\t\tasc: {},\n\t\tdesc: {},\n\t},\n})\n\nconst _OrderBy = new GraphQLObjectType({\n\tname: '_OrderBy',\n\tfields: {\n\t\tpath: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t\tdirection: { type: new GraphQLNonNull(_OrderByDirection) },\n\t},\n})\n\nconst _OnDeleteBehaviour = new GraphQLEnumType({\n\tname: '_OnDeleteBehaviour',\n\tvalues: {\n\t\trestrict: {},\n\t\tcascade: {},\n\t\tsetNull: {},\n\t},\n})\n\nconst _RelationSide = new GraphQLEnumType({\n\tname: '_RelationSide',\n\tvalues: {\n\t\towning: {},\n\t\tinverse: {},\n\t},\n})\n\nconst _Relation = new GraphQLObjectType({\n\tname: '_Relation',\n\tinterfaces: [_FieldInterface],\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tside: { type: new GraphQLNonNull(_RelationSide) },\n\t\ttargetEntity: { type: new GraphQLNonNull(GraphQLString) },\n\t\townedBy: { type: GraphQLString },\n\t\tinversedBy: { type: GraphQLString },\n\t\tnullable: { type: GraphQLBoolean },\n\t\tonDelete: { type: _OnDeleteBehaviour },\n\t\torphanRemoval: { type: GraphQLBoolean },\n\t\torderBy: { type: new GraphQLList(new GraphQLNonNull(_OrderBy)) },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _Column = new GraphQLObjectType({\n\tname: '_Column',\n\tinterfaces: [_FieldInterface],\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\ttype: { type: new GraphQLNonNull(GraphQLString) },\n\t\tenumName: { type: GraphQLString },\n\t\tdefaultValue: { type: JSONType },\n\t\tnullable: { type: new GraphQLNonNull(GraphQLBoolean) },\n\t\trules: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Rule))) },\n\t\tvalidators: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Validator))) },\n\t},\n})\n\nconst _UniqueConstraint = new GraphQLObjectType({\n\tname: '_UniqueConstraint',\n\tfields: {\n\t\tfields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _Entity = new GraphQLObjectType({\n\tname: '_Entity',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\tcustomPrimaryAllowed: { type: new GraphQLNonNull(GraphQLBoolean) },\n\t\tfields: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_FieldInterface))) },\n\t\tunique: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_UniqueConstraint))) },\n\t},\n})\n\nconst _Enum = new GraphQLObjectType({\n\tname: '_Enum',\n\tfields: {\n\t\tname: { type: new GraphQLNonNull(GraphQLString) },\n\t\tvalues: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(GraphQLString))) },\n\t},\n})\n\nconst _Schema = new GraphQLObjectType({\n\tname: '_Schema',\n\tfields: {\n\t\tenums: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Enum))) },\n\t\tentities: { type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(_Entity))) },\n\t},\n})\n\n\nconst createSchemaConfig = (resolver?: GraphQLFieldResolver<any, any>): GraphQLSchemaConfig => {\n\treturn {\n\t\tquery: new GraphQLObjectType({\n\t\t\tname: 'Query',\n\t\t\tfields: {\n\t\t\t\tschema: {\n\t\t\t\t\ttype: _Schema,\n\t\t\t\t\tresolve: resolver,\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t\ttypes: [_Column, _Relation],\n\t}\n}\n\n\nexport default new GraphQLSchema(createSchemaConfig())\n\nexport class IntrospectionSchemaDefinitionFactory {\n\tconstructor(private readonly introspectionSchemaFactory: IntrospectionSchemaFactory) {}\n\n\tpublic create(): GraphQLSchema {\n\t\treturn new GraphQLSchema(this.createConfig())\n\t}\n\n\tpublic createConfig(): GraphQLSchemaConfig {\n\t\treturn createSchemaConfig((): ContentSchema._Schema => {\n\t\t\treturn this.introspectionSchemaFactory.create()\n\t\t})\n\t}\n}\n"],"names":["IntrospectionSchemaDefinitionFactory"],"mappings":";;AAmBA,MAAM,eAAe,IAAI,kBAAkB;AAAA,EAC1C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,MAAM,EAAE,MAAM,cAAc;AAAA,EAC7B;AACD,CAAC;AAED,MAAM,qBAAqB,IAAI,kBAAkB;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,WAAW,EAAE,MAAM,IAAI,eAAe,UAAU,EAAE;AAAA,EACnD;AACD,CAAC;AAED,MAAM,gBAAgB,IAAI,kBAAkB;AAAA,EAC3C,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,MAAM,EAAE,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,aAAa,CAAC,CAAC,EAAE;AAAA,EACtF;AACD,CAAC;AAED,MAAM,mBAAmB,IAAI,kBAAkB;AAAA,EAC9C,MAAM;AAAA,EACN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AChD,QAAQ,EAAE,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,aAAa,CAAC,CAAC,EAAE;AAAA,EACxF;AACD,CAAC;AAED,MAAM,UAAU,IAAI,kBAAkB;AAAA,EACrC,MAAM;AAAA,EACN,QAAQ;AAAA,IACP,OAAO,EAAE,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE;AAAA,IAC9E,UAAU,EAAE,MAAM,IAAI,eAAe,IAAI,YAAY,IAAI,eAAe,OAAO,CAAC,CAAC,EAAE;AAAA,EACpF;AACD,CAAC;AAGD,MAAM,qBAAqB,CAAC,aAAmE;AACvF,SAAA;AAAA,IACN,OAAO,IAAI,kBAAkB;AAAA,MAC5B,MAAM;AAAA,MACN,QAAQ;AAAA,QACP,QAAQ;AAAA,UACP,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IAAA,CACA;AAAA,IACD,OAAO,CAAC,SAAS,SAAS;AAAA,EAAA;AAE5B;AAGA,MAAA,uCAAe,IAAI,cAAc,mBAAA,CAAoB;AAE9C,IAAA,yCAAA,MAAMA,sCAAqC;AAAA,EACjD,YAA6B,4BAAwD;AAAxD,SAAA,6BAAA;AAAA,EAAyD;AAAA,EAE/E,SAAwB;AAC9B,WAAO,IAAI,cAAc,KAAK,aAAc,CAAA;AAAA,EAC7C;AAAA,EAEO,eAAoC;AAC1C,WAAO,mBAAmB,MAA6B;AAC/C,aAAA,KAAK,2BAA2B;IAAO,CAC9C;AAAA,EACF;AACD;"}
1
+ {"version":3,"file":"IntrospectionSchemaDefinitionFactory.js","sources":["../../../../../packages/engine-content-api/src/introspection/IntrospectionSchemaDefinitionFactory.ts"],"sourcesContent":["import { GraphQLSchema, GraphQLSchemaConfig } from 'graphql'\nimport * as ContentSchema from './content-schema.types'\nimport { IntrospectionSchemaFactory } from './IntrospectionSchemaFactory'\nimport { createSchemaConfig } from './introspection.schema'\n\nexport class IntrospectionSchemaDefinitionFactory {\n\tconstructor(private readonly introspectionSchemaFactory: IntrospectionSchemaFactory) {}\n\n\tpublic create(): GraphQLSchema {\n\t\treturn new GraphQLSchema(this.createConfig())\n\t}\n\n\tpublic createConfig(): GraphQLSchemaConfig {\n\t\treturn createSchemaConfig((): ContentSchema._Schema => {\n\t\t\treturn this.introspectionSchemaFactory.create()\n\t\t})\n\t}\n}\n"],"names":[],"mappings":";;AAKO,MAAM,qCAAqC;AAAA,EACjD,YAA6B,4BAAwD;AAAxD,SAAA,6BAAA;AAAA,EAAyD;AAAA,EAE/E,SAAwB;AAC9B,WAAO,IAAI,cAAc,KAAK,aAAc,CAAA;AAAA,EAC7C;AAAA,EAEO,eAAoC;AAC1C,WAAO,mBAAmB,MAA6B;AAC/C,aAAA,KAAK,2BAA2B;IAAO,CAC9C;AAAA,EACF;AACD;"}